New Variable for host

Andreas Ericsson ae at op5.se
Wed Jun 30 14:58:31 CEST 2004


Sand Philipp wrote:
> Hi,
> 
> I playing around with a php page for the hostextinfo. 
> So far this page simply takes the %HOSTNAME% Variable from nagios,
> to create a link to the right rdp, or putty cmd file for the host,
> so I don't have to create a page for every host. I just wonder if
> it is possible to add a new field to the host definition e.g. call
> remoteboard, where you can define the remoteboard ip for the host,
> and which Nagios itself puts into a new Variable e.g. %RILOEADDRESS%.
> Is there a chance to do that, or does this mean a workaround at the
> sourcecode itself?
> 

I'm not entirely sure what you mean. The $HOSTNAME$ macro (not 
%HOSTNAME% variable) is only usable within the nagios configuration, 
unless you interpret it yourself.

If you plan to add another macro, you'll need another variable. New 
variables requires modifications to Nagios' source-code. If you enable 
it as a macro, you'll have to add or modify roughly three times as much 
code as if you don't support it as a variable. Considering this is 
extended hostinfo, isn't the notes_url and action_url variables enough?
They're very free-form, and you can use them however you like. I'm not 
sure whether they can be used as macros or not, but it sure would be 
nice to have for notifications.

> Regards,
> Philipp
> 

-- 
Sourcerer / Andreas Ericsson
OP5 AB
+46 (0)733 709032
andreas.ericsson at op5.se


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
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