I'm encountering a strange behavior while trying to perform monitoring with a custom build-in sh script using NRPE.
When I run as nagios user on the remote server the command is properly working
Code: Select all
[nagios@SRV1 libexec]$ ./check_mq.sh -w 10 -c 50 -m ARG1 -q ARG2
OK - Number of messages on ARG2 : 0 (Old Value : 0) | Messages number=0;10;50;0;10000000000
Code: Select all
[nagios@NAGIOS_SRV /usr/local/nagios/libexec]$ ./check_nrpe -H SRV1 -c check_mq -a '-w 10 -c 50 -m ARG1 -q ARG2'
no output from plugin -
It requieres specific rights that have been properly granted otherwise I won't be able to run it locally.
My nrpe.cfg is properly set as I said because it works on other servers.
I've also try using different way with special characters in the command like: check_nrpe -c command -a "args" or check_nrpe -c command -a 'args "ARG" '
Also, using the same remote server with NRPE, I'm able to perform other types of monitoring :
Code: Select all
[nagios@NAGIOS_SRV /usr/local/nagios/libexec]$ ./check_nrpe -H SRV1 -c apm_check_memory
OK - Memory Used: 55% - [ Memory Info - Total: 5962 MB, Used: 3300 MB, Free: 2662 MB ] | 'Memory_Used'=55%;95;98;0;100
[nagios@NAGIOS_SRV /usr/local/nagios/libexec]$ ./check_nrpe -H SRV1 -c apm_check_cpu
OK - CPU Used: 1% - [ CPU Info - vCPU=2, User 1%, System 0%, IO Wait 0% ] | 'CPU_Used'=1%;70;80;0;100 'CPU_User'=1%;70;80;0;100 'CPU_System'=0%;70;80;0;100 'CPU_IOWait'=0%;70;80;0;100
The remote server is a RHEL 5.11
Nagios Core is 4.2.4 with Nagios XI 5.5.2 on RHEL 6.10
Do you guys have any clue on this issue please ?