NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

Feature Request: api/processes should support username as a filter #809

Closed MrPippin66 closed 4 months ago

MrPippin66 commented 3 years ago

It's common in our environment to have multiple instances of a product run under different IDs on a single system.

The current api/processes doesn't include the ability to filter by username, which complicates monitoring using the builtin process monitor.

The report already includes 'username' in the case of process match, so the agent already has the information, It just needs to update the filter criteria updated to include 'username'.

Example:


Processes Matched
PID: Name: Username: Exe: Memory: CPU
-----------------------------------
1: systemd: root: 0.02 % (VMS 0.20 GB, RSS 0.01 GB): 0.03 %
MrPippin66 commented 3 years ago

Anyone looking into this? This is a significant limitation in the current processes node, and one the legacy "check_procs" plugins supports.

MrPippin66 commented 2 years ago

@jomann09 Sorry to tag you, directly. Has anyone reviewed this? This is something the NRPE plugin supports, and I'd think is very desirable. I can't use that solution for Windows, since NRPE plugins aren't used on Windows.

MrPippin66 commented 2 years ago

@jomann09 Is this being considered for future enhancement?

MrPippin66 commented 1 year ago

@sawolf I realize there's a large backlog all pending getting 3.0 out the door, but any chance this can get evaluating for inclusion not long after? It's very limiting for our process monitoring. We're using the legacy plugins in the interim

sawolf commented 1 year ago

Hi @MrPippin66 - I'm not in charge of the roadmap, but I'm adding it to the milestone so that people can find it later. I don't believe the current 3.0 milestone is accurate to what we're planning to ship for that release, but I don't see a reason that this couldn't be implemented.

MrPippin66 commented 4 months ago

Any update for this? This was aimed for 3.10, but I don't show it was included.

ne-bbahn commented 4 months ago

Unless I'm mistaken about what you're asking for, this is already functioning in NCPA.

There does seem to be some discrepancies in special character parsing that are causing issues on Windows, though. i.e. the API is outputting a username as MY PC Name\\username, but to filter by this, you need to use MY PC Name\username.

I will note this in an existing issue if I can find one or create a new issue if not.