Problems with emails after database crash
Posted: Tue Nov 14, 2017 7:29 pm
I have a powerfailure, after that nagios database complain about some tables crashed
after run the script everything appears to be working but I do not receive emails
I can send a Test Email and works
If I check /var/log/maillog there are no new logs of mail generated by nagios
The configuration appears to be the same for 9months ( always working and sending emails normally)
if I check /usr/local/nagios/var/nagios.log appears lines like this
SERVICE NOTIFICATION: nagiosadmin;CiscoPBX;Gi0/1 Status;CRITICAL;xi_service_notification_handler;CRITICAL: Interface GigabitEthernet0/1 (index 5) is down.
If I check /var/log/messages appear lines like this
Nov 14 18:25:28 cobra nagios: SERVICE NOTIFICATION: nagiosadmin;CiscoPBX;Gi0/1 Status;CRITICAL;xi_service_notification_handler;CRITICAL: Interface GigabitEthernet0/1 (index 5) is down.
but not emails are generated
command xi_service_notification_handler looks like this
xi_service_notification_handler
/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --service="$SERVICEDESC$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$" --datetime="$LONGDATETIME$"
My system was created using the OVA for VMWARE
Nagios XI - System Info
System:
Nagios XI Version : 5.4.11
cobra.csags.com.mx 2.6.32-696.13.2.el6.x86_64 x86_64
CentOS release 6.9 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Server Name: cobra.csags.com.mx
Server Address: 10.0.0.12
Server Port: 443
Date/Time
PHP Timezone: America/Mexico_City
PHP Time: Tue, 14 Nov 2017 18:20:19 -0600
System Time: Tue, 14 Nov 2017 18:20:19 -0600
how can I debug something more to find why no emails are generated?
thanks in advance
Jorge Arenas
after run the script everything appears to be working but I do not receive emails
I can send a Test Email and works
If I check /var/log/maillog there are no new logs of mail generated by nagios
The configuration appears to be the same for 9months ( always working and sending emails normally)
if I check /usr/local/nagios/var/nagios.log appears lines like this
SERVICE NOTIFICATION: nagiosadmin;CiscoPBX;Gi0/1 Status;CRITICAL;xi_service_notification_handler;CRITICAL: Interface GigabitEthernet0/1 (index 5) is down.
If I check /var/log/messages appear lines like this
Nov 14 18:25:28 cobra nagios: SERVICE NOTIFICATION: nagiosadmin;CiscoPBX;Gi0/1 Status;CRITICAL;xi_service_notification_handler;CRITICAL: Interface GigabitEthernet0/1 (index 5) is down.
but not emails are generated
command xi_service_notification_handler looks like this
xi_service_notification_handler
/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=service --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --service="$SERVICEDESC$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$" --datetime="$LONGDATETIME$"
My system was created using the OVA for VMWARE
Nagios XI - System Info
System:
Nagios XI Version : 5.4.11
cobra.csags.com.mx 2.6.32-696.13.2.el6.x86_64 x86_64
CentOS release 6.9 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Server Name: cobra.csags.com.mx
Server Address: 10.0.0.12
Server Port: 443
Date/Time
PHP Timezone: America/Mexico_City
PHP Time: Tue, 14 Nov 2017 18:20:19 -0600
System Time: Tue, 14 Nov 2017 18:20:19 -0600
how can I debug something more to find why no emails are generated?
thanks in advance
Jorge Arenas