Email alert to contain ack url

Janet Sullivan jsullivan at mndigital.com
Tue Sep 8 23:04:14 CEST 2009


Awesome.  Offhand, would you know the cmd_typ for a host
acknowledgement?

-----Original Message-----
From: Kent Saunders [mailto:kgs at uvm.edu] 
Sent: Tuesday, September 08, 2009 5:01 AM
To: craig at hooters-uk.com
Cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Email alert to contain ack url

Just throw it somewhere in the body of the message, like this:

/usr/bin/printf "%b" "Alert\n\n
Notification Type: $NOTIFICATIONTYPE$\n\n
Service: $SERVICEDESC$\n
Host: $HOSTALIAS$\n
Address: $HOSTADDRESS$\n
State: $SERVICESTATE$\n\n
Date/Time: $LONGDATETIME$\n\n
Additional Info:\n\n
$SERVICEOUTPUT$\n\n
Acknowledgment URL:
https://status.uvm.edu/nagios/cgi-bin/cmd.cgi?cmd_typ=34&host=$HOSTNAME$
&service=$SERVICEDESC$ \n" | /usr/bin/mailx -s "$NOTIFICATIONTYPE$ alert
- $HOSTALIAS$/$SERVICEDESC$
is $SERVICESTATE$ " $CONTACTEMAIL$


-kent

craig at hooters-uk.com wrote:
> Hi all, I'm looking to place an ack url in my email
> alert but not quite sure where do add the line, could
> one of your Nagions point me in the correct direction.
>
> Below is my mail alert.
>
> /usr/bin/printf "%b" "Alert\n\nNotification Type:
> $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
> $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
> $SERVICESTATE$\n\nDate/Time:
> $LONGDATETIME$\n\nAdditional
> Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mailx -s "
> $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$
> is $SERVICESTATE$ " $CONTACTEMAIL$
>
> and as far as I'm aware the next line has to be
> inserted but I'm unsure where at this present time,
> tried a few places but it fails, well not it but "I"
>
>
http://your.nagios.host/cgi-bin/cmd.cgi?cmd_typ=34&host=$HOSTNAME$&servi
ce=$SERVICEDESC$
>
> Thanks Group, now back to work I guess.
>
> Craig
>
>
>
------------------------------------------------------------------------
------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day 
> trial. Simplify your report design, integration and deployment - and
focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> 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
>   


------------------------------------------------------------------------
------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day 
trial. Simplify your report design, integration and deployment - and
focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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