Module: check_mk
Branch: master
Commit: 86a48219ad32d135dd742ef4a55f250b8661eb77
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=86a48219ad32d1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 17 09:44:26 2011 +0100
FIX: ucd_cpu_load and ucd_cpu_util: make scan function find Rittal
---
ChangeLog | 1 +
checks/ucd_cpu_load | 3 ++-
checks/ucd_cpu_util | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 9c09c03..fe00c57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* FIX: df: fix status in case of critical trend and warning used
* FIX: df: fix display of trend warn/crit in PNP-graph
* FIX: cmctc: fix inventory in case of incomplete entries
+ * FIX: ucd_cpu_load and ucd_cpu_util: make scan function find Rittal
* printer_supply: Changed order of tests. When a printer reports -3 this
is used before the check if maxlevel is -2.
* cisco_locif: The check has been removed. Please switch to if/if64
diff --git a/checks/ucd_cpu_load b/checks/ucd_cpu_load
index 153a71b..f1fa478 100644
--- a/checks/ucd_cpu_load
+++ b/checks/ucd_cpu_load
@@ -51,4 +51,5 @@ snmp_info['ucd_cpu_load'] = ( ".1.3.6.1.4.1.2021.10.1", [ 6 ] )
# of the info area for scanning is not a good idea. It will slow down
# scans for *all* hosts.
snmp_scan_functions['ucd_cpu_load'] = \
- lambda oid: "linux" in oid(".1.3.6.1.2.1.1.1.0").lower()
+ lambda oid: "linux" in oid(".1.3.6.1.2.1.1.1.0").lower() or \
+ "CMC-TC" in oid(".1.3.6.1.2.1.1.1.0")
diff --git a/checks/ucd_cpu_util b/checks/ucd_cpu_util
index 02cfd4a..9cca8a5 100644
--- a/checks/ucd_cpu_util
+++ b/checks/ucd_cpu_util
@@ -90,4 +90,5 @@ snmp_info['ucd_cpu_util'] = ( ".1.3.6.1.4.1.2021.11", [ 50, 51, 52, 53, 54, 55,
# of the info area for scanning is not a good idea. It will slow down
# scans for *all* hosts.
snmp_scan_functions['ucd_cpu_util'] = \
- lambda oid: "linux" in oid(".1.3.6.1.2.1.1.1.0").lower()
+ lambda oid: "linux" in oid(".1.3.6.1.2.1.1.1.0").lower() or \
+ "CMC-TC" in oid(".1.3.6.1.2.1.1.1.0")
Module: check_mk
Branch: master
Commit: a1b0c5a5c32d6c9ea59a7e9834e3582e82b9bea3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a1b0c5a5c32d6c…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 17 09:46:00 2011 +0100
FIX: ucd_cpu_util: fix check in case of missing hi, si and st
---
ChangeLog | 1 +
checks/ucd_cpu_util | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fe00c57..8bfd637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,7 @@
* FIX: df: fix display of trend warn/crit in PNP-graph
* FIX: cmctc: fix inventory in case of incomplete entries
* FIX: ucd_cpu_load and ucd_cpu_util: make scan function find Rittal
+ * FIX: ucd_cpu_util: fix check in case of missing hi, si and st
* printer_supply: Changed order of tests. When a printer reports -3 this
is used before the check if maxlevel is -2.
* cisco_locif: The check has been removed. Please switch to if/if64
diff --git a/checks/ucd_cpu_util b/checks/ucd_cpu_util
index 9cca8a5..0afe4cc 100644
--- a/checks/ucd_cpu_util
+++ b/checks/ucd_cpu_util
@@ -39,7 +39,7 @@ def inventory_ucd_cpu_util(checktype, info):
return [(None, "kernel_util_default_levels")]
def check_ucd_cpu_util(item, params, info):
- counters = map(int, info[0])
+ counters = map(saveint, info[0])
rates = []
this_time = time.time()
some_counter_wrapped = False
Module: check_mk
Branch: master
Commit: cae0a223d4b582a44f5ea48053993921b20f4d84
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cae0a223d4b582…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 16 18:01:10 2011 +0100
printer_supply: Skipping inventory of supplies which have current value
and maxlevel both set to -2.
---
ChangeLog | 2 ++
checks/printer_supply | 4 +++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f23596e..cfe6bfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,8 @@
* FIX: cmctc: fix inventory in case of incomplete entries
* printer_supply: Changed order of tests. When a printer reports -3 this
is used before the check if maxlevel is -2.
+ * printer_supply: Skipping inventory of supplies which have current value
+ and maxlevel both set to -2.
* cisco_locif: The check has been removed. Please switch to if/if64
* if/if64: scan function now also detects devices where the first port
has not the index 1
diff --git a/checks/printer_supply b/checks/printer_supply
index 66bb7d6..1532201 100644
--- a/checks/printer_supply
+++ b/checks/printer_supply
@@ -73,7 +73,9 @@ def printer_supply_fix_infos(info):
return info
def inventory_printer_supply(checkname, info):
- return [ (line[0], "printer_supply_default_levels") for line in printer_supply_fix_infos(info) ]
+ # Ignore devices which show -2 for current value and -2 for max value -> useless
+ return [ (line[0], "printer_supply_default_levels") for line in printer_supply_fix_infos(info)
+ if savefloat(line[2]) != -2 and float(line[1]) != -2 ]
def check_printer_supply(item, params, info):
for line in printer_supply_fix_infos(info):
Module: check_mk
Branch: master
Commit: f662c780d418f1a42d2e417393f5ebe5dafadd65
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f662c780d418f1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 16 12:42:03 2011 +0100
Updated bug entries
---
.bugs/180 | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/.bugs/180 b/.bugs/180
index d071621..7c5827b 100644
--- a/.bugs/180
+++ b/.bugs/180
@@ -8,3 +8,11 @@ Class: bug
The perfdata icon is missing on PING checks created for ping only hosts. The
check creates perfdata but the detections seems to fail.
+
+The problem is that the PING service in check_mk_templates.cfg does not use
+the template 'check_mk_perf'. The use line should look like this:
+
+ use check_mk_perf,check_mk_default
+
+In fact the data is gathered in the host check but the missing link seems
+to confuse the users since the check generates performance data.
Module: check_mk
Branch: master
Commit: 54c4e43f3d2682be57fa78406cd32dee2836d108
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=54c4e43f3d2682…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 15 17:55:49 2011 +0100
Added missing files for omd_status
---
checkman/omd_status | 18 ++++++++++++++++++
checks/omd_status | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/checkman/omd_status b/checkman/omd_status
new file mode 100644
index 0000000..38da2e7
--- /dev/null
+++ b/checkman/omd_status
@@ -0,0 +1,18 @@
+title: Check status of OMD sites
+agents: linux
+author: Mathias Kettner <mk(a)mathias-kettner.de>
+license: GPL
+distribution: check_mk
+description:
+ This check checks the status of OMD sites found on the system.
+ It uses the output of {omd status --bare --auto}. The site is considered
+ to be {OK} if all services of the site are running and {CRIT}
+ otherwise. If the site is only partially running then the check output
+ shows the names of the stopped services.
+
+item:
+ The name of the site (string).
+
+inventory:
+ One check per site will be created for each site where {AUTOSTART} is
+ set to {on}, regardless of the current state of the site.
diff --git a/checks/omd_status b/checks/omd_status
new file mode 100644
index 0000000..2c798cd
--- /dev/null
+++ b/checks/omd_status
@@ -0,0 +1,40 @@
+# <<<omd_status>>>
+# [kaputt]
+# apache 1
+# rrdcached 1
+# npcd 1
+# nagios 1
+# crontab 1
+# OVERALL 1
+# [test]
+# apache 1
+# rrdcached 1
+# npcd 0
+# nagios 1
+# crontab 1
+# OVERALL 2
+
+def inventory_omd_status(checkname, info):
+ return [ ( line[0][1:-1], None ) for line in info if line[0][0] == '[' ]
+
+def check_omd_status(item, _no_params, info):
+ active = False
+ for line in info:
+ if line[0] == '[' + item + ']':
+ active = True
+ stopped = []
+ elif active:
+ if line[0] == 'OVERALL':
+ if line[1] == '0':
+ return (0, 'OK - all services are running')
+ elif line[1] == '1':
+ return (2, 'CRIT - site is stopped')
+ else:
+ return (2, 'CRIT - partially running! stopped services: %s' % ", ".join(stopped))
+ elif line[1] != '0':
+ stopped.append(line[0])
+ return (3, "UNKNOWN - site not existing or AUTOSTART off")
+
+check_info['omd_status'] = \
+ (check_omd_status, "OMD %s status", 0, inventory_omd_status)
+
Module: check_mk
Branch: master
Commit: 5fe7a003200590baea42a78841eecccac669245f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5fe7a003200590…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Mar 15 17:41:54 2011 +0100
omd_status: new check for checking status of OMD sites
---
ChangeLog | 11 ++++++-----
agents/check_mk_agent.linux | 6 ++++++
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0500cb2..9c09c03 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,11 @@
* Allow moving hosts from one to another config file
Checks & Agents:
+ * FIX: df: fix layout problems in PNP template
+ * FIX: df: fix trend computation (thanks to Sebastian Talmon)
+ * FIX: df: fix status in case of critical trend and warning used
+ * FIX: df: fix display of trend warn/crit in PNP-graph
+ * FIX: cmctc: fix inventory in case of incomplete entries
* printer_supply: Changed order of tests. When a printer reports -3 this
is used before the check if maxlevel is -2.
* cisco_locif: The check has been removed. Please switch to if/if64
@@ -24,12 +29,8 @@
has not the index 1
* cisco_temp/cisco_temp_perf: scan function handles sensors not beginning
with index 1
- * FIX: df: fix layout problems in PNP template
- * FIX: df: fix trend computation (thanks to Sebastian Talmon)
- * FIX: df: fix status in case of critical trend and warning used
- * FIX: df: fix display of trend warn/crit in PNP-graph
* df: split PNP graphs for growth/trend into two graphs
- * FIX: cmctc: fix inventory in case of incomplete entries
+ * omd_status: new check for checking status of OMD sites
1.1.10:
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 1e4ee6e..83c78ed 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -326,6 +326,12 @@ if which mailq >/dev/null 2>&1 && getent passwd postfix >/dev/null 2>&1; then
mailq | tail -n 6
fi
+# Check status of OMD sites
+if type omd >/dev/null
+then
+ echo '<<<omd_status>>>'
+ omd status --bare --auto
+fi
# Einbinden von lokalen Plugins, die eine eigene Sektion ausgeben
if cd $PLUGINSDIR