Allow access to custom variables outside Nagios

VALIYEV Ruslan valiyev at unicc.org
Fri Jun 15 15:13:17 CEST 2012


Hi all,

We have custom variables like this:

define host {
        use                 linux-server
        host_name           host.foo.com
        address             192.168.1.44
        _serverfunction     Oracle EBS R12 Application Server
        _serveradmin        Admins_Linux
        _serviceadmin       Admins_Oracle
        _userorg            ACME
}

Now we have our own script to send out the notifications. And, apparently, custom variables are not exported outside Nagios for safety.

To give an example of when we’re able to get the var data:
my $o_hostname         = $ENV{NAGIOS_HOSTNAME};

And this one doesn’t return anything:
my $o_hostfunction     = $ENV{NAGIOS__HOSTSERVERFUNCTION};

Could someone help finding this limitation in the source code? The environment we have is pretty strict and isolated, also the custom variables we use never contain any confidential information.


Best regards,
Ruslan Valiyev

Linux System Administrator
Systems Support Unit (OTAS)
Operations and Technology Division
International Computing Centre (ICC)
E-mail: valiyev at unicc.org
Website: www.unicc.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120615/b7f1b2cb/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
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