Hi,
We are trying for httpd process monitoring on the remote Linux server.
command:
/usr/local/nagios/libexec ./check_nrpe -H <remote host IP> -c check_procs -a httpd
This command is giving the value of total process, and not httpd.
is there any other command. How to make check_procs work with nrpe
Please assist.
httpd process monitoring on remote linux server
-
Beena_Jogin
- Posts: 54
- Joined: Fri Jan 22, 2016 4:58 am
Re: httpd process monitoring on remote linux server
Add the server to Nagios XI using the Linux Server wizard and check the box next to httpd towards the bottom of the 'step 2' page (see screenshot below). When finished with the wizard, you can find the check_command under Core Config Manager > Services > Service Description = Apache Web Server, under the Actions column click 'View Text Config'
the check_command will show up as:
check_nrpe!check_init_service!-a 'httpd'
.
the check_command will show up as:
check_nrpe!check_init_service!-a 'httpd'
.
You do not have the required permissions to view the files attached to this post.
Be sure to check out the Knowledgebase for helpful articles and solutions!
-
Beena_Jogin
- Posts: 54
- Joined: Fri Jan 22, 2016 4:58 am
Re: httpd process monitoring on remote linux server
Thanks,
I configured this.
But we want to know the total count of httpd process running and if it exceeds a certain value like 50, it should giving warning notification and if it reached 250 it should be critical.
How can this be done?
Can we write a custom service for this?
Thanks,
Beena
I configured this.
But we want to know the total count of httpd process running and if it exceeds a certain value like 50, it should giving warning notification and if it reached 250 it should be critical.
How can this be done?
Can we write a custom service for this?
Thanks,
Beena
Re: httpd process monitoring on remote linux server
Verify that you have the following command defined in the nrpe.cfg or common.cfg file on the client (remote box):
BTW, what is the version of the check_procs plugin that you are currently using?
Test your check from the command line on the Nagios XI server:
If it works as expected, modify your current check or create a new service. Let us know if you have any more questions/issues.
Code: Select all
command[check_procs]=/usr/local/nagios/libexec/check_procs $ARG1$Code: Select all
/usr/local/nagios/libexec/check_procs -VCode: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_procs -a '-a httpd -w 50 -c 250'Be sure to check out our Knowledgebase for helpful articles and solutions!
-
Beena_Jogin
- Posts: 54
- Joined: Fri Jan 22, 2016 4:58 am
Re: httpd process monitoring on remote linux server
Thanks for this. It worked. It is giving me 9 procs.
But in the remote host it shows as 10.
I am wondering if the command
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_procs -a '-a httpd -w 50 -c 250'
takes into account Apache web server?
Thanks,
Beena
But in the remote host it shows as 10.
I am wondering if the command
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_procs -a '-a httpd -w 50 -c 250'
takes into account Apache web server?
Thanks,
Beena
Re: httpd process monitoring on remote linux server
You could give this plugin a try:
https://github.com/willemdh/check_lin_process
I allows you to add min and max for a process and it also returns memory and cpu usage in percentage.
Grtz
https://github.com/willemdh/check_lin_process
I allows you to add min and max for a process and it also returns memory and cpu usage in percentage.
Grtz
Nagios XI 5.8.1
https://outsideit.net
https://outsideit.net
Re: httpd process monitoring on remote linux server
Thanks @WillemDH!
@Beena_Jogin - can you show us the full output of a ps -ef on the remote machine, and the full input / output of the command running on Nagios? It might be counting using grep.
@Beena_Jogin - can you show us the full output of a ps -ef on the remote machine, and the full input / output of the command running on Nagios? It might be counting using grep.
Former Nagios Employee
Re: httpd process monitoring on remote linux server
I am not sure how this is possible... The "check_nrpe" calls "check_procs" command, which is run locally on the client. Running this command on the client (remote box):Thanks for this. It worked. It is giving me 9 procs.
But in the remote host it shows as 10.
Code: Select all
/usr/local/nagios/libexec/check_procs -a httpdCode: Select all
/usr/local/nagios/libexec/check_nrpe -H <client ip> -c check_procs -a '-a httpd'BTW, you can also give Willem's plugin a try to see if it is going to work better.
Let us know if we answered your questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!