check_procs problem /bug?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
myootnt
Posts: 3
Joined: Fri May 22, 2020 2:56 pm

check_procs problem /bug?

Post by myootnt »

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.
User avatar
jdunitz
Posts: 235
Joined: Wed Feb 05, 2020 2:50 pm

Re: check_procs problem /bug?

Post by jdunitz »

Hi Myootnt!

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
I see what you mean...

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]# 
Still nope.

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;
Aha!
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!
myootnt
Posts: 3
Joined: Fri May 22, 2020 2:56 pm

Re: check_procs problem /bug?

Post by myootnt »

Thanks! My own attempt at something similar had failed.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: check_procs problem /bug?

Post by benjaminsmith »

HI
Thanks! My own attempt at something similar had failed.
No problem, it sounds like you got it working. Shall we close out this thread?
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!
myootnt
Posts: 3
Joined: Fri May 22, 2020 2:56 pm

Re: check_procs problem /bug?

Post by myootnt »

Go head and close it. Thanks again.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: check_procs problem /bug?

Post by benjaminsmith »

Go head and close it. Thanks again.
Excellent! Thanks for visiting the Nagios Community Forum.
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!
Locked