CPULOAD,MEMUSE,Check_mem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: CPULOAD,MEMUSE,Check_mem

Post by grayloglearn »

you meant to say the way how we are getting the variable names for check_nt, We will not get for check_nrpe ??
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: CPULOAD,MEMUSE,Check_mem

Post by ssax »

Think of it this way:

PLUGINS

On the Nagios side, in /usr/local/nagios/libexec there are plugins that are needed to get data from the remote side side, you will see them as:
check_nt
check_nrpe
check_ncpa
check_snmp
etc...
Those are the plugins that communicate with remote agents/daemons/resources/services/etc in order for Nagios to alert/notify on the data.

PROTOCOLS/METHODS

check_nt - Windows Only

Required updating the remote agent software every time a new feature (variable from below) was wanted

check_nt was created to grab metrics from Windows NT systems, NSClient++ is the only check_nt agent I'm aware of.

check_nt has these BUILT-IN commands:

Code: Select all

Valid variables are:
 CLIENTVERSION
 CPULOAD
 UPTIME
 USEDDISKSPACE
 MEMUSE
 SERVICESTATE
 PROCSTATE
 COUNTER
 INSTANCES 
check_nrpe

check_nrpe has NO Built-in commands but allows plugins to run and return results (new features can be added by adding new plugins/scripts to be run on remote agent).

check_nrpe was created to grab metrics from all types of systems (that just means you can compile the NRPE agent on it and query it, that's a LOT of things and many different OSes/devices) through giving the ability to run remote plugins and return their results (this is the what made NRPE unique from check_nt).

NRPE should be thought of as an OS agnostic plugin-runner-AND-result-returner.

AGENTS

Here's the main list that we use:
NCPA
NRPE (the agent that you query)
NSClient++
NSClient++ - 3rd party software, we don't control the code and can't add features or resolve bugs, supports check_nt AND check_nrpe. and some other things based on it's configs.

See here for downloads/documentation:

https://www.nsclient.org/

NRPE - is the older agent for Unix/Linux (NSClient++ gives support for Windows) and is still used in many cases, it just allows plugins to be ran and the results returned. Pretty standard recommendation for Unix/Linux and NSClient++ for Windows.

See here for downloads/documentation:

https://exchange.nagios.org/directory/A ... or/details

NCPA - is our latest official cross platform agent (Windows/Linux/*nix), this is what we will be focusing on going forward, we wrote it and control the codebase (so we can update it and fix bugs). NCPA has built-in commands, and API, and has an API/web interface that is very helpful.

See here for downloads/documentation:

https://www.nagios.org/ncpa/

---

If you choose check_nt, you're limited to what is built into NSClient++(those variables from the top).
- This uses the check_nt plugin on the Nagios side

If you choose NRPE, you can use NSClient++ as the agent on Windows and the NRPE agent for Linux/*nix.
- Both still use the check_nrpe plugin on the Nagios side

I personally would choose NCPA going forward as it allows the most flexibility and Nagios controls the codebase (so we can add features/fix bugs) but you're free to choose any path you'd like as Nagios supports that flexibility. See here for the NCPA help docs:
- This uses check_ncpa on the Nagios side

https://www.nagios.org/ncpa/help.php

See here for our Check Library Articles:

https://support.nagios.com/kb/category.php?id=186

Let us know if you have questions or we can clarify anything for you.


Thank you!
grayloglearn
Posts: 222
Joined: Thu Jul 06, 2017 8:55 am

Re: CPULOAD,MEMUSE,Check_mem

Post by grayloglearn »

Does ncpa agent will call remote windows scripts same as nrpe. I mean if i want to call windows custom scripts. we use the below command
./check_nrpe -H XXXX -t 90 -c Customscript.

Like above how we can call with ncpa could you please provide the command pls
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: CPULOAD,MEMUSE,Check_mem

Post by mbellerue »

This is what a check command may look like when running a custom script via the NCPA agent.

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H 192.168.145.90 -t 'ASecretToken' -P 5693 -M 'plugins/test_check.ps1' -a "0"
There is a plugins directory at C:\Program Files (x86)\Nagios\NCPA\plugins\. You can put your custom scripts in that directory, then use -M 'plugins/scriptname' to call the script, and -a to pass arguments to the script.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked