Re: [Nagios-users] nrpe script

2008-11-03 Thread jeremiah
Hi Andy, Thanks for the email. I wish this would have worked! Here's what i did... -I added the sudo command in my nrpe.cfg file and ran it like you said. command[loadscript_check_error_log]=/usr/bin/sudo /usr/local/bin/python /home/jesterj/report_loadscript_error_log.py -Restarted the nrpe

Re: [Nagios-users] nrpe script

2008-11-03 Thread jeremiah
Mathieu, I did what you said and still have the same error. *I put the script into /etc/nagios and change owner permissions to nagios %/etc/nagios$ sudo chown nagios:nagios report_loadscript_error_log.py *verified permissions %/etc/nagios$ ls -la report_loadscript_error_log.py -rwxr-xr-x

Re: [Nagios-users] nrpe script

2008-11-03 Thread Mathieu Gagné
Hi, jeremiah wrote: *changed the path in the command. command[loadscript_check_error_log]=/usr/bin/sudo /usr/local/bin/python /etc/nagios/report_loadscript_error_log.py Can this command run without sudo? /usr/local/bin/python /etc/nagios/report_loadscript_error_log.py Try to not use

Re: [Nagios-users] nrpe script

2008-11-03 Thread jeremiah
Problem resolved! Even though i removed the sudo command from my commands file it was uncommented and active in nrpg.cfg file. Does this make sense to you? Seems like it could output a better error message than NRPE: Unable to read output?! #command_prefix=/usr/bin/sudo Thanks for all yiour

Re: [Nagios-users] nrpe script

2008-11-03 Thread Mathieu Gagné
Hi, jeremiah wrote: Problem resolved! Great! Even though i removed the sudo command from my commands file it was uncommented and active in nrpg.cfg file. Does this make sense to you? Seems like it could output a better error message than NRPE: Unable to read output?!

[Nagios-users] nrpe script

2008-10-31 Thread jeremiah
Hi folks, I have another question for you all that i haven't been able to resolve. I want to run a python script on my monitored hosts using the nrpe command. On my server I am running the following command: # /usr/lib/nagios/plugins/check_nrpe -H 10.10.10.45 -c loadscript_check_error_log

Re: [Nagios-users] nrpe script

2008-10-31 Thread Valdinger, Stephen (DOV, MSX)
Is python in the path on the particular server? Try using /path/to/python and see if you have success. Stephen Valdinger MIS Helpdesk Coordinator P: 330.365.3622 C: 740.491.0958 -Original Message- From: jeremiah To: Nagios Sent: Fri Oct 31 17:21:07 2008 Subject: [Nagios-users] nrpe

Re: [Nagios-users] nrpe script

2008-10-31 Thread Marc Powell
On Oct 31, 2008, at 4:21 PM, jeremiah wrote: Every time i run the command above then i get the following error: NRPE: Command 'loadscript_check_error_log' not defined On my monitored hosts, I've specified the corellary command in /etc/nagios/nrpe.cfg, then restarted the service. #

Re: [Nagios-users] nrpe script

2008-10-31 Thread Patrick Morris
On Fri, 31 Oct 2008, jeremiah wrote: No, I was trying to simulate a command prompt. JJ On Fri, 2008-10-31 at 14:31 -0700, Patrick Morris wrote: On Fri, 31 Oct 2008, jeremiah wrote: Hi folks, I have another question for you all that i haven't been able to resolve. I

Re: [Nagios-users] nrpe script

2008-10-31 Thread Mathieu Gagné
Hi Jeremiah, jeremiah wrote: On my monitored hosts, I've specified the corellary command in /etc/nagios/nrpe.cfg, then restarted the service. # command[loadscript_check_error_log]=python /home/username/script.py Am I missing something? Is there really a # at the beginning of the

Re: [Nagios-users] nrpe script

2008-10-31 Thread jeremiah
No, I was trying to simulate a command prompt. JJ On Fri, 2008-10-31 at 14:31 -0700, Patrick Morris wrote: On Fri, 31 Oct 2008, jeremiah wrote: Hi folks, I have another question for you all that i haven't been able to resolve. I want to run a python script on my monitored hosts

Re: [Nagios-users] nrpe script

