NRPE retrieveing weird results
Posted: Mon Aug 17, 2020 2:56 am
Hello,
I have a local script on a postfix server that checks the emails procesed. Locally the script runs just fine, getting the proper results when run as nagios user.
But when I try to run the same command through NRPE, it always returns 0 as value.
Some help would be appreciated to find out what's wrong with this setup, never seen such a weird behavior with NRPE
NRPEv4.0.2
NagiosV4.4.6
On postfix server:
nagios@postfix:/usr/local/nagios/etc$ whoami
nagios
nagios@postfix:/usr/local/nagios/etc$ /usr/local/nagios/libexec/check_postfix_processed2 -w 50 -c 100
Messages processed in the last 300 seconds: 3 | mailsprocessed=3
nagios@postfix:/usr/local/nagios/etc$ cat nrpe.cfg | grep postfix_proc
command[check_postfix_processed2]=/usr/local/nagios/libexec/check_postfix_processed2 -w 50 -c 100
On nagios server via NRPE:
nagios@AZNO-PRD-NAG001:/usr/local/nagios/libexec$ ./check_nrpe -H 172.18.249.10 -c check_postfix_processed2
Messages processed in the last 300 seconds: 0 | mailsprocessed=0
I have a local script on a postfix server that checks the emails procesed. Locally the script runs just fine, getting the proper results when run as nagios user.
But when I try to run the same command through NRPE, it always returns 0 as value.
Some help would be appreciated to find out what's wrong with this setup, never seen such a weird behavior with NRPE
NRPEv4.0.2
NagiosV4.4.6
On postfix server:
nagios@postfix:/usr/local/nagios/etc$ whoami
nagios
nagios@postfix:/usr/local/nagios/etc$ /usr/local/nagios/libexec/check_postfix_processed2 -w 50 -c 100
Messages processed in the last 300 seconds: 3 | mailsprocessed=3
nagios@postfix:/usr/local/nagios/etc$ cat nrpe.cfg | grep postfix_proc
command[check_postfix_processed2]=/usr/local/nagios/libexec/check_postfix_processed2 -w 50 -c 100
On nagios server via NRPE:
nagios@AZNO-PRD-NAG001:/usr/local/nagios/libexec$ ./check_nrpe -H 172.18.249.10 -c check_postfix_processed2
Messages processed in the last 300 seconds: 0 | mailsprocessed=0