nagios and sendmail
Edward Ford
eford at nexusenergy.com
Fri Jun 3 21:01:08 CEST 2005
These are examples that are indeed in the configuration files.. If you can
read them..
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Marc Powell
Sent: Friday, June 03, 2005 2:45 PM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] nagios and sendmail
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Edward Ford
> Sent: Friday, June 03, 2005 1:15 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] nagios and sendmail
>
> I finally got sendmail working on the computer that nagios is
installed
> on. Now how do I get nagios to talk to sendmail, is it with external
> commands?
A couple of examples --
# 'notify-by-email' command definition
define command{
command_name notify-by-email
command_line /bin/echo -e 'Subject: ** $NOTIFICATIONTYPE$
alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **\n\n***** Nagios
*****\n\nNotification Type: $NOT
IFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$DATETIME$\n\nAdditional Info:\n\n$OUTPUT$' | /bin/
mail Service $SERVICEDESC$ $SERVICESTATE$ alert for $HOSTNAME
$CONTACTEMAIL$
}
# 'host-notify-by-email' command definition
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$\nHos
t: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$OUTPUT$\n\nDate/Time: $DATETIME$\n" | /bin/mail $CONTACTEMAIL$
}
# 'service-notify-by-email' command definition
define command{
command_name service-notify-by-email
command_line /bin/echo -e "Subject: Service $SERVICEDESC$
$SERVICESTATE$ alert for $HOSTNAME$!\n\n***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\nHo
st: $HOSTNAME$\nState: $SERVICESTATE$\nAddress:
$HOSTADDRESS$\n\nService: $SERVICEDESC$\nInfo: $OUTPUT$\n\nDate/Time:
$DATETIME$\n" | /bin/mail -s '** $NOTIFICATIONTYPE$ al
ert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **' $CONTACTEMAIL$
}
> Any good and useful responses would be appreciated.
Unless I'm being very dense, these, and many other command definitions
are created if you install the sample config files.
--
Marc
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you
shotput
a projector? How fast can you ride your desk chair down the office luge
track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r
_______________________________________________
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
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
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