Module: check_mk
Branch: master
Commit: 858fb0a9b08b9ed1e81cef1124ac5ff414509a33
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=858fb0a9b08b9e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 7 13:58:25 2014 +0100
added command line opption to analyze Inline-SNMP statistics
---
modules/check_mk.py | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index a766b8c..a54e153 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4743,6 +4743,7 @@ def usage():
cmk -i, --inventory [HOST1 HOST2...] Do a HW/SW-Inventory of some ar all hosts
cmk --inventory-as-check HOST Do HW/SW-Inventory, behave like check plugin
cmk -A, --bake-agents [-f] [H1 H2..] Bake agents for hosts (not in all versions)
+ cmk --show-snmp-stats Analyzes recorded Inline SNMP statistics
cmk -V, --version print version
cmk -h, --help print this help
@@ -4859,6 +4860,10 @@ NOTES:
already exists. Note: baking agents is only contained in the
subscription version of Check_MK.
+ --show-snmp-stats analyzes and shows a summary of the Inline SNMP
+ statistics which might have been recorded on your system before.
+ Note: This is only contained in the subscription version of Check_MK.
+
--convert-rrds converts the internal structure of existing RRDs
to the new structure as configured via the rulesets cmc_host_rrd_config
and cmc_service_rrd_config. If you do not specify hosts, then all
@@ -5969,7 +5974,7 @@ if __name__ == "__main__":
long_options = [ "help", "version", "verbose",
"compile", "debug", "interactive",
"list-checks", "list-hosts",
"list-tag", "no-tcp", "cache",
"flush", "package", "localize",
"donate", "snmpwalk", "oid=", "extraoid=",
- "snmptranslate", "bake-agents",
"force",
+ "snmptranslate", "bake-agents",
"force", "show-snmp-stats",
"usewalk", "scan-parents", "procs=",
"automation=", "notify",
"snmpget=", "profile", "keepalive",
"keepalive-fd=", "create-rrd",
"convert-rrds", "split-rrds",
@@ -6195,7 +6200,12 @@ if __name__ == "__main__":
hostnames = None
do_bake_agents(hostnames)
done = True
-
+ elif o in [ '--show-snmp-stats' ]:
+ if 'do_show_snmp_stats' not in globals():
+ sys.stderr.write("Handling of SNMP statistics is not implemented
in your version of Check_MK. Sorry.\n")
+ sys.exit(1)
+ do_show_snmp_stats()
+ done = True
except MKGeneralException, e:
sys.stderr.write("%s\n" % e)