nagios plugin command argument missing
Posted: Tue Nov 18, 2014 11:34 pm
hi,
I'm encountering a strange issue when trying to run plugin command. My command is written in Perl named "/usr/local/nagios/libexec/xdcr_monitor.pl", I found each time it was called 2 times and for the first time it worked well but not all arguments are passed to it for the second time. I opened nagios debug and checked debug log, and found:
[1416395862.935456] [2048.2] [pid=27703] Not currently in macro. Running output (85): '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U Administrator -P 123456'
[1416395862.935462] [2048.1] [pid=27703] Done. Final output: '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U Administrator -P 123456' <<<<<<<<<<< the first time, arguments were passed normally
[1416395864.063038] [2320.2] [pid=27703] Raw Command Input: $USER1$/xdcr_monitor.pl -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$
[1416395864.063043] [2320.2] [pid=27703] Expanded Command Output: $USER1$/xdcr_monitor.pl -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ <<<<<<<<< missed macros for argument parsing for the second time
[1416395864.063156] [2048.2] [pid=27703] Not currently in macro. Running output (66): '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U -P '
[1416395864.063160] [2048.1] [pid=27703] Done. Final output: '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U -P ' <<<<<<<<<<< so the last 2 arguments are empty
It seems that 2 events are invoked at that time, I don't know why it worked like that, and it continuously happened.
Could you help me? Thanks a lot!
I'm encountering a strange issue when trying to run plugin command. My command is written in Perl named "/usr/local/nagios/libexec/xdcr_monitor.pl", I found each time it was called 2 times and for the first time it worked well but not all arguments are passed to it for the second time. I opened nagios debug and checked debug log, and found:
[1416395862.935456] [2048.2] [pid=27703] Not currently in macro. Running output (85): '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U Administrator -P 123456'
[1416395862.935462] [2048.1] [pid=27703] Done. Final output: '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U Administrator -P 123456' <<<<<<<<<<< the first time, arguments were passed normally
[1416395864.063038] [2320.2] [pid=27703] Raw Command Input: $USER1$/xdcr_monitor.pl -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$
[1416395864.063043] [2320.2] [pid=27703] Expanded Command Output: $USER1$/xdcr_monitor.pl -H $HOSTADDRESS$ -U $ARG1$ -P $ARG2$ <<<<<<<<< missed macros for argument parsing for the second time
[1416395864.063156] [2048.2] [pid=27703] Not currently in macro. Running output (66): '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U -P '
[1416395864.063160] [2048.1] [pid=27703] Done. Final output: '/usr/local/nagios/libexec/xdcr_monitor.pl -H 10.64.218.133 -U -P ' <<<<<<<<<<< so the last 2 arguments are empty
It seems that 2 events are invoked at that time, I don't know why it worked like that, and it continuously happened.
Could you help me? Thanks a lot!