[Nagiosplug-devel] [ nagiosplug-Feature Requests-3088023 ] check_procs Process State Matching

SourceForge.net noreply at sourceforge.net
Fri Oct 15 12:38:56 CEST 2010


Feature Requests item #3088023, was opened at 2010-10-15 12:38
Message generated for change (Tracker Item Submitted) made by j-bern
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3088023&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: J. Bern (j-bern)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs Process State Matching

Initial Comment:
[Checked with 1.4.14 on CentOS 5.5]

SUMMARY: Please provide state-matching options better suited for multi-character "stat" fields in the "ps" output.

DETAILS: check_procs.c effectively does the state matching with a strstr(command_line_parameter,stat_field_of_ps_output). That's OK for platforms where the state is a single character, like the "S", "R", etc. mentioned in the plugin's online help. Linux, and supposedly several more platforms, however use multi-character not-fully-specified-order states:

# ./check_procs -vv | grep '^Ma[t]ched:' | sed -e 's/.* \(stat=[^ ]*\) .*/\1/' | sort -u | tr '\n' ' '
stat=R stat=R+ stat=RN stat=Rs stat=S stat=S< stat=S+ stat=SLs stat=SN stat=Ss stat=S<s stat=Ss+ stat=Ssl stat=S<sl

EXAMPLE 1: check_procs *cannot* match Nagios' own master process (stat=Ssl or Rsl; there should be only one!)  without matching all its temp children (stat=S or R) as well.

EXAMPLE 2: To match "all nonblocked processes" (state=R* or S*, as opposed to D*, T*, or Z*), one would have to construct an "-s" parameter which contains all possible variations as explicit substrings ... which is prohibitive.

SUGGESTION (if I may): Two new options which implement "*all* characters from stat must appear in parameter" and "*one* character from stat needs to appear in parameter" and can be combined would IMHO go a long way.

WHY AM I NOT DOING THIS MYSELF: Sorry, Linux is currently the only platform I have available ...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3088023&group_id=29880




More information about the Devel mailing list