For example, if I use a service with no spaces, the plugin works just fine:
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq CarboniteService"'
PROCESS OK - 1 process(es)|'processes'=1Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq CarboniteService" --filter "memusage gt 10000" --warn 0'
PROCESS WARNING - 1 process(es)|'processes'=1;0
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq CarboniteService" --filter "memusage gt 10000000" --warn 0'
PROCESS OK - 0 process(es)|'processes'=0;0The "--warn" flag also works.
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq CarboniteService" --filter "memusage gt 10000" --warn 0'
PROCESS WARNING - 1 process(es)|'processes'=1;0
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq CarboniteService" --filter "memusage gt 10000" --warn 1'
PROCESS OK - 1 process(es)|'processes'=1;1So far, so good. Now, when I try to run the same check against a service with spaces in the name, it fails.
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq Adobe Acrobat Update Service"'
PROCESS OK - 0 process(es)|'processes'=0However, when I use the "Service name", which doesn't contain spaces ("AdobeARMservice"), I get the expected output:
Code: Select all
[root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -t 300 -c check_winprocess -a '--filter "services eq AdobeARMservice"'
PROCESS OK - 1 process(es)|'processes'=1