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
using Nagios XI for Auto restart Jbos Servervice on Linux
-
venugopaldigital
- Posts: 3
- Joined: Thu Mar 30, 2017 12:38 am
Re: using Nagios XI for Auto restart Jbos Servervice on Linu
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:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Essentially, your Service's check command would be this:
A summary:
Documentation: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.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Essentially, your Service's check command would be this:
And the event handler would be a script that contains some logic to tackle this:1. Monitor 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).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.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/