Monitoring HTTPD

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: Monitoring HTTPD

Post by donnyforbes »

if this works from the remote server and the Nagios server how do I now add it in the NagiosXI console?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring HTTPD

Post by lmiltchev »

On the remote server, you can set the following command in the nrpe.cfg file (if you don't have it already):

Code: Select all

command[check_procs]=/usr/local/nagios/libexec/check_procs $ARG1$
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:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <remote ip> -c check_procs -a '-c 1: -C httpd'
If it works as expected, set up a service in Nagios XI.

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

Post by donnyforbes »

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]#
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring HTTPD

Post by lmiltchev »

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

Post by donnyforbes »

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.
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

Post by donnyforbes »

I got it figured out thanks. I added this in $ARG1$ check_procs -a '-c 1: -C httpd'

we are good now.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Monitoring HTTPD

Post by lmiltchev »

Great! I am glad I could help!

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

Post by donnyforbes »

Sure you can close this. Again thanks for your assistance.
Locked