QUESTION: check_http and multiple instances of apache
QUESTION: check_http and multiple instances of apache
Greetings,
I have a server with several virtual interfaces. Each interface is tied to an apache instance. If I want to monitor them with nagios, would I have to create a check_http command for each individual interface? Also, this is being performed by check_nrpe
i.e.
command[check_http].....
command[check_http_vnic1]...
command[check_http_vnic2]...
etc...
I am only interested that apache is running and responding but don't want to do a website check as the front end is load balanced and could either go to two different servers. So I need to ensure that I am checking on each server that the service is running.
Any advice on the best way to accomplish this is appreciated. Thanks in advance.,
Jeff
I have a server with several virtual interfaces. Each interface is tied to an apache instance. If I want to monitor them with nagios, would I have to create a check_http command for each individual interface? Also, this is being performed by check_nrpe
i.e.
command[check_http].....
command[check_http_vnic1]...
command[check_http_vnic2]...
etc...
I am only interested that apache is running and responding but don't want to do a website check as the front end is load balanced and could either go to two different servers. So I need to ensure that I am checking on each server that the service is running.
Any advice on the best way to accomplish this is appreciated. Thanks in advance.,
Jeff
Re: QUESTION: check_http and multiple instances of apache
You'll have to use NRPE for sure with check_procs and use the -C flag which will cause check_procs to look for processes started using the EXACT -C arguments, so to test to see if Nagios was started with the config in /etc/nagios.cfg rather than /usr/local/nagios/etc/nagios.cfg we would enter
check_procs -C 'nagios -c /etc/nagios.cfg'
check_procs -C 'nagios -c /etc/nagios.cfg'
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: QUESTION: check_http and multiple instances of apache
I have to monitoring process ora_pmon_sinamp. The process is running in the machine (HPUX):
oracle 28067 1 0 02:48:37 ? 0:03 ora_pmon_sinamp
but, when I executed command:
/opt/iexpress/nagios/libexec/check_procs -C 'ora_pmon_sinamp'
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
How I can monitoring this process?
Regards.
oracle 28067 1 0 02:48:37 ? 0:03 ora_pmon_sinamp
but, when I executed command:
/opt/iexpress/nagios/libexec/check_procs -C 'ora_pmon_sinamp'
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
How I can monitoring this process?
Regards.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: QUESTION: check_http and multiple instances of apache
Are you executing this command from the same machine as the process in running?msanbrug wrote:I have to monitoring process ora_pmon_sinamp. The process is running in the machine (HPUX):
oracle 28067 1 0 02:48:37 ? 0:03 ora_pmon_sinamp
but, when I executed command:
/opt/iexpress/nagios/libexec/check_procs -C 'ora_pmon_sinamp'
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
How I can monitoring this process?
Regards.
Re: QUESTION: check_http and multiple instances of apache
Type in terminal (on the target machine):
to make sure the process is running.
Next, edit your "check_local_procs" command definition in the "commands.cfg" file:
Change it from: "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$" to "$USER1$/check_procs -w $ARG1$ -c $ARG2$ -a $ARG3$"
Check if you can monitor this process locally:
If you succeed, you can type in terminal (on your Nagios server):
You can also add arguments for warning and critical, for example:
Once you make it work from the command line, you can deal with the web interface. This document may help you with this:
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Code: Select all
# ps -ef | grep ora_pmon_sinamp
Next, edit your "check_local_procs" command definition in the "commands.cfg" file:
Code: Select all
# vi /usr/local/nagios/etc/commands.cfgCheck if you can monitor this process locally:
Code: Select all
# /usr/local/nagios/libexec/check_procs -a ora_pmon_sinampCode: Select all
# /usr/local/nagios/libexec/check_nrpe -H <your_target_machine_IP_address> -t 30 -c check_procs -a '-a ora_pmon_sinamp'Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H <your_target_machine_IP_address> -t 30 -c check_procs -a '-w 5 -c 10 -a ora_pmon_sinamp'http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: QUESTION: check_http and multiple instances of apache
I probed this, but appear process is down. I see that in HPUX, not correctly ps:
When I do ps -el:
1401 S 30208 1023 1 0 154 20 e0040100009c4380 25741 e00000019b2292e8 ? 0:02 oracle
If i do export UNIX95=1
1401 S 30208 11276 1 0 154 20 e000000198924c80 25689 e000000144cee080 ? 00:00:00 ora_pmon_sinamp
but if i do:
command[check_procs_pmon_sinamp]=export UNIX95=1;/opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
If I defined in nrpe.cfg:
export UNIX95=1
command[check_procs_pmon_sinamp]=/opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
Appear this:
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
Any idea?
When I do ps -el:
1401 S 30208 1023 1 0 154 20 e0040100009c4380 25741 e00000019b2292e8 ? 0:02 oracle
If i do export UNIX95=1
1401 S 30208 11276 1 0 154 20 e000000198924c80 25689 e000000144cee080 ? 00:00:00 ora_pmon_sinamp
but if i do:
command[check_procs_pmon_sinamp]=export UNIX95=1;/opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
If I defined in nrpe.cfg:
export UNIX95=1
command[check_procs_pmon_sinamp]=/opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
Appear this:
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
Any idea?
Re: QUESTION: check_http and multiple instances of apache
Try this command:
or
Let me know if this works.
Code: Select all
command[check_procs_pmon_sinamp]= UNIX95= /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinampCode: Select all
command[check_procs_pmon_sinamp]= UNIX95=1 /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinampBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: QUESTION: check_http and multiple instances of apache
I probed this but is not correctly:
/opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
UNIX95=1 /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
Any idea?
Regards.
/opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
UNIX95=1 /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
Any idea?
Regards.
Re: QUESTION: check_http and multiple instances of apache
Excuse me, I was wrong when he wrote.I probed two options:
UNIX95= /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
UNIX95=1 /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
And the output:
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
I add too in nrpe.cfg, but the output is the same.
Thanks,
UNIX95= /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
UNIX95=1 /opt/iexpress/nagios/libexec/check_procs -C ora_pmon_sinamp
And the output:
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
I add too in nrpe.cfg, but the output is the same.
Thanks,
Re: QUESTION: check_http and multiple instances of apache
Is this process running? Can you run a test against a different process, that is running for sure?
Be sure to check out our Knowledgebase for helpful articles and solutions!