Hello,
I have several servers hosting a java services that always show in XI as critical error. They are started from an init script, and the services are running as they should. The services have a PID dropfile in /var/run as well.
Our Xi is on a KVM based rhel5.6 x64 vm, and these services are on the same types (other)
2011-09-27 00:00:01CURRENT SERVICE STATE: <hostname> ;Java Service;CRITICAL;HARD;5;usage: /etc/init.d/service123 {start
I used the Linux (RHEL) wizard to initially setup these boxes for monitoring, and added this service. So I'm trying to figure out if there is more logging somewhere, if I need to append something, or use a different test.
One note is that there is a companion java based client service that runs on Windows and other Linux boxes, which is also started from an init script, and those seem to show OK.
2011-09-27 00:00:02CURRENT SERVICE STATE: <hostname> ;Java Scheduler;OK;HARD;1;Usage: /etc/init.d/server456 { start
I know these might be two different things, but thought I would just bring it to light. Makes me think something with the way the first service is being started. So I'm looking for alternate ways to test the startup.
Thanks!
java service indicates CRITICAL from init script
Re: java service indicates CRITICAL from init script
What check plugin is this using on the remote machine? I would actually try executing the plugin on the remote machine with the arguments in place to see the full output that it's returning. Check to make sure those init scripts have a "status" command, because it looks like you're getting a usage output from the init script.
Run
/etc/init.d/javaservice123 status
And see what you get for output. My guess is that's what the plugin is doing.
Run
/etc/init.d/javaservice123 status
And see what you get for output. My guess is that's what the plugin is doing.
Re: java service indicates CRITICAL from init script
[root@backup ~]# /etc/init.d/obsr statusmguthrie wrote:What check plugin is this using on the remote machine? I would actually try executing the plugin on the remote machine with the arguments in place to see the full output that it's returning. Check to make sure those init scripts have a "status" command, because it looks like you're getting a usage output from the init script.
Run
/etc/init.d/javaservice123 status
And see what you get for output. My guess is that's what the plugin is doing.
usage: /etc/init.d/obsr {start|stop}
and the check I use is this:
check_nrpe!check_init_service!-a 'obsr'
So I guess that is why it fails. But here is the finn part. I have the companion service which i thought was working. So I tried to stop it. However, nagios never detected the stop, and instead, displays as still running. So I checked it:
[jim@bliss ~]$ sudo /etc/init.d/obmscheduler status
Usage: /etc/init.d/obmscheduler { start | stop }
and the check I was using for it:
check_nrpe!check_init_service!-a 'obmscheduler'
So neither actually work, but they each indicate and opposite condition.
Re: java service indicates CRITICAL from init script
That check command uses the "status" option to see if the process is actually running. You might have to use a different plugin to monitor that particular process or add the "status" flag to the init script for your service.