QUESTION: check_http and multiple instances of apache
Re: QUESTION: check_http and multiple instances of apache
Yes, the process is running
oracle 4604 1 0 02:50:20 ? 0:02 ora_pmon_sinamp
nagios 5276 5255 0 09:16:50 pts/1 0:00 grep ora_pmon_sinamp
oracle 4604 1 0 02:50:20 ? 0:02 ora_pmon_sinamp
nagios 5276 5255 0 09:16:50 pts/1 0:00 grep ora_pmon_sinamp
Re: QUESTION: check_http and multiple instances of apache
Just to clarify...
When you run:
it shows you that the process is running, right?
But when you run:
it shows you:
When you run:
Code: Select all
# ps -ef | grep ora_pmon_sinampBut when you run:
Code: Select all
# ./check_procs -C ora_pmon_sinampIs this correct?0 processes with command name 'ora_pmon_sinamp'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: QUESTION: check_http and multiple instances of apache
When I executed:
./check_procs -C ora_pmon_sinamp
The output is:
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
and the process is ruuning
./check_procs -C ora_pmon_sinamp
The output is:
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
and the process is ruuning
Re: QUESTION: check_http and multiple instances of apache
What happens, when you run a check against other processes, for example:
or
It is very strange why this process is "not seen", even though it is running... Does "ps" see it? Try again:
and post the output.
Code: Select all
# ./check_procs -C nagiosCode: Select all
# ./check_procs -C httpdCode: Select all
# ps -ef | grep ora_pmon_sinampBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: QUESTION: check_http and multiple instances of apache
This is the output:
$ ./check_procs -C httpd
PROCS OK: 0 processes with command name 'httpd'
$ ps -ef|grep httpd
nagios 19765 5255 0 15:04:11 pts/1 0:00 grep httpd
$ ./check_procs -C nagios
PROCS OK: 0 processes with command name 'nagios'
$ ps -ef|grep nagios
nagios 19907 5255 0 15:06:03 pts/1 0:00 ps -ef
nagios 5255 5253 0 Jan 23 pts/1 0:00 -sh
nagios 19908 5255 0 15:06:03 pts/1 0:00 grep nagios
nagios 5253 5250 0 Jan 23 ? 0:00 sshd: nagios@pts/1
root 5250 1585 0 Jan 23 ? 0:01 sshd: nagios [priv]
$ ps -ef | grep ora_pmon_sinamp
nagios 19791 5255 1 15:04:48 pts/1 0:00 grep ora_pmon_sinamp
oracle 6127 1 0 06:11:39 ? 0:03 ora_pmon_sinamp
$ ./check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
$ ./check_procs -C httpd
PROCS OK: 0 processes with command name 'httpd'
$ ps -ef|grep httpd
nagios 19765 5255 0 15:04:11 pts/1 0:00 grep httpd
$ ./check_procs -C nagios
PROCS OK: 0 processes with command name 'nagios'
$ ps -ef|grep nagios
nagios 19907 5255 0 15:06:03 pts/1 0:00 ps -ef
nagios 5255 5253 0 Jan 23 pts/1 0:00 -sh
nagios 19908 5255 0 15:06:03 pts/1 0:00 grep nagios
nagios 5253 5250 0 Jan 23 ? 0:00 sshd: nagios@pts/1
root 5250 1585 0 Jan 23 ? 0:01 sshd: nagios [priv]
$ ps -ef | grep ora_pmon_sinamp
nagios 19791 5255 1 15:04:48 pts/1 0:00 grep ora_pmon_sinamp
oracle 6127 1 0 06:11:39 ? 0:03 ora_pmon_sinamp
$ ./check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
-
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
You can create a file named /etc/sysconfig/nagios
and add the line
This should add the environment before the plugin runs.
Ref:
http://tracker.nagios.org/view.php?id=24
and add the line
Code: Select all
export UNIX95=1Ref:
http://tracker.nagios.org/view.php?id=24
Re: QUESTION: check_http and multiple instances of apache
Hi,
Thank you for the information, the path /etc/sysconfig/nagios, not exist in my machine that I want monitoring:
nagios@sinampro$ ls -ltr sys*
lr--r--r-- 1 bin bin 19 Jul 18 2008 syslog.pid -> /var/run/syslog.pid
lr-xr-xr-x 1 bin bin 17 Jul 18 2008 syslogd -> /usr/sbin/syslogd
lr-xr-xr-x 1 bin sys 16 Jul 18 2008 sysdef -> /usr/sbin/sysdef
-r--r--r-- 1 bin bin 249 Jul 3 2009 syslog.conf
The machine, where I want monitoring process is HP-UX sinampro B.11.31 U ia64 1219818353 unlimited-user license
Regards
Thank you for the information, the path /etc/sysconfig/nagios, not exist in my machine that I want monitoring:
nagios@sinampro$ ls -ltr sys*
lr--r--r-- 1 bin bin 19 Jul 18 2008 syslog.pid -> /var/run/syslog.pid
lr-xr-xr-x 1 bin bin 17 Jul 18 2008 syslogd -> /usr/sbin/syslogd
lr-xr-xr-x 1 bin sys 16 Jul 18 2008 sysdef -> /usr/sbin/sysdef
-r--r--r-- 1 bin bin 249 Jul 3 2009 syslog.conf
The machine, where I want monitoring process is HP-UX sinampro B.11.31 U ia64 1219818353 unlimited-user license
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
I forgot we were running this command via nrpe.
On the remote machine lets do the following
This should set the UNIX95=1 env for the nagios user which should be what the nrpe on the remote machine runs as.
On the remote machine lets do the following
Code: Select all
su nagios
export UNIX95=1
su - Re: QUESTION: check_http and multiple instances of apache
Hello,
su nagios
export UNIX95=1
su -
I executed env, and variable appear, but if I executed:
/usr/local/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
This failed.
su nagios
export UNIX95=1
su -
I executed env, and variable appear, but if I executed:
/usr/local/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
This failed.
-
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 running this from root, or from the nagios user?msanbrug wrote:Hello,
su nagios
export UNIX95=1
su -
I executed env, and variable appear, but if I executed:
/usr/local/nagios/libexec/check_procs -C ora_pmon_sinamp
PROCS OK: 0 processes with command name 'ora_pmon_sinamp'
This failed.
try
Code: Select all
su nagios -c '/usr/local/nagios/libexec/check_procs -C ora_pmon_sinamp'