Commands not being executed.
Posted: Thu Nov 16, 2017 8:12 am
Hi.
We have a local installation of Nagios Core 4.3.4 which doesn't seem to be executing any commands even though all the logs suggest the command has been run:
Log:
[Thu Nov 16 13:05:34 2017] EXTERNAL COMMAND: SEND_CUSTOM_SVC_NOTIFICATION;server;Service-Test;0;nagios.user;testing
[Thu Nov 16 13:05:34 2017] SERVICE NOTIFICATION: server;server;Service-Test;CUSTOM (CRITICAL);notifyservice-server;CRITICAL: No Recent Passive Service Checks.;nagios.user;testing
Debug:
[Thu Nov 16 13:05:34 2017.937806] [2048.1] [pid=5607] **** BEGIN MACRO PROCESSING ***********
[Thu Nov 16 13:05:34 2017.937814] [2048.1] [pid=5607] Processing: '/bin/echo "has this command worked?" > /tmp/nagios.test'
[Thu Nov 16 13:05:34 2017.937825] [2048.1] [pid=5607] Done. Final output: '/bin/echo "has this command worked?" > /tmp/nagios.test'
[Thu Nov 16 13:05:34 2017.937834] [2048.1] [pid=5607] **** END MACRO PROCESSING *************
[Thu Nov 16 13:05:34 2017.937896] [001.0] [pid=5607] process_macros_r()
[Thu Nov 16 13:05:34 2017.937907] [2048.1] [pid=5607] **** BEGIN MACRO PROCESSING ***********
[Thu Nov 16 13:05:34 2017.937916] [2048.1] [pid=5607] Processing: 'SERVICE NOTIFICATION: server;server;Service-Test;CUSTOM ($SERVICESTATE$);notifyservice-server;$SERVICEOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$
'
[Thu Nov 16 13:05:34 2017.937936] [2048.1] [pid=5607] Done. Final output: 'SERVICE NOTIFICATION: server;server;Service-Test;CUSTOM (CRITICAL);notifyservice-server;CRITICAL: No Recent Passive Service Checks.;nagios.user;testing
'
[Thu Nov 16 13:05:34 2017.937970] [2048.1] [pid=5607] **** END MACRO PROCESSING *************
In this case the /tmp/nagios.test file doesn't get created.
I have tried various different commands and, although all of them say they have been run, none of them actually do anything.
Running all the commands manually as the Nagios user work successfully.
Can anyone suggest what the problem may be?
Thanks.
We have a local installation of Nagios Core 4.3.4 which doesn't seem to be executing any commands even though all the logs suggest the command has been run:
Log:
[Thu Nov 16 13:05:34 2017] EXTERNAL COMMAND: SEND_CUSTOM_SVC_NOTIFICATION;server;Service-Test;0;nagios.user;testing
[Thu Nov 16 13:05:34 2017] SERVICE NOTIFICATION: server;server;Service-Test;CUSTOM (CRITICAL);notifyservice-server;CRITICAL: No Recent Passive Service Checks.;nagios.user;testing
Debug:
[Thu Nov 16 13:05:34 2017.937806] [2048.1] [pid=5607] **** BEGIN MACRO PROCESSING ***********
[Thu Nov 16 13:05:34 2017.937814] [2048.1] [pid=5607] Processing: '/bin/echo "has this command worked?" > /tmp/nagios.test'
[Thu Nov 16 13:05:34 2017.937825] [2048.1] [pid=5607] Done. Final output: '/bin/echo "has this command worked?" > /tmp/nagios.test'
[Thu Nov 16 13:05:34 2017.937834] [2048.1] [pid=5607] **** END MACRO PROCESSING *************
[Thu Nov 16 13:05:34 2017.937896] [001.0] [pid=5607] process_macros_r()
[Thu Nov 16 13:05:34 2017.937907] [2048.1] [pid=5607] **** BEGIN MACRO PROCESSING ***********
[Thu Nov 16 13:05:34 2017.937916] [2048.1] [pid=5607] Processing: 'SERVICE NOTIFICATION: server;server;Service-Test;CUSTOM ($SERVICESTATE$);notifyservice-server;$SERVICEOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$
'
[Thu Nov 16 13:05:34 2017.937936] [2048.1] [pid=5607] Done. Final output: 'SERVICE NOTIFICATION: server;server;Service-Test;CUSTOM (CRITICAL);notifyservice-server;CRITICAL: No Recent Passive Service Checks.;nagios.user;testing
'
[Thu Nov 16 13:05:34 2017.937970] [2048.1] [pid=5607] **** END MACRO PROCESSING *************
In this case the /tmp/nagios.test file doesn't get created.
I have tried various different commands and, although all of them say they have been run, none of them actually do anything.
Running all the commands manually as the Nagios user work successfully.
Can anyone suggest what the problem may be?
Thanks.