NCPA checks for lowercase version of command, thus fails
Posted: Tue May 07, 2024 5:40 pm
I'm trying to replace the nagios check_procs plugin with the native ncpa facility, but it seems to have some limitations.
One of them is described thusly:
I'm checking for a process called "Autosched.bora9.bsh" -
$ ssh drslinap3d ps -ef|grep Autosched.bora9.bsh
espbatch 9714 1 0 Apr08 ? 00:00:00 /bin/ksh /opt/softwareag/cronus/scripts/Autosched.bora9.bsh
So, the process is there. Now let's check with ncpa:
$ check_ncpa.py -H drslinap3d -t linux -M 'processes' -q 'name=Autosched.bora9.bsh' -c1:
CRITICAL: Process count for processes named autosched.bora9.bsh was 0 | 'process_count'=0;;1:;
ncpa searches for a lower case version of the process, which is not found.
Any workarounds for this?
One of them is described thusly:
I'm checking for a process called "Autosched.bora9.bsh" -
$ ssh drslinap3d ps -ef|grep Autosched.bora9.bsh
espbatch 9714 1 0 Apr08 ? 00:00:00 /bin/ksh /opt/softwareag/cronus/scripts/Autosched.bora9.bsh
So, the process is there. Now let's check with ncpa:
$ check_ncpa.py -H drslinap3d -t linux -M 'processes' -q 'name=Autosched.bora9.bsh' -c1:
CRITICAL: Process count for processes named autosched.bora9.bsh was 0 | 'process_count'=0;;1:;
ncpa searches for a lower case version of the process, which is not found.
Any workarounds for this?