using Nagios XI for Auto restart Jbos Servervice on Linux

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
venugopaldigital
Posts: 3
Joined: Thu Mar 30, 2017 12:38 am

using Nagios XI for Auto restart Jbos Servervice on Linux

Post by venugopaldigital »

Hi Support team,
Does Nagios support to auto restart the Jbos service on Linux environment.If so which module ? Nagios Reactor or Event module or through new Plugins?
Or is there any other way to implement my requirement?

Use case
--------------
1.Monitor Jbos service.
2.If it goes down, check the logs if it is really down why it went down(Here some pre defined rules before simply restarting).
3.Based on log information restart the JBOS service.

Thanks
Venu
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: using Nagios XI for Auto restart Jbos Servervice on Linu

Post by mcapra »

You would first need to define your JBoss service check command and use that in a Service check. If you wanted to then run some other script when the Service check returns a "Problem State" such as warning/critical/unknown, you would define an "Event Handler" to handle that behavior.

A summary:
Event handlers are optional system commands (scripts or executables) that are run when a host or service state change occurs. These
commands include, but are not limited to, restarting services, parsing logs, checking other host or service states, making database
calls, etc. The possibilities are near limitless. Essentially, through event handlers, Nagios XI is capable of running any operation that
can be performed from the command line with the added ability of utilizing macros passed by Nagios XI.
Documentation:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Essentially, your Service's check command would be this:
1. Monitor Jbos service.
And the event handler would be a script that contains some logic to tackle this:
2.If it goes down, check the logs if it is really down why it went down(Here some pre defined rules before simply restarting).
3.Based on log information restart the JBOS service.
The logic of parsing out the JBoss log information is most of the heavy lifting. There isn't anything native to Nagios XI that handles log parsing (we have Nagios Log Server for that).
Former Nagios employee
https://www.mcapra.com/
Locked