Acknowledged by user + Service action url

Palle L Jensen palleje at gmail.com
Fri Jan 16 16:38:02 CET 2009


That worked great, thanks much for your help!

PJ

> -----Original Message-----
> From: Marc Powell [mailto:marc at ena.com]
> Sent: Thursday, January 15, 2009 2:53 PM
> To: nagios-users Mailinglist
> Subject: Re: [Nagios-users] Acknowledged by user + Service action url
> 
> 
> On Jan 15, 2009, at 12:51 PM, Palle L Jensen wrote:
> 
> > Marc,
> >
> > Thanks for you help!! I am half way there :=)
> 
> Good deal.
> 
> > You are right I have been unable to add the action url in the service
> > definition, due to I have several hostnames for the specific service
> > check.
> >
> > For example the below DiskE check I have several hosts defined for
> > that
> > check, how would I go by to replace "johndoehost" so the link will be
> > correct?
> >
> > http://1xx.xx.xxx.xxx/nagios/cgi-
> bin/extinfo.cgi?type=2&host=johndoehost&ser
> > vice=DiskE
> 
> 
> http://nagios.sourceforge.net/docs/3_0/macros.html
> 
> "Macro Substitution - How Macros Work
> 
> Before Nagios executes a command, it will replace any macros it finds
> in the command definition with their corresponding values. This macro
> substitution occurs for all types of commands that Nagios executes -
> host and service checks, notifications, event handlers, etc.
> 
> Certain macros may themselves contain other macros. These include the
> $HOSTNOTES$, $HOSTNOTESURL$, $HOSTACTIONURL$, $SERVICENOTES$,
> $SERVICENOTESURL$, and $SERVICEACTIONURL$ macros. "
> 
> In your case, I expect the following should work --
> 
> define service {
> ...
> action_url	http://1xxx.xx.xxx.xxx/nagios/cgi-
> bin/extinfo.cgi?type=2&host=$HOSTNAME$&service=DiskE
> ...
> }
> 
> --
> Marc
> 
> --------------------------------------------------------------------------
> ----
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> 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:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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