According to the
NSClient documentation, these are the settings we're allowed to use:
help (CheckSystem, checkmem)
Show help screen (this screen)
help-pb (CheckSystem, checkmem)
Show help screen as a protocol buffer payload
show-default (CheckSystem, checkmem)
Show default values for a given command
help-short (CheckSystem, checkmem)
Show help screen (short format).
type (CheckSystem, checkmem)
The types to check
ShowAll (CheckSystem, checkmem)
Configures display format (if set shows all items not only failures, if set to long shows all cores).
MaxWarn (CheckSystem, checkmem)
Maximum value before a warning is returned.
MaxCrit (CheckSystem, checkmem)
Maximum value before a critical is returned.
MinWarn (CheckSystem, checkmem)
Minimum value before a warning is returned.
MinCrit (CheckSystem, checkmem)
Minimum value before a critical is returned.
warn (CheckSystem, checkmem)
Maximum value before a warning is returned.
crit (CheckSystem, checkmem)
Maximum value before a critical is returned.
Unfortunately there is no way of performing this check using the default command provided with XI.
That being said, with a little customization you can get the results that you'd like to see - using check_nrpe against the NSClient agent. A few things have to be in place for this to work appropriately.
First, be sure you're using a recent version of NSClient. I'm using version 0.4.3.
Second, the nsclient configuration should look something like this:
Code: Select all
[/settings/default]
allowed hosts = x.x.x.x
password = somepass
[/modules]
NSClientServer = 1
CheckSystem = 1
CheckDisk = 1
NRPEServer = 1
CheckExternalScripts=enabled
[/settings/NRPE/server]
use ssl = 1
payload length = 1024
allow nasty characters = false
allowed ciphers = ADH
ssl = 1
allow arguments = 1
insecure = 1
The command you'll need to run from Nagios XI to test the results:
Code: Select all
cd /usr/local/nagios/libexec
./check_nrpe --host x.x.x.x --command check_memory
Results:
Code: Select all
[root@localhost libexec]# ./check_nrpe --host 192.168.x.x --command check_memory
OK: committed = 16.745GB, physical = 20.429GB|'committed'=16.74484GB;51.05516;57.43705;0;63.81895 'committed %'=26%;80;90;0;100 'physical'=20.42904GB;25.52828;28.71931;0;31.91035 'physical %'=64%;79;89;0;100
Let me know if you have any questions. Thanks!