Page 1 of 1
How to monitor httpd service using nrpe agent?
Posted: Tue Oct 03, 2017 2:34 pm
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
Re: How to monitor httpd service using nrpe agent?
Posted: Tue Oct 03, 2017 3:32 pm
by dwasswa
Hi
@ikekim,
You can monitor apache service using a plugin called
.
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.
Re: How to monitor httpd service using nrpe agent?
Posted: Wed Oct 04, 2017 1:32 pm
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.
Re: How to monitor httpd service using nrpe agent?
Posted: Wed Oct 04, 2017 2:04 pm
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.
Re: How to monitor httpd service using nrpe agent?
Posted: Wed Oct 04, 2017 3:16 pm
by dwasswa
Hi
@ikekim,
Here is how to get this done:
1.Make sure you have the plugin
uploaded on the remote machine is this folder:
.
The folder
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