Page 1 of 1

script execution

Posted: Fri Dec 20, 2013 7:54 am
by vinothsethuram
Hi,

I wrote shell script which is using chck_http .How to execute that shell script using nagios i.e in command configuration. what output will be shown in nagios webUI?

Re: script execution

Posted: Fri Dec 20, 2013 10:56 am
by sreinhardt
Is this related to your json thread? If so please continue posting in there, so we know it is the same issue. If not, let us know and we can try to help out.

Re: script execution

Posted: Fri Dec 20, 2013 11:40 am
by vinothsethuram
No, its not related to JSON thread.. I have script, need to execute this script as one of the service for which I need to define in command/service configuration.

Re: script execution

Posted: Fri Dec 20, 2013 12:35 pm
by sreinhardt
OK, can you give us an example of how you would run the command from the command line please.

Re: script execution

Posted: Fri Dec 20, 2013 4:00 pm
by vinothsethuram
I would like to run this command ./tmp/script.sh

Re: script execution

Posted: Mon Dec 23, 2013 10:45 am
by slansing
I think sreinhardt is asking if you can run the script and show the output you are returning, and what you are expecting to return.

Re: script execution

Posted: Mon Dec 23, 2013 1:31 pm
by vinothsethuram
No its not wokring for me.

if I use ./tmp/script.sh in command line its wokring fine. I want to execute the same line using nagios command and service configuration.

Re: script execution

Posted: Mon Dec 23, 2013 1:37 pm
by lmiltchev
if I use ./tmp/script.sh in command line its working fine.
Can you show us an example?

Re: script execution

Posted: Tue Dec 24, 2013 1:16 pm
by vinothsethuram
This is the example

./tmp/script.sh

Re: script execution

Posted: Thu Dec 26, 2013 9:00 am
by scottwilkerson
can you show the output from running the following commands

Code: Select all

pwd
ls -la ./tmp/script.sh