path problem in plugin
Leonardo Carneiro
lscarneiro at veltrac.com.br
Tue Oct 13 15:44:30 CEST 2009
Hi,
I wrote a small bash script that checks bandwidth, using the statgrab tool.
The statgrab executable file is located in /usr/local/bin. This folder
is in the PATH variable of the user nagios (tested in command line), but
the file is not found when the script is runned by the nagios process.
Doing an "echo $PATH" inside the script, the value of the variable is
not the same as it was when the same command is executed in the command
line with the nagios user.
This is the return when executed from the command line:
$ echo `whoami` $PATH
nagios
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/jdk1.5.0_11/bin:/home/user/bin:/database/replicacao/bin:/home/nagios/bin
And this is the return when the script is called by the nagios process:
nagios /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
Why the PATH variable is not the same in the command line and inside the
nagios process?
Sorry for my poor english and tks in advance.
--
*Leonardo de Souza Carneiro*
*Veltrac - Tecnologia em Logística.*
lscarneiro at veltrac.com.br <mailto:lscarneiro at veltrac.com.br>
http://www.veltrac.com.br <http://www.veltrac.com.br/>
/Fone Com.: (43)2105-5601/
/Av. Higienópolis 1601 Ed. Eurocenter Sl. 803/
/Londrina- PR/
/Cep: 86015-010/
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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