Module: check_mk
Branch: master
Commit: 0bd4f33fe5feb38c5fea0482dc782c362f2f931c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0bd4f33fe5feb3…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Sep 23 13:34:14 2013 +0200
added documentation of the new, dict based configuration to check manpage of ps and
ps.perf
---
checkman/ps | 27 +++++++++++++++++++++++++++
checkman/ps.perf | 2 ++
2 files changed, 29 insertions(+)
diff --git a/checkman/ps b/checkman/ps
index 7b7c5a5..d0dc807 100644
--- a/checkman/ps
+++ b/checkman/ps
@@ -78,6 +78,20 @@ examples:
# make sure exactly one ntpd is running
( "somehost", "ps", "NTP", ( "/usr/sbin/ntpd",
1, 1, 1, 1 ) ),
+ # or this can be done with the new, dictionary based
+ # syntax; in this case additional parameters cpulevels and
+ # cpu_average can be passed
+ ( 'somehost', 'ps', 'NTP', {
+ 'process': '/usr/sbin/ntpd',
+ 'user': 'ntp',
+ 'warnmin': 1,
+ 'warnmax': 1,
+ 'okmin': 1
+ 'okmax': 1,
+ 'cpulevels': (90.0, 98.0),
+ 'cpu_average': 15,
+ }),
+
# the same, but for all hosts with the tag "lnx"
( ["lnx"], ALL_HOSTS, "ps", "NTPD", (
"/usr/sbin/ntpd", 1, 1, 1, 1 ) ),
@@ -143,3 +157,16 @@ okmin (int): Minimum number for OK state
okmax (int): Maximum number for OK state
warnmax (int): Maximum number for WARNING state. Counts less than warnmin or greater
than
warnmax are CRITICAL
+
+parameters (dict): Or the parameters can be given in the new, dictionary based syntax
+ with the elements below.
+ In this case additional parameters cpulevels and cpu_average can be passed.
+
+{"process"}: procname, see above
+{"user"}: see above
+{"warnmin"}: see above
+{"warnmax"}: see above
+{"okmin"}: see above
+{"okmax"}: see above
+{"cpulevels"}: (float, float): levels of CPU usage for {WARN} and {CRIT} in
percent
+{"cpu_average"}: int: build average over CPU usage for the given time in
minutes
diff --git a/checkman/ps.perf b/checkman/ps.perf
index b1a0231..a45e3cd 100644
--- a/checkman/ps.perf
+++ b/checkman/ps.perf
@@ -28,6 +28,8 @@ inventory:
[parameters]
params (5 or 6 tuple): Please refer to {ps} for information about the parameters.
+parameters (dict): or the parameters can be given in the new, dictionary based syntax.
+ Please refer to {ps} for information about the parameters.
[configuration]
inventory_processes_perf (list): A list of 7-tuples. See {ps} for details.