[Nagiosplug-help] Unable to execute Java+Shell script plugin from Nagios
Amarpal
akaur at qasource.com
Mon Apr 4 13:18:21 CEST 2011
Hi
I wrote a Nagios plugin but am facing some problem while executing the same
from nagios. Below are the steps followed:
1. I wrote a java program that will invoke a Web service and calculate
the time taken. This java program then writes back the outout to a text
file.
2. I have a shell script which is executing the java program, read the
text file generated and echo the output.
3. Defined a .cfg file to execute the shell script
define service{
use local-service
host_name localhost
service_description SHELL SCRIPT
check_command check_search_time
normal_check_interval 1
}
define command{
command_name check_search_time
command_line $USER1$/ws_search.sh
}
4. Added above .cfg file entry in nagios.cfg file as
cfg_file=/usr/local/nagios/etc/objects/wssearch.cfg
This shell script works file when executed the same as 'Nagios' User. But
when checked the above configured service from 'Nagios UI'. It says 'No
output returned by plugin' as well as there is no txt file generated by java
program.
Please let us know I am missing anything.
Thanks In Advance
Amarpal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20110404/4a83daa5/attachment.html>
More information about the Help
mailing list