Available Macro's in notes_url
Bryan Loniewski
brylon at jla.rutgers.edu
Fri May 15 21:29:39 CEST 2009
We are running Nagios 3.1.0 and are trying to access various Macros
(e.g. $HOSTGROUPNAME$) from within a host definition's notes_url, for
example:
<snipped>
notes_url /notes/hostinfo.php?HOSTNAME=$HOSTNAME$&HOSTGROUPNAME=$HOSTGROUPNAME$
<snipped>
The file hostinfo.php is simple for now, it just echo's out the
query passed:
<?php
echo $_GET["HOSTNAME"] . " is the hostname!!!";
echo '<br>';
echo $_GET["HOSTGROUPNAME"] . " is the hostgroupname!!!";
echo '<br>';
?>
The $HOSTNAME$ Macro correctly gets expanded out (either when hovering
over the notes icon or viewing the notes webpage the link is pointing
to), however the $HOSTGROUPNAME$ Macro does not get expanded.
Interestingly, custom Macros defined for a host definition are also
expanded correctly when used in the notes_url.
We came across a few posts about this issue:
http://thread.gmane.org/gmane.network.nagios.user/60602
http://thread.gmane.org/gmane.network.nagios.user/52775
the latter post stating Nagios 3x may address this issue of what
Macros may be available for the notes_url.
Is there any documentation/plans/etc... of what Macros are/will be
accessible from the notes_url? Did we overlook something? Is there a
way to access the $HOSTGROUPNAME$ Macro within a host definition's
notes_url?
__________________________
Bryan Loniewski
Rutgers University
CSS - System Administrator
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
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