On Jun 19, 2009, at 12:35 AM, Thomas S. Larsen wrote: > My problem is the following. > > ------------------------------------------------------------------------------------- > ***** Nagios 2.9 ***** > > Notification Type: RECOVERY > > Service: $ > Host: [censored] > Address: [censored] > State: $ > > Date/Time: Thu Jun 18 13:06:35 CEST 2009 > > Additional Info: > > $ > > --------------------------------------------------------------------------------------- > It send email when it’s supposed too. But it doesn’t show the > service nor the state. > But if I log in to nagios and force send a notification, it shows > the correct data, I suspect this to be because I send the > notification from the servce. So im thinking it’s something with the > host reporting. > Any ideas anyone ?
If this is a host notification, it makes perfect sense. Any $SERVICE* macro used in the notification isn't valid because there's no specific service for the notification. I suspect that your host_notification_commands and service_notification_commands are the same when they should be different. The host notification command should use $HOST*$ macros. http://nagios.sourceforge.net/docs/2_0/macros.html A typical host notification command might look like -- define command { command_name host-notify-by-email command_line /bin/echo -e "Subject: $NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is $HOSTSTATE$\n\n***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$ \nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n \nDate/Time: $LONGDATETIME$\n\nAcknowledged By: $HOSTACKAUTHOR$ \nAcknowledgement: $HOSTACKCOMMENT$" | /bin/mail $CONTACTEMAIL$ } -- Marc ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ 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