exclude kernel processes from check_procs?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
alex_gottschalk
Posts: 2
Joined: Thu Jun 06, 2013 12:24 pm

exclude kernel processes from check_procs?

Post by alex_gottschalk »

Is it possible to exclude kernel processes (threads?) from the count made by check_procs plugin? Userland process count is a useful metric, but combined user+kernel is much less so. Also the number of kernel processes scales with the core count of the host, so it's currently very difficult to set a sane default.

For example:

Code: Select all

alex@host:~
:-) $ ps aux | wc -l
284

alex@host:~
:-) $ ps aux | grep -v ]$ | wc -l
54
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: exclude kernel processes from check_procs?

Post by tmcdonald »

https://www.nagios-plugins.org/doc/man/check_procs.html

Throw in the -k (--no-kthreads == no kernel threads) option and that should work.
Former Nagios employee
alex_gottschalk
Posts: 2
Joined: Thu Jun 06, 2013 12:24 pm

Re: exclude kernel processes from check_procs?

Post by alex_gottschalk »

That flag doesn't appear to be in the version of check_procs distributed with Ubuntu 12.04 or CentOS 6.4.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: exclude kernel processes from check_procs?

Post by abrist »

You are correct. You may need to build the newest plugins from source. My suggestions is to not install all the plugins (once compiled), but to copy the one you need to a slightly different name in the libexec folder (as some of the new plugins may have issues with your currently configured checks).
https://www.nagios-plugins.org/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked