check_procs recommendation
Posted: Tue Mar 16, 2021 8:04 pm
Hello.
We are running Nagios Core 4.4.6 on RHEL7 and monitoring remote RHEL6 and RHEL7 servers.
I would like to check for 5 separate processes running as root. For example:
$ ps -fu root | egrep "snmpd|atd|sshd|crond|kauditd"
root 114 2 0 Mar03 ? 00:00:07 [kauditd]
root 985 1 0 Mar03 ? 00:00:00 /usr/sbin/atd -f
root 988 1 0 Mar03 ? 00:01:15 /usr/sbin/crond -n
root 1200 1 0 Mar03 ? 00:00:03 /usr/sbin/sshd -D
root 1202 1 0 Mar03 ? 00:10:00 /usr/sbin/snmpd -LS0-4d -Lf /dev/null -p /var/run/snmpd.pid -f
I have experimented with check_nrpe and check_procs and --ereg-argument-array. I encounter problems with nrpe such as.:
Client request from X.X.X.X was invalid, bailing out...
Error: Request contained illegal metachars!
The Services Status Details for the remote server will show.:
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
This will work locally.:
/usr/lib64/nagios/plugins/check_procs -w 5:5 --ereg-argument-array "snmpd|atd|sshd|crond|kauditd" -k -u root -t 10
PROCS OK: 5 processes with regex args 'snmpd,atd,sshd,crond,kauditd', UID = 0 (root) | procs=5;5:5;;0;
Could you recommend a method with check_procs to monitor 5 separate processes on those remote Linux servers?
Thanks in advance!
We are running Nagios Core 4.4.6 on RHEL7 and monitoring remote RHEL6 and RHEL7 servers.
I would like to check for 5 separate processes running as root. For example:
$ ps -fu root | egrep "snmpd|atd|sshd|crond|kauditd"
root 114 2 0 Mar03 ? 00:00:07 [kauditd]
root 985 1 0 Mar03 ? 00:00:00 /usr/sbin/atd -f
root 988 1 0 Mar03 ? 00:01:15 /usr/sbin/crond -n
root 1200 1 0 Mar03 ? 00:00:03 /usr/sbin/sshd -D
root 1202 1 0 Mar03 ? 00:10:00 /usr/sbin/snmpd -LS0-4d -Lf /dev/null -p /var/run/snmpd.pid -f
I have experimented with check_nrpe and check_procs and --ereg-argument-array. I encounter problems with nrpe such as.:
Client request from X.X.X.X was invalid, bailing out...
Error: Request contained illegal metachars!
The Services Status Details for the remote server will show.:
CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected).
This will work locally.:
/usr/lib64/nagios/plugins/check_procs -w 5:5 --ereg-argument-array "snmpd|atd|sshd|crond|kauditd" -k -u root -t 10
PROCS OK: 5 processes with regex args 'snmpd,atd,sshd,crond,kauditd', UID = 0 (root) | procs=5;5:5;;0;
Could you recommend a method with check_procs to monitor 5 separate processes on those remote Linux servers?
Thanks in advance!