Means of setting ENV parameters in nrpe

Litwin, Matthew mlitwin at stubhub.com
Fri Sep 11 23:15:24 CEST 2009


I am running nrpe in Solaris and I have to launch nrpe as nagios
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

 

After much head banging I discovered that nrpe doesn't acknowledge the
nagios user ENV assignments at all unless I launch this as the nagios
user. If you launch with sudo it won't work, and trying to source a
.profile or something in the command doesn't seem to work either. Is
there some way to configure nrpe to always source a file right after
forking so that ENV parameters are maintained?

 

I found this all out by experimenting with running printenv via NRPE and
how it differed when started nrpe in daemon mode as root, via sudo or
from the nagios account. These problems are without question the most
flummoxing to debug. If there is some explanation on how nrpe handles
the ENV and how I can control it I would be greatly appreciative.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090911/c59a8ed9/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- 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