Please excuse my ignorance but the PATH setting for Nagios?! -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Arno Lehmann Sent: 24 March 2006 09:06 PM To: nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] Nagios specific scripts and/or binaries
Hello, please send replies to the list and don't request a read confirmation... On 3/24/2006 7:30 PM, George Rushby wrote: > HI Arno, > > Thanks for your prompt response! > > I have been doing all test work running as the nagios user. If I take the > following command "/usr/bin/printf "***** Nagios *****\n\nNotification > Type: PROBLEM\n\nService: Current Users\nHost: test-server\nIP: > 10.0.0.200\nState: WARNING\nDate/Time: Fri Mar 24 18:44:56 SAST > 2006\n\nAdditional Info:\n\nUSERS WARNING - 1 users currently logged in" | > /opt/tools/pipesend/pipesend" it works like a dream. > > I have even created a symbolic link for pipesend in /usr/local/bin.....but > alas it fails! PATH setting for Nagios, perhaps? And I don't mean the one you get as user nagios, I mean the one Nagios works with... Apart from that, for that sort of problem, it's a simple thing to write a small wrapper script which logs some diagnostic output - for example, path, id, shell and probably the Nagios-specific environment variables - and then submits the actual program calls with parameters. You might even log things like the output from 'which <programname>' and '/bin/ls -l <programname>' to see what actually happens... Arno > Anymore help would be appreciated. > > George > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Arno Lehmann > Sent: 24 March 2006 08:21 PM > To: nagios-users@lists.sourceforge.net > Subject: Re: [Nagios-users] Nagios specific scripts and/or binaries > > Hi, > > On 3/24/2006 7:11 PM, George Rushby wrote: > ... > >>I get the following error in the nagios.log file >> >> >> >>[1143218696] SERVICE NOTIFICATION: george;test-server;Current >>Users;WARNING;notify-by-sms;USERS WARNING - 1 users currently logged in >> >>[1143218696] Warning: Attempting to execute the command "/usr/bin/printf >>"***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: Current >>Users\nHost: test-server\nIP: 10.0.0.200\nState: WARNING\nDate/Time: Fri >>Mar 24 18:44:56 SAST 2006\n\nAdditional Info:\n\nUSERS WARNING - 1 users >>currently logged in" | pipesend" resulted in a return code of 127. Make >>sure the script or binary you are trying to execute actually exists... >> > > ... > >>If I remove the ‘pipesend’ and replace it with ‘mail’ and execute it via >>Nagios it works. >> >> >> >>So the question is, does Nagios only work with special scripts and/or >>binaries? >> > > > PATH or permissions. > > I'm quite sure that your script either can not be found in Nagios' > search path, or that Nagios can't run it due to missing permissions. > > You should keep in mind that all test work should be done as the user > Nagios runs as. > > Arno > > >>Thanks in advance >> >>George >> >> >>-- >>No virus found in this outgoing message. >>Checked by AVG Free Edition. >>Version: 7.1.385 / Virus Database: 268.3.0/290 - Release Date: 2006/03/23 >> > > -- IT-Service Lehmann [EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 _______________________________________________ Nagios-users mailing list Nagios-users@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 -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.0/290 - Release Date: 2006/03/23 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.2/293 - Release Date: 2006/03/26 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Nagios-users mailing list Nagios-users@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