check_procs problem /bug?

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

check_procs problem /bug?

Postby myootnt » Fri May 22, 2020 3:15 pm

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

Re: check_procs problem /bug?

Postby jdunitz » Fri May 22, 2020 4:13 pm

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

Re: check_procs problem /bug?

Postby myootnt » Fri May 22, 2020 4:23 pm

Thanks! My own attempt at something similar had failed.
myootnt
 
Posts: 3
Joined: Fri May 22, 2020 2:56 pm

Re: check_procs problem /bug?

Postby benjaminsmith » Tue May 26, 2020 10:49 am

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!
User avatar
benjaminsmith
 
Posts: 2568
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: check_procs problem /bug?

Postby myootnt » Tue May 26, 2020 1:47 pm

Go head and close it. Thanks again.
myootnt
 
Posts: 3
Joined: Fri May 22, 2020 2:56 pm

Re: check_procs problem /bug?

Postby benjaminsmith » Tue May 26, 2020 2:52 pm

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!
User avatar
benjaminsmith
 
Posts: 2568
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul


Return to Community Support

Who is online

Users browsing this forum: No registered users and 15 guests