2008-10-31 Thread jeremiah
/path/to/python and see if you have success. Stephen Valdinger MIS Helpdesk Coordinator P: 330.365.3622 C: 740.491.0958 -Original Message- From: jeremiah To: Nagios Sent: Fri Oct 31 17:21:07 2008 Subject: [Nagios-users] nrpe script Hi folks, I have another question

Re: [Nagios-users] nrpe script

2008-10-31 Thread Aaron Segura
There is no '#' on the beginning of the line in your nrpe.cfg is there? That's just in your e-mail for readability? -Original Message- From: jeremiah [mailto:[EMAIL PROTECTED] Sent: Friday, October 31, 2008 3:21 PM To: Nagios Subject: [Nagios-users] nrpe script Hi folks, I have another

Re: [Nagios-users] nrpe script

2008-10-31 Thread Mathieu Gagné
Hi, jeremiah wrote: When I typed python on the command line it drops my into the python interpreter. Regardless, I went ahead and specified it in the command: command[loadscript_check_error_log]=/usr/local/bin/python /home/jesterj/report_loadscript_error_log.py now when i run the

Re: [Nagios-users] nrpe script

2008-10-31 Thread Patrick Morris
On Fri, 31 Oct 2008, jeremiah wrote: Hi folks, I have another question for you all that i haven't been able to resolve. I want to run a python script on my monitored hosts using the nrpe command. On my server I am running the following command: # /usr/lib/nagios/plugins/check_nrpe

Re: [Nagios-users] nrpe script

2008-10-31 Thread jeremiah
I just chown'd the file for nagios. $ sudo chown nagios /home/jesterj/report_loadscript_error_log.py $ ls -la *.py -rwxr-xr-x 1 nagios jesterj 3156 2008-10-31 21:55 report_loadscript_error_log.py I'm now getting a different error after i fixed the path issue. $

Re: [Nagios-users] nrpe script

2008-10-31 Thread jeremiah
i check the manual and this is what it says about this particular error: On Fri, 2008-10-31 at 15:10 -0700, jeremiah wrote: I just chown'd the file for nagios. $ sudo chown nagios /home/jesterj/report_loadscript_error_log.py $ ls -la *.py -rwxr-xr-x 1 nagios jesterj 3156 2008-10-31 21:55

Re: [Nagios-users] nrpe script

2008-10-31 Thread jeremiah
I just pulled this error up in the manual and it sasy the following about the error: NRPE: Unable to read output = This error indicates that the command that was run by the NRPE daemon did not return any character output. This could be an indication of the following problems: -An

Re: [Nagios-users] nrpe script

2008-10-31 Thread Mathieu Gagné
Hi, jeremiah wrote: i check the manual and this is what it says about this particular error: On Fri, 2008-10-31 at 15:10 -0700, jeremiah wrote: I just chown'd the file for nagios. $ sudo chown nagios /home/jesterj/report_loadscript_error_log.py $ ls -la *.py -rwxr-xr-x 1 nagios jesterj

Re: [Nagios-users] nrpe script

2008-10-31 Thread Andy Shellam
Have you got sudo configured on your NRPE host? I get this error on new servers when I forget to add the Nagios/NRPE user to /etc/sudoers and allow them access to run the plugins without needing a password. Try running your command as the Nagios/NRPE user on your NRPE host like so (alter path

Re: [Nagios-users] nrpe script

2008-10-31 Thread jeremiah
Mathieu, Thanks for your ongoing help. I check the log file and this is all i'm seeing pertaining to this command on the server. Oct 31 22:33:23 serv1 nagios2: SERVICE ALERT: serv2;LOADSCRIPT CHECK ERRORS;WARNING;HARD;3;NRPE: Unable to read output Oct 31 22:33:23 serv1 nagios2: SERVICE

Re: [Nagios-users] nrpe script

2008-10-31 Thread Mathieu Gagné
Hi, jeremiah wrote: I check the log file and this is all i'm seeing pertaining to this command on the server. Oct 31 22:33:23 serv1 nagios2: SERVICE ALERT: serv2;LOADSCRIPT CHECK ERRORS;WARNING;HARD;3;NRPE: Unable to read output Oct 31 22:33:23 serv1 nagios2: SERVICE NOTIFICATION: