How to monitor long running processes?
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
How to monitor long running processes?
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
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
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: How to monitor long running processes?
@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
https://support.nagios.com/kb/article/p ... s-782.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: How to monitor long running processes?
@Siddharth Hegde, You can use the check_procs plugin. Put the following command in the nrpe.cfg file on the Ubuntu server.
And here's the command to run from the Nagios server.command[check_process]=/usr/local/nagios/libexec/check_procs $ARG1$
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./usr/local/nagios/libexec/check_nrpe -H IP_address -c check_process -a "-a httpd -c 2:5"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to monitor long running processes?
Let us know if we can be of further assistance
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: How to monitor long running processes?
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
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
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to monitor long running processes?
we would need to know what the process line looks like
Can you run the following on the server
Can you run the following on the server
Code: Select all
ps -ef|grep process.jar
-
- Posts: 70
- Joined: Mon Aug 07, 2017 4:19 am
Re: How to monitor long running processes?
I got thisscottwilkerson wrote:we would need to know what the process line looks like
Can you run the following on the server
Code: Select all
ps -ef|grep process.jar
Code: Select all
root 98376 98355 0 14:57 pts/0 00:00:00 grep --color=auto process.jar
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: How to monitor long running processes?
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?
Are you sure that is what it is called?