Monitoring HTTPD
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Monitoring HTTPD
if this works from the remote server and the Nagios server how do I now add it in the NagiosXI console?
Re: Monitoring HTTPD
On the remote server, you can set the following command in the nrpe.cfg file (if you don't have it already):
and restart NRPE, so that changes can take effect.
Test your check by running the following command from the command line on the Nagios XI server:
If it works as expected, set up a service in Nagios XI.
Example config:
Code: Select all
command[check_procs]=/usr/local/nagios/libexec/check_procs $ARG1$Test your check by running the following command from the command line on the Nagios XI server:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <remote ip> -c check_procs -a '-c 1: -C httpd'Example config:
Code: Select all
define service {
host_name myhost
service_description Procs HTTPD
use xiwizard_nrpe_service
check_command check_nrpe!check_procs!-a '-c: 1 -C httpd'
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
notifications_enabled 1
contacts nagiosadmin
_xiwizard linux-server
register 1
}Be sure to check out our Knowledgebase for helpful articles and solutions!
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Monitoring HTTPD
here is the output. looks like it ran
Code: Select all
[root@nag libexec]# /usr/local/nagios/libexec/check_nrpe -H 192.168.1.42 -c check_procs -a '-c 1: -C httpd'
PROCS OK: 5 processes with command name 'httpd' | procs=5;;1:;0;
You have mail in /var/spool/mail/root
[root@nag libexec]#
Re: Monitoring HTTPD
Yeah, it seems like it's working as expected. Try stopping the httpd process on the remote server, and test your check again. You should get a "critical".
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Monitoring HTTPD
I don't see where to put this in at.
check_nrpe!check_procs!-a '-c: 1 -C httpd'
I have done what you asked just not sure what to put in $ARG! etc.. Please advise or show me if you can.
check_nrpe!check_procs!-a '-c: 1 -C httpd'
I have done what you asked just not sure what to put in $ARG! etc.. Please advise or show me if you can.
You do not have the required permissions to view the files attached to this post.
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Monitoring HTTPD
I got it figured out thanks. I added this in $ARG1$ check_procs -a '-c 1: -C httpd'
we are good now.
we are good now.
Re: Monitoring HTTPD
Great! I am glad I could help!
Is it OK if we close this topic now?
Is it OK if we close this topic now?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Monitoring HTTPD
Sure you can close this. Again thanks for your assistance.