NCPA End User Customizations/Self-Service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
onegative
Posts: 173
Joined: Tue Feb 17, 2015 12:06 pm

NCPA End User Customizations/Self-Service

Post by onegative »

G 'Day Everyone,

So I am bouncing around an idea where I allow the System Admins the ability to use Puppet and/or other tools to apply NCPA custom monitoring to hosts based on each server's unique need. Standard configurations are applied but the hostname.cfg specific configuration can be managed by them.

What I am doing is defining service names by default on the Nagios XI side so as a new host/agent is added these services are already defined and no unique definitions are required:
Custom01
...
Custom20

Unfortunate not all components from the json tree display information like for example Drive G: on Windows. So the Customxx value displays as expected but the Status Information displays "OK: Used_percent was 9.10 %" so you cannot determine which drive is being monitored...

So my question. Can anyone suggest how I could keep the idea of the Custom01...Custom20 service definitions but have Status Information add additional data/variable names/etc if needed to help identify the object being monitored? Of course on Unix the filesystem name is embedded in the Status Information field, just not in Windows.

Open to suggestions and thanks for your help in advance,
Danny
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NCPA End User Customizations/Self-Service

Post by mcapra »

That might be worth filing a github issue over. I can see how, particularly with passive checks, you might want to have information about the check itself as part of the status output:
https://github.com/NagiosEnterprises/ncpa

I can definitely appreciate the use case described. Custom plugins or wrapper scripts that append some check information the the NCPA output could be leveraged. For example, take the arguments passed (Drive G: for example) and append it to the status output. Otherwise, since it's open source, you could build that information into NCPA directly.
Former Nagios employee
https://www.mcapra.com/
onegative
Posts: 173
Joined: Tue Feb 17, 2015 12:06 pm

Re: NCPA End User Customizations/Self-Service

Post by onegative »

Hey mcapra,

Yes using scripts can and do make populating the Status Information easy. I just didn't know whether anyone had tried tackling the json stack and how its being parced from the NCPA perspective. Any custom script I've written writes just fine to the Status Information field and therefore does not pose an issue...and like I stated earlier even the Unix filesystem reports its instance name in the Status Information field...which seems to indicate its just an oversight on the part of the Windows parser from the event stream from NCPA.

Thanks for the feedback,
Danny
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NCPA End User Customizations/Self-Service

Post by mcapra »

It's more likely a limitation of psutil, which is what we use to gather such metrics on the back-end. Feel free to file a github issue though if the current behavior is particularly prohibitive. @jomann is pretty good about addressing github issues.
Former Nagios employee
https://www.mcapra.com/
Locked