Re: [Nagios-users] Message Subject - PROBLEM Service Alert: hostname is UP (fixed)
Quoting Terry Carmen te...@cnysupport.com: I've been receiving a continuous stream of these messages and can't seem to figure out why or make them stop. Nagios is sending repeated notifications that various hosts are up even though they have never been down. I've googled a number of similar problems, but unfortunately no applicable solutions. Does anybody have any ideas what I could check? Here's an update: I found a seemingly unrelated problem. I had duplicated the notify-host-by-email command into the notify-service-by-email command. While this accounted for the inappropriate message content, fixing it seems to have also fixed the repeating notifications (haven't received any in a while). No idea why fixing the invalid message text would also fix the repeating notifications, but it seems OK now. I'm posting the answer here in case anybody else runs into this problem. The lines below are working nicely on a system that uses postfix as the mailer. This also takes care of postix's sendmail not respecting the -s (subject) command line option. The macros below add the subject to the message. // from commands.cfg /// # 'notify-host-by-email' command definition define command{ command_namenotify-host-by-email command_line/usr/bin/printf %b Subject: ** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **\n\n* Nagios *\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n\nService: $SERVICECHECKCOMMAND$Host Output: [$HOSTOUTPUT$]\n\nHost Output (Long): $LONGHOSTOUTPUT$\n\nPerformance Data: $HOSTPERFDATA$\n\n | /usr/sbin/sendmail -f nag...@example.com $CONTACTEMAIL$ } # 'notify-service-by-email' command definition define command{ command_namenotify-service-by-email command_line/usr/bin/printf %b Subject: ** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\n\n* Nagios @VERSION@ *\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nService Output: $SERVICEOUTPUT$\n\nLong Service Output: $LONGSERVICEOUTPUT$\n\nAdditional Info:\n\n$OUTPUT$ | /usr/sbin/sendmail -f nag...@example.com $CONTACTEMAIL$ } -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
Re: [Nagios-users] Message Subject - PROBLEM Service Alert: hostname is UP
On 13 May 2011 16:09, Terry Carmen te...@cnysupport.com wrote: I've been receiving a continuous stream of these messages and can't seem to figure out why or make them stop. Nagios is sending repeated notifications that various hosts are up even though they have never been down. I've googled a number of similar problems, but unfortunately no applicable solutions. Does anybody have any ideas what I could check? I would find the relevant host entry in the file /usr/local/nagios/var/objects.cache, then make sure you understand all the directives in that host definition - by all means post it here too if you want a group opinion. Check that you don't have more than one contact defined having the same email address. Also, check the status history for that host and see if anything is happening in-between those times when it is UP. Maybe it's going DOWN in-between but you're just not getting the DOWN alerts! It would be useful to know a bit more about what you're seeing, for example are these repeat emails occurring with a particular frequency? Do you get a whole bunch of them at once and then none for a while? Do they eventually stop and if so after how many repeats? hth, Jim -- Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay ___ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null