Acknowledged by user + Service action url
Marc Powell
marc at ena.com
Thu Jan 15 20:52:38 CET 2009
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
More information about the Users
mailing list