0

Using Nagios if my java process goes down I want to restart it when it stops. Is there an available api/listener from nagios to do the same and is this possible using nagios.

Any help on this would be useful.

thanks Lokesh

Lokesh Raj Urs
  • 351
  • 1
  • 6
  • 19

2 Answers2

0

Yes, this is achieved through the use of Event Handlers in Nagios.

http://nagios.sourceforge.net/docs/3_0/eventhandlers.html

Michael Guthrie
  • 512
  • 1
  • 4
  • 11
0

Use event handlers.

Here is a config i use

define service{
  host_name mysql_host
  service_description mysql
  max_check_attempts 2
  event_handler mysql_bounce
}

define command{
  command_name mysql_bounce
  command_line /opt/nagios/scripts/mysql_bounce
}

/opt/nagios/scripts/mysql_bounce contains the command to bounce mysql.

Prashanth
  • 347
  • 3
  • 4
  • 12