We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Starting java process using nagios

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Starting java process using nagios

Postby SalinaSJames » Tue May 31, 2022 6:45 am

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 omegle voojio useful.

Last edited by SalinaSJames on Thu Jun 09, 2022 7:04 am, edited 1 time in total.
Posts: 10
Joined: Sat Feb 12, 2022 1:21 am

Re: Starting java process using nagios

Postby MichaelJean » Fri Jun 03, 2022 3:05 am

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 echatspin echatrandom bounce mysql.
Last edited by MichaelJean on Fri Jun 24, 2022 6:52 am, edited 1 time in total.
Posts: 6
Joined: Tue Apr 26, 2022 6:59 am

Re: Starting java process using nagios

Postby BettyRNorahDeniels » Mon Jun 06, 2022 7:09 am

I want to monitor a java process on a windows machine with nagios. On the windows server with process explorer I can see that the java process is started with "java -jar myApp.jar" in the command line. I've installed the NSClient++ and want to use the CheckProcState plugin.

check_nrpe -H -p 5666 -c CheckProcState -a cmdLine ShowAll "java.exe"=started
gives me

OK: java.exe: 1|'java.exe'=1;0;0
but if I also want to check the command line

check_nrpe -H -p 5666 -c CheckProcState -a cmdLine ShowAll "java.exe java -jar myApp.jar"=started
I get:

CRITICAL: java.exe java -jar myApp.jar: stopped (critical)|'java.exe ja'=0;0;0
How can I check the command line omegle.2yu.co correctly with the omeglz echat CheckProcState plugin?
Posts: 8
Joined: Tue Feb 15, 2022 7:13 am

Return to Community Support

Who is online

Users browsing this forum: arshadaziz, Google [Bot] and 24 guests