Skip to content

support for check_procs argument --exclude-process #10226

@bittorf

Description

@bittorf

There is already support in the command, but not using the icinga2-config-syntax:
https://icinga.com/docs/icinga-2/latest/doc/10-icinga-template-library/#procs

[icinga@box ~]$ /usr/lib64/nagios/plugins/check_procs --help
...
Usage:
check_procs -w <range> -c <range> [-m metric] [-s state] [-p ppid] [-j jid]
 [-u user] [-r rss] [-z vsz] [-P %cpu] [-a argument-array]
 [-C command] [-X process_to_exclude] [-k] [-t timeout] [-v]
...
 -X, --exclude-process
   Exclude processes which match this comma separated list

It seems there is no variable defined for setting this argument:

bbittorf@laptop:~/icinga2[master] :)$ git grep "procs"| grep "md:procs"

doc/10-icinga-template-library.md:procs_warning        | **Optional.** The process count warning threshold. Defaults to 250.
doc/10-icinga-template-library.md:procs_critical       | **Optional.** The process count critical threshold. Defaults to 400.
doc/10-icinga-template-library.md:procs_metric         | **Optional.** Check thresholds against metric.
doc/10-icinga-template-library.md:procs_timeout        | **Optional.** Seconds before plugin times out.
doc/10-icinga-template-library.md:procs_traditional    | **Optional.** Filter own process the traditional way by PID instead of /proc/pid/exe. Defaults to false.
doc/10-icinga-template-library.md:procs_state          | **Optional.** Only scan for processes that have one or more of the status flags you specify.
doc/10-icinga-template-library.md:procs_ppid           | **Optional.** Only scan for children of the parent process ID indicated.
doc/10-icinga-template-library.md:procs_vsz            | **Optional.** Only scan for processes with VSZ higher than indicated.
doc/10-icinga-template-library.md:procs_rss            | **Optional.** Only scan for processes with RSS higher than indicated.
doc/10-icinga-template-library.md:procs_pcpu           | **Optional.** Only scan for processes with PCPU higher than indicated.
doc/10-icinga-template-library.md:procs_user           | **Optional.** Only scan for processes with user name or ID indicated.
doc/10-icinga-template-library.md:procs_argument       | **Optional.** Only scan for processes with args that contain STRING.
doc/10-icinga-template-library.md:procs_argument_regex | **Optional.** Only scan for processes with args that contain the regex STRING.
doc/10-icinga-template-library.md:procs_command        | **Optional.** Only scan for exact matches of COMMAND (without path).
doc/10-icinga-template-library.md:procs_nokthreads     | **Optional.** Only scan for non kernel threads. Defaults to false.
doc/10-icinga-template-library.md:procs\_win\_warn | **Optional**. The warning threshold.
doc/10-icinga-template-library.md:procs\_win\_crit | **Optional**. The critical threshold.
doc/10-icinga-template-library.md:procs\_win\_user | **Optional**. Count this users processes.

Metadata

Metadata

Assignees

Labels

area/itlTemplate Library CheckCommandsenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions