Monitoring HTTPD
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Monitoring HTTPD
Informix run something called OAT which is really HTTPD. I want to monitor this on my linux server. What is the best way to do this.
Basically I need to be notified when the service is not running...
Basically I need to be notified when the service is not running...
Re: Monitoring HTTPD
Do you have an agent installed on the Informix machine? Are you currently monitoring it (for example via NCPA, NRPE, SNMP, etc.)? I would recommend trying NCPA first if you haven't done this already.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitoring HTTPD
Piggy-backing off @lmiltchev, NCPA makes checking the status of some init unit/service pretty easy:donnyforbes wrote:Basically I need to be notified when the service is not running...
https://www.nagios.org/ncpa/help.php#ap ... s-services
More general purpose info about checking init systems:
https://support.nagios.com/kb/article/s ... s-775.html
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Monitoring HTTPD
Thanks Matt!
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
Yes on this Linux Machine that I want to monitored httpd on we are using NRPE. Please give me detail on how to monitor httpd.
On the same machine I am monitor connection manager and informix that is working as well. I just need to get httpd monitored now.
Please advise.
Thanks
On the same machine I am monitor connection manager and informix that is working as well. I just need to get httpd monitored now.
Please advise.
Thanks
Re: Monitoring HTTPD
You can try using the check_procs plugin. Test the plugin first by running it locally (on the remote box):
The check should turn critical if less than 1 process, called "OAT" is found. I am not sure if this is the actual name of the process - can't test it in-house. What do you see when you run "ps -ef" from the CLI?
Code: Select all
/path/to/check_procs -c 1: -C OATBe 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
ok do I test from the remote servers running informix or from the nagios server itself?
Here is what I see
0:05:56 /usr/infx1210fc8/OAT/Apache_2.4.2/bin/httpd -f /usr/infx1210fc8/OAT/Apache_2.4.2/conf/httpd.conf -k start
Here is what I see
0:05:56 /usr/infx1210fc8/OAT/Apache_2.4.2/bin/httpd -f /usr/infx1210fc8/OAT/Apache_2.4.2/conf/httpd.conf -k start
Code: Select all
root 55448 1 0 Nov05 ? 00:00:50 /usr/infx1210fc8/OAT/Apache_2.4.2/bin/httpd -f /usr/infx1210fc8/OAT/Apache_2.4.2/conf/httpd.conf -k start
daemon 55449 55448 0 Nov05 ? 00:05:44 /usr/infx1210fc8/OAT/Apache_2.4.2/bin/httpd -f /usr/infx1210fc8/OAT/Apache_2.4.2/conf/httpd.conf -k start
daemon 55450 55448 0 Nov05 ? 00:05:45 /usr/infx1210fc8/OAT/Apache_2.4.2/bin/httpd -f /usr/infx1210fc8/OAT/Apache_2.4.2/conf/httpd.conf -k start
daemon 55451 55448 0 Nov05 ? 00:05:47 /usr/infx1210fc8/OAT/Apache_2.4.2/bin/httpd -f /usr/infx1210fc8/OAT/Apache_2.4.2/conf/httpd.conf -k startRe: Monitoring HTTPD
Test running the plugin on the remove machine first, in order to make sure it works locally.
What is the output of the following command, run as root and as nagios user?
What is the output of the following command, run as root and as nagios user?
Code: Select all
/path/to/check_procs -c 1: -C httpdBe 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
How can I find the path to check_procs? is there a default one?lmiltchev wrote:Test running the plugin on the remove machine first, in order to make sure it works locally.
What is the output of the following command, run as root and as nagios user?
Code: Select all
/path/to/check_procs -c 1: -C httpd
Thanks
-
donnyforbes
- Posts: 357
- Joined: Tue Jun 13, 2017 2:17 pm
Re: Monitoring HTTPD
Ok here is the output from the remote server...
output from NAGIOS Server
Code: Select all
[root@huey ~]# /usr/local/nagios/libexec/check_procs -c 1: -C httpd
PROCS OK: 5 processes with command name 'httpd' | procs=5;;1:;0;
[root@huey ~]#Code: Select all
[root@huey libexec]# su - nagios
Last login: Mon Nov 19 14:17:05 PST 2018 on pts/0
[nagios@huey ~]$ /usr/local/nagios/libexec/check_procs -c 1: -C httpd
PROCS OK: 5 processes with command name 'httpd' | procs=5;;1:;0;
[nagios@huey ~]$Code: Select all
[root@nag libexec]# /usr/local/nagios/libexec/check_procs -c 1: -C httpd
PROCS OK: 11 processes with command name 'httpd' | procs=11;;1:;0;
You have mail in /var/spool/mail/root
[root@nag libexec]#