From 41c0148e72e47e1e9af923badd51241b48c9bb15 Mon Sep 17 00:00:00 2001 From: Silas <67681686+Tqnsls@users.noreply.github.com> Date: Tue, 29 Apr 2025 11:56:17 +0200 Subject: [PATCH] Include "procs-to-show" to ITL check_load command --- doc/10-icinga-template-library.md | 21 +++++++++++---------- itl/command-plugins.conf | 4 ++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 773a9924e..6ae7a926f 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -913,16 +913,17 @@ tests the current system load average. Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters): -Name | Description -----------------|-------------- -load_wload1 | **Optional.** The 1-minute warning threshold. Defaults to 5. -load_wload5 | **Optional.** The 5-minute warning threshold. Defaults to 4. -load_wload15 | **Optional.** The 15-minute warning threshold. Defaults to 3. -load_cload1 | **Optional.** The 1-minute critical threshold. Defaults to 10. -load_cload5 | **Optional.** The 5-minute critical threshold. Defaults to 6. -load_cload15 | **Optional.** The 15-minute critical threshold. Defaults to 4. -load_percpu | **Optional.** Divide the load averages by the number of CPUs (when possible). Defaults to false. -load_extra_opts | **Optional.** Read extra plugin options from an ini file. +Name | Description +-------------------|-------------- +load_wload1 | **Optional.** The 1-minute warning threshold. Defaults to 5. +load_wload5 | **Optional.** The 5-minute warning threshold. Defaults to 4. +load_wload15 | **Optional.** The 15-minute warning threshold. Defaults to 3. +load_cload1 | **Optional.** The 1-minute critical threshold. Defaults to 10. +load_cload5 | **Optional.** The 5-minute critical threshold. Defaults to 6. +load_cload15 | **Optional.** The 15-minute critical threshold. Defaults to 4. +load_percpu | **Optional.** Divide the load averages by the number of CPUs (when possible). Defaults to false. +load_procs_to_show | **Optional.** Number of processes to show when printing the top consuming processes. (Default value is 0) +load_extra_opts | **Optional.** Read extra plugin options from an ini file. ### mailq diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 06246bbe6..ed8fa5b3c 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -2000,6 +2000,10 @@ object CheckCommand "load" { set_if = "$load_percpu$" description = "Divide the load averages by the number of CPUs (when possible)" } + "-n" = { + value = "$load_procs_to_show$" + description = "Number of processes to show when printing the top consuming processes. (Default value is 0)" + } } vars.load_wload1 = 5.0