I've got a pretty standard Nagios install. Ubuntu 10.04, Nagios 3.2.2, Plugins 1.4.15, NRPE 2.12, MRTG, NSClient++ 0.3.8, and NagiosGraph.
My command.cfg looks like this:
Code: Select all
# 'check_nrpe' command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
Code: Select all
define service{
use generic-service;
host_name 172.28.200.7
service_description C Drive Read IO;
check_command check_nrpe!CheckWMIValue -a "Query=Select Name, DiskReadsPersec from Win32_PerfFormattedData_PerfDisk_PhysicalDisk WHERE Name like \'%C:%\'" Check:DiskReads=DiskReadsPersec MaxWarn=0 MaxCrit=100 AliasCol=Name;
action_url /nagios/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$' onMouseOver='showGraphPopup(this)' onMouseOut='hideGraphPopup()' rel='/nagios$;
}
Code: Select all
Status Information: OK: Everything seems fine.
Performance Data:
Code: Select all
OK: Everything seems fine.|'DiskReads'=0;0;100;
Code: Select all
1285383893.989261] [2320.2] [pid=756] Raw Command Input: $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
[1285383894.205646] [2320.2] [pid=756] Expanded Command Output: $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
[1285383894.205665] [2048.1] [pid=756] Processing: '$USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$'
[1285383894.205830] [2048.2] [pid=756] Processing part: '/check_nrpe -H '
[1285383894.205839] [2048.2] [pid=756] Not currently in macro. Running output (40): '/usr/local/nagios/libexec/check_nrpe -H '
[1285383894.205917] [2048.2] [pid=756] Uncleaned macro. Running output (52): '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7'
[1285383894.205926] [2048.2] [pid=756] Just finished macro. Running output (52): '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7'
[1285383894.205943] [2048.2] [pid=756] Not currently in macro. Running output (56): '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7 -c '
[1285383894.205986] [2048.2] [pid=756] Uncleaned macro. Running output (251): '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7 -c CheckWMIValue -a "Query=Select Name, DiskReadsPersec from Win32_PerfFormattedData_PerfDisk_PhysicalDisk WHERE Name like '%C:%'" Check:DiskReads=DiskReadsPersec MaxWarn=0 MaxCrit=100 AliasCol=Name'
[1285383894.205995] [2048.2] [pid=756] Just finished macro. Running output (251): '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7 -c CheckWMIValue -a "Query=Select Name, DiskReadsPersec from Win32_PerfFormattedData_PerfDisk_PhysicalDisk WHERE Name like '%C:%'" Check:DiskReads=DiskReadsPersec MaxWarn=0 MaxCrit=100 AliasCol=Name'
[1285383894.206012] [2048.2] [pid=756] Not currently in macro. Running output (251): '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7 -c CheckWMIValue -a "Query=Select Name, DiskReadsPersec from Win32_PerfFormattedData_PerfDisk_PhysicalDisk WHERE Name like '%C:%'" Check:DiskReads=DiskReadsPersec MaxWarn=0 MaxCrit=100 AliasCol=Name'
[1285383894.206021] [2048.1] [pid=756] Done. Final output: '/usr/local/nagios/libexec/check_nrpe -H 172.28.200.7 -c CheckWMIValue -a "Query=Select Name, DiskReadsPersec from Win32_PerfFormattedData_PerfDisk_PhysicalDisk WHERE Name like '%C:%'" Check:DiskReads=DiskReadsPersec MaxWarn=0 MaxCrit=100 AliasCol=Name'
Code: Select all
[1285383976.395533] [016.0] [pid=756] Scheduling a forced, active check of service 'C Drive Read IO' on host '172.28.200.7' @ Fri Sep 24 23:06:14 2010
[1285383976.646106] [016.0] [pid=756] Attempting to run scheduled check of service 'C Drive Read IO' on host '172.28.200.7': check options=1, latency=2.646000
[1285383976.646188] [016.0] [pid=756] Checking service 'C Drive Read IO' on host '172.28.200.7'...
[1285383982.108064] [016.1] [pid=756] Handling check result for service 'C Drive Read IO' on host '172.28.200.7'...
[1285383982.108073] [016.0] [pid=756] ** Handling check result for service 'C Drive Read IO' on host '172.28.200.7'...
[1285383982.108081] [016.1] [pid=756] HOST: 172.28.200.7, SERVICE: C Drive Read IO, CHECK TYPE: Active, OPTIONS: 1, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 0, OUTPUT: OK: Everything seems fine.\n
[1285383982.108191] [016.0] [pid=756] Scheduling a non-forced, active check of service 'C Drive Read IO' on host '172.28.200.7' @ Fri Sep 24 23:16:16 2010
[1285383982.108227] [016.1] [pid=756] Checking service 'C Drive Read IO' on host '172.28.200.7' for flapping...
[1285383982.108255] [016.1] [pid=756] Checking host '172.28.200.7' for flapping...
[1285383982.108348] [016.2] [pid=756] Processed service performance data file output: 1285383976||172.28.200.7||C Drive Read IO||OK: Everything seems fine.||
Thanks in advance everyone!