$SERVICEOUTPUT$ empty in e-mail notifications

Marc Powell marc at ena.com
Wed Jan 7 00:00:09 CET 2009


On Jan 6, 2009, at 4:07 PM, Gavin Henry wrote:

> Version:
>
> /opt/nagios/bin/nagios -V
>
> Nagios 3.0.6

Thanks.

> Example service definition (all services have the same problem):

I was hoping to get a more complete picture of the information below  
but you seem to have all of the really key parts within inherited  
templates that weren't included. I'm at first trying to review your  
configuration and logic for errors.

define service{
>        use                            generic-service
>        host_name                 host.example.com
>        service_description     PING
>        check_command        check_ping!100.0,20%!500.0,60%
>         }

What are the contacts/contact_groups for this service defined in the  
template? Please post the generic-service template.

> Contact:
>
> define contact{
>         contact_name                    nagiosadmin
>         use   generic-contact
>         alias                           gavin.henry
>         email                           ghenry at suretecsystems.com
>         pager                           07930323266
>         }

Please post the generic-contact template. It includes the  
service_notification_commands and host_notification_commands  
specifications that needs to be verified.

> Service Email notification:
>
> define command{
>   command_name   notify-service-by-email
>   command_line   /usr/bin/printf "%b" "***** Nagios
> *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
> $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\n    State:
> $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
> Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$
> Service Alert: $HOSTALIAS$/$SERVICEDESC    $ is $SERVICESTATE$ **"
> $CONTACTEMAIL$
> }

Assuming that this is the service_notification_command specified for  
nagiosadmin and the notification is a SERVICE NOTIFICATION, this looks  
ok. You _may_ have a typo at "Service Alert: $HOSTALIAS$/ 
$SERVICEDESC    $" but the extra spaces may have been inadvertently  
added within the email to the list(?).

Please post nagios.log NOTIFICATION examples where the problem has  
occurred for this contact.

--
Marc


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Nagios-users mailing list
Nagios-users at 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





More information about the Users mailing list