Host Notifications Truncated
Marc Powell
marc at ena.com
Tue Apr 19 18:16:36 CEST 2005
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Stover, Beth
> Sent: Tuesday, April 19, 2005 10:41 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Host Notifications Truncated
>
> I'm having a problem with my host notifications through e-mail being
> truncated. Service notifications are fine -- they're properly
formated
> and detailed. SMS notifications are fine too for both e-mail and
host.
>
> Nagios ver 1.2
>
> Here's what my host notification email looks like:
>
> <mailto:nagios-users at lists.sourceforge.net>
> PROBLEM alert - <host name>/ is
>
> That's it.
>
> Here are my command definitions:
> # 'notify-by-email' command definition (ORIGINAL)
>
> define command{
>
> command_name notify-by-email
>
> command_line /usr/bin/echo -e 'Notification Type:
> $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$
>
> \nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
> $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$' | /usr/bin/mail
>
> -s ' $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
> $SERVICESTATE$ ' $CONTACTEMAIL$
>
> }
>
> # 'host-notify-by-email' command definition (ORIGINAL)
>
> define command{
>
> command_name host-notify-by-email
>
> command_line /usr/bin/echo -e 'Notification Type:
> $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$
>
> \nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
> $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$' | /usr/bin/mail
>
> -s ' $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is
> $SERVICESTATE$ ' $CONTACTEMAIL$
>
> }
>
> Any ideas? Should I be getting more detailed notifications from the
host
> notification?
Not with the commands above. For host notifications, none of the
$SERVICE*$ macros aren't available (nor do they make sense). Try
something like the following --
# 'host-notify-by-email' command definition
define command{
command_name host-notify-by-email
command_line /bin/echo -e "Notification Type:
$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress:
$HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" |
/usr/bin/mail -s "$NOTIFICATIONTYPE$ alert - Host $HOSTNAME$ is
$HOSTSTATE$" $CONTACTEMAIL$
}
You can always look at the Macros documentation page to see what other
information you can include in your notifications if this isn't
sufficient.
--
Marc
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
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