Page 1 of 3
How to monitor long running processes?
Posted: Fri Sep 14, 2018 6:11 am
by Siddharth Hegde
Hello,
I have couple of long running processes in server which runs for days at stretch. Is there a way to get alerts when they stop or exit? How to monitor them in NRPE?
Regards,
Siddarth Hegde
Re: How to monitor long running processes?
Posted: Fri Sep 14, 2018 12:03 pm
by npolovenko
@Siddharth Hegde, Are you looking to monitor processes on a windows server or on a linux server? You can find some examples here:
https://support.nagios.com/kb/article/p ... s-782.html
Re: How to monitor long running processes?
Posted: Fri Sep 14, 2018 12:10 pm
by Siddharth Hegde
Hi
@npolovenko,
All are ubuntu 16.04 servers
Thanks,
Siddarth Hegde
Re: How to monitor long running processes?
Posted: Fri Sep 14, 2018 1:07 pm
by npolovenko
@Siddharth Hegde, You can use the check_procs plugin. Put the following command in the nrpe.cfg file on the Ubuntu server.
command[check_process]=/usr/local/nagios/libexec/check_procs $ARG1$
And here's the command to run from the Nagios server.
/usr/local/nagios/libexec/check_nrpe -H IP_address -c check_process -a "-a httpd -c 2:5"
You can replace httpd with the name of the process you want to monitor. And you can replace my current critical range 2:5 with your own. Meaning that the plugin will return in Critical state if there are 2 to 5 httpd processes running on the Ubuntu server.
Re: How to monitor long running processes?
Posted: Sat Sep 15, 2018 1:29 am
by Siddharth Hegde
Hi
@npolovenko,
Thanks. I will check it
Regards,
Siddarth Hegde
Re: How to monitor long running processes?
Posted: Mon Sep 17, 2018 8:32 am
by scottwilkerson
Siddharth Hegde wrote:Hi
@npolovenko,
Thanks. I will check it
Regards,
Siddarth Hegde
Let us know if we can be of further assistance
Re: How to monitor long running processes?
Posted: Wed Oct 03, 2018 9:29 am
by Siddharth Hegde
Hi,
My apologies for replying very late. I have a followup query.
I have a process, process.jar, which is a single process which should be running all the time. I want to monitor this process.
What should I enter in client.cfg in nagios server? What should I put in client nrpe.cfg?
Please let me know if I have to create a new thread for this or can be continued in this thread.
Regards,
Siddarth Hegde
Re: How to monitor long running processes?
Posted: Wed Oct 03, 2018 9:51 am
by scottwilkerson
we would need to know what the process line looks like
Can you run the following on the server
Re: How to monitor long running processes?
Posted: Wed Oct 03, 2018 9:59 am
by Siddharth Hegde
scottwilkerson wrote:we would need to know what the process line looks like
Can you run the following on the server
I got this
Code: Select all
root 98376 98355 0 14:57 pts/0 00:00:00 grep --color=auto process.jar
Re: How to monitor long running processes?
Posted: Wed Oct 03, 2018 10:06 am
by scottwilkerson
If this is your only output then there is not a process running called process.jar
Are you sure that is what it is called?