I have noticed today that if service return in --longserviceoutput the message that include "(" or ")" the Nagios is complaining following:
Code: Select all
/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="Company-production-support" --contactemail="[email protected]" --type=PROBLEM --escalated="0" --author="" --comments="" --host="SQ5VPMSQLC005" --hostaddress="SQ5VPMSQL005.RESOURCES.company.com" --hostalias="SQ5VPMSQLC005_CLUSTER" --hostdisplayname="SQ5VPMSQLC005" --service="Cluster_Status" --hoststate=UP --hoststateid=0 --servicestate=WARNING --servicestateid=1 --lastservicestate=WARNING --lastservicestateid=1 --servicestatetype=HARD --currentattempt=2 --maxattempts=2 --serviceeventid=177000 --serviceproblemid=83035 --serviceoutput="WARNING - Resources are not on same nodes" --longserviceoutput="MSCluster_ResourceGroup.Name="SQL Server (DBSRV5)" on node MSCluster_Node.Name="SQ5VPMSQL005"\nMSCluster_ResourceGroup.Name="SQL Server (DBSRV6)" on node MSCluster_Node.Name="SQ5VPMSQL006"" --datetime="Wed Dec 24 00:08:14 EST 2014" --notificationrecipients="Company-production-support,Company-production-operations-windows,011772,Company-production-platform-dev-database-engineering,012076
-bash: syntax error near unexpected token `('Code: Select all
[1419397694] wproc: stderr line 01: /bin/sh: -c: line 0: syntax error near unexpected token `('
[1419397694] wproc: stderr line 02: /bin/sh: -c: line 0: `/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="Company-production-support" --contactemail="[email protected]" --type=PROBLEM --escalated="0" --author="" --comments="" --host="SQ5VPMSQLC005" --hostaddress="SQ5VPMSQL005.RESOURCES.company.com" --hostalias="SQ5VPMSQLC005_CLUSTER" --hostdisplayname="SQ5VPMSQLC005" --service="Cluster_Status" --hoststate=UP --hoststateid=0 --servicestate=WARNING --servicestateid=1 --lastservicestate=WARNING --lastservicestateid=1 --servicestatetype=HARD --currentattempt=2 --maxattempts=2 --serviceeventid=177000 --serviceproblemid=83035 --serviceoutput="WARNING - Resources are not on same nodes" --longserviceoutput="MSCluster_ResourceGroup.Name="SQL Server (DBSRV5)" on node MSCluster_Node.Name="SQ5VPMSQL005"\nMSCluster_ResourceGroup.Name="SQL Server (DBSRV6)" on node MSCluster_Node.Name="SQ5VPMSQL006"" --datetime="Wed Dec 24 00:08:14 EST 2014" --notificationrecipients="Company-production-support,Company-production-operations-windows,011772,Company-production-platform-dev-database-engineering,012076"'But if I change it to following it works fine:
/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="Company-production-support" --contactemail="[email protected]" --type=PROBLEM --escalated="0" --author="" --comments="" --host="SQ5VPMSQLC005" --hostaddress="SQ5VPMSQL005.RESOURCES.company.com" --hostalias="SQ5VPMSQLC005_CLUSTER" --hostdisplayname="SQ5VPMSQLC005" --service="Cluster_Status" --hoststate=UP --hoststateid=0 --servicestate=WARNING --servicestateid=1 --lastservicestate=WARNING --lastservicestateid=1 --servicestatetype=HARD --currentattempt=2 --maxattempts=2 --serviceeventid=177000 --serviceproblemid=83035 --serviceoutput="WARNING - Resources are not on same nodes" --longserviceoutput="MSCluster_ResourceGroup.Name="SQL Server \(DBSRV5\)" on node MSCluster_Node.Name="SQ5VPMSQL005"\nMSCluster_ResourceGroup.Name="SQL Server \(DBSRV6\)" on node MSCluster_Node.Name="SQ5VPMSQL006"" --datetime="Wed Dec 24 00:08:14 EST 2014" --notificationrecipients="Company-production-support,Company-production-operations-windows,011772,Company-production-platform-dev-database-engineering,012076
Is some one has the same issue?
Best regards,