Hello,
I'm having an issue where check_procs doesn't pick up an unusual process name. Is there a workaround or is this a true bug?
This is happening with plugin v1.5, 2.2.1 and v2.3.3 on CentOS 8.1
Here's the process name, the failing check command and successful check of another process on the same host:
Process:
# ps -ef | grep smokeping
root 2099 1 0 May04 ? 00:01:37 /usr/local/smokeping/bin/smokeping [FPing]
Failed check:
# /usr/local/nagios-plugins-2.3.3/libexec/check_procs -C smokeping
PROCS OK: 0 processes with command name 'smokeping' | procs=0;;;0;
Successful check of another proc:
# /usr/local/nagios-plugins-2.3.3/libexec/check_procs -C smsd
PROCS OK: 2 processes with command name 'smsd' | procs=2;;;0;
Thanks for any positive input on this.
check_procs problem /bug?
Re: check_procs problem /bug?
Hi Myootnt!
I see what you mean...
Nope.
How about...
Still nope.
Maybe a regex?
Aha!
Give that a try!
Code: Select all
[root@jpd-nagiosxi-one etc]# ps waux | grep smokepi
root 63575 0.0 1.4 318452 27804 ? Ss 15:50 0:00 /opt/smokeping-2.7.3/bin/smokeping [FPing]
root 63774 0.0 0.0 112712 968 pts/1 S+ 15:51 0:00 grep --color=auto smokepi
Code: Select all
[root@jpd-nagiosxi-one etc]# /usr/local/nagios/libexec/check_procs -C smokeping
PROCS OK: 0 processes with command name 'smokeping' | procs=0;;;0;
Nope.
How about...
Code: Select all
[root@jpd-nagiosxi-one etc]# /usr/local/nagios/libexec/check_procs -C "smokeping [FPing]"
PROCS OK: 0 processes with command name 'smokeping [FPing]' | procs=0;;;0;
[root@jpd-nagiosxi-one etc]# /usr/local/nagios/libexec/check_procs -C FPing
PROCS OK: 0 processes with command name 'FPing' | procs=0;;;0;
[root@jpd-nagiosxi-one etc]#
Maybe a regex?
Code: Select all
[root@jpd-nagiosxi-one etc]# /usr/local/nagios/libexec/check_procs --ereg-argument-array='.*smoke.*'
PROCS OK: 1 process with regex args '.*smoke.*' | procs=1;;;0;
Give that a try!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_procs problem /bug?
Thanks! My own attempt at something similar had failed.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: check_procs problem /bug?
HI
No problem, it sounds like you got it working. Shall we close out this thread?Thanks! My own attempt at something similar had failed.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_procs problem /bug?
Go head and close it. Thanks again.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: check_procs problem /bug?
Excellent! Thanks for visiting the Nagios Community Forum.Go head and close it. Thanks again.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!