How to monitor httpd service using nrpe agent?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

How to monitor httpd service using nrpe agent?

Post by ikekim »

I have Nagios XI installed and it is currently monitoring remote Centos 7.x machine using NRPE agent.

I used the configuration wizard and I was able to add the IP address of this host and I can monitor the basics like CPU, Disk, Memory, Ping, etc.

Now I just installed and running apache service on that target machine so how do I reconfigure this setting on the Nagios XI Server so I can monitor the status of the Apache Services?


thanks,
ik
dwasswa

Re: How to monitor httpd service using nrpe agent?

Post by dwasswa »

Hi @ikekim,

You can monitor apache service using a plugin called

Code: Select all

check_apachestatus.pl
.

A Nagios plugin that parses the status page of an apache server, the plugin returns the response time, the amount of idle, busy and open slots. The perfdata returns the status of all slots. Optionally you can specify how much slots should be available.

Code: Select all

Usage: /usr/local/nagios/libexec/check_apachestatus.pl -H -p -t -w -c -V
-h, --help
print this help message
-H, --hostname=HOST
name or IP address of host to check
-p, --port=PORT
Http port
-t, --timeout=INTEGER
timeout in seconds (Default: 15)
-w, --warn=MIN
number of available slots that will cause a warning
-1 for no warning
-c, --critical=MIN
number of available slots that will cause an error
-V, --version
prints version number
Note :
The script will return

* Without warn and critical options:

OK if we are able to connect to the apache server's status page,
CRITICAL if we aren't able to connect to the apache server's status page,,

* With warn and critical options:

OK if we are able to connect to the apache server's status page and #available slots > ,
WARNING if we are able to connect to the apache server's status page and #available slots
Please follow this guide..Manage Plugins to install and manage plugins on Nagios xi.

Please let me know if toy have any questions.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: How to monitor httpd service using nrpe agent?

Post by ikekim »

thanks for the response...I read through the how to use plugin.

But if I just want to monitor just the "httpd" service on a remote machine, how do I do this?


thanks.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to monitor httpd service using nrpe agent?

Post by npolovenko »

@ikekim, Basically, this plugin checks if httpd is running by trying to access the apache status page. If the page is up than the apache httpd IS running. If you want to make it simple you can run:

Code: Select all

check_apachestatus.pl -H YourIPhere -p 80
(port 80 is a default apache port but you can double check yours in the apache config file).
You can also check Nagios exchange https://exchange.nagios.org for an alternative plugin that would use a different parametrs to check httpd.
Also, let us know if you need help running that plugin using NRPE.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dwasswa

Re: How to monitor httpd service using nrpe agent?

Post by dwasswa »

Hi @ikekim,

Here is how to get this done:

1.Make sure you have the plugin

Code: Select all

check_apachestatus.pl
uploaded on the remote machine is this folder:

Code: Select all

/usrl/local/nagios/libexec
.
The folder

Code: Select all

/usrl/local/nagios/libexec
is created when you install nrpe on your remote host.

2.The follow this guide to add the service..service management

Let me know if you have any questions
Locked