[Nagiosplug-devel] loading environment variables to nagios

Ovidiu Marcu Ovidiu.Marcu at tdn.de
Mon Mar 2 12:31:06 CET 2009


Hello,

Is there a way to load environment variables to nagios?

I have set up check_oracle_health in my nagios but it does not work:
Nagios gives me the following message:
CRITICAL - cannot connect to nagios. ORA-12154: TNS:could not resolve the connect identifier specified (DBD ERROR: OCIServerAttach)
Which means that nagios cannot find the environment variable TNS_ADMIN which I have defined in /etc/profiles

If I try manually as user nagios I get:
[nagios at nagios root]$ /usr/local/nagios/plugins/check_oracle_health --connect=nagios --user=nagios --password=pass --mode=tnsping
OK - connection established to nagios.

The TNS_ADMIN env seems to be ok:
[nagios at nagios root]$ echo $TNS_ADMIN
/usr/lib/oracle/11.1/client64/bin/network/admin


Viele Grüße,

ServiceDesk_TDN
Ovidiu Marcu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20090302/bb046c94/attachment.html>


More information about the Devel mailing list