Module: check_mk
Branch: master
Commit: 9a457ef3a884cbdfa41cb05ae36c3169ed769142
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a457ef3a884cb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 14 11:17:01 2016 +0100
#2882 Reorganize BI configuration into packs, add contacts and permissions
The WATO module for configuring Business Intelligence (BI) has been
reorganized. The configuration is now split up into <b>Packs</b>. This has
been made for two reasons:
LI:It makes the configuration of large BI environments easier
LI:It allows to delegate BI configuration to normal users
Each pack contains rules and aggregations. A rule or aggregation in one pack
<b>can</b> refer to rules in another pack.
Each BI pack can have a list of contact groups. A new permission has been
introduced: <i>Business Intelligence Rules and Aggregations</i>. Per default
this is set for normal users. It allows a normal user to configure rules
and aggregations in a BI pack if that user is in one of the listed contact
groups of that pack.
A pack can have the checkbox <i>Allow all users to refer to rules contained
in this pack</i> set. That way a user can use rule from a pack where he is
not a contact for. So the admin can put some basic rules there that can be
used but not changed by other.
Your existing BI configuration will automatically be converted the next
time you use the WATO Bi modul. All existing rules and aggregations will
be put in to one BI pack with the name <i>Default Pack</i>.
---
.werks/2882 | 32 ++
ChangeLog | 3 +
web/.gitignore | 1 +
web/htdocs/bi.py | 12 +
web/htdocs/images/button_bi_rules.png | Bin 0 -> 2203 bytes
web/htdocs/images/icon_bi_rules.png | Bin 0 -> 2203 bytes
web/plugins/config/bi.py | 1 +
web/plugins/wato/bi.py | 595 +++++++++++++++++++++++++--------
web/plugins/wato/builtin_modules.py | 2 +-
9 files changed, 502 insertions(+), 144 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=9a457ef3a8…
Module: check_mk
Branch: master
Commit: 9e546a50067168e15d19a2ba63427673703dc9ed
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9e546a50067168…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jan 14 09:55:56 2016 +0100
#2890 cisco_nexus_cpu, cisco_oldcpu: new checks for Cisco devices which do not support CPU utilization information from CISCO PROCESS MIB
---
.werks/2890 | 9 ++++++++
ChangeLog | 1 +
checkman/cisco_nexus_cpu | 16 ++++++++++++++
checkman/cisco_oldcpu | 17 ++++++++++++++
checks/cisco_nexus_cpu | 55 ++++++++++++++++++++++++++++++++++++++++++++++
checks/cisco_oldcpu | 55 ++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 153 insertions(+)
diff --git a/.werks/2890 b/.werks/2890
new file mode 100644
index 0000000..ca33ffe
--- /dev/null
+++ b/.werks/2890
@@ -0,0 +1,9 @@
+Title: cisco_nexus_cpu, cisco_oldcpu: new checks for Cisco devices which do not support CPU utilization information from CISCO PROCESS MIB
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i4
+Date: 1452761536
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 170cbe1..553f681 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,7 @@
* 2915 supermicro.smart: new check to monitor harddisk health on snmp-enabled supermicro devices
* 1321 sap.dialog: It is now possible to configure levels for FrontEndNetTime, ResponseTime and UsersLoggedIn
* 2916 checkpoint_fan, checkpoint_firewall, checkpoint_ha_problems, checkpoint_ha_status, checkpoint_powersupply, checkpoint_svn_status, checkpoint_temp, checkpoint_voltage: New checks for various aspects of checkpoint firewalls
+ * 2890 cisco_nexus_cpu, cisco_oldcpu: new checks for Cisco devices which do not support CPU utilization information from CISCO PROCESS MIB
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
diff --git a/checkman/cisco_nexus_cpu b/checkman/cisco_nexus_cpu
new file mode 100644
index 0000000..a409b73
--- /dev/null
+++ b/checkman/cisco_nexus_cpu
@@ -0,0 +1,16 @@
+title: Cisco Nexus Devices: CPU utilization
+agents: snmp
+catalog: hw/network/cisco
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the CPU utilization of Cisco Nexus devices
+ which do not support CPU information from CISCO-PROCESS-MIB.
+
+ Default levels are 80, 90 percent. These are configurable.
+
+perfdata:
+ The CPU utilization.
+
+inventory:
+ One service is created.
diff --git a/checkman/cisco_oldcpu b/checkman/cisco_oldcpu
new file mode 100644
index 0000000..34379ce
--- /dev/null
+++ b/checkman/cisco_oldcpu
@@ -0,0 +1,17 @@
+title: Old Cisco Devices: CPU utilization
+agents: snmp
+catalog: hw/network/cisco
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the CPU utilization of old Cisco devices
+ which do not support CPU information from CISCO-PROCESS-MIB,
+ e.g. 'Cisco Catalyst 3850 Series'.
+
+ Default levels are 80, 90 percent. These are configurable.
+
+perfdata:
+ The CPU utilization.
+
+inventory:
+ One service is created.
diff --git a/checks/cisco_nexus_cpu b/checks/cisco_nexus_cpu
new file mode 100644
index 0000000..9da6942
--- /dev/null
+++ b/checks/cisco_nexus_cpu
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2015 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+# .1.3.6.1.4.1.9.9.305.1.1.1.0 1 --> CISCO-SYSTEM-EXT-MIB::cseSysCPUUtilization.0
+
+
+cisco_nexus_cpu_default_levels = (80.0, 90.0)
+
+
+def inventory_cisco_nexus_cpu(info):
+ if info[0][0]:
+ return [ (None, "cisco_nexus_cpu_default_levels") ]
+
+
+def check_cisco_nexus_cpu(_no_item, params, info):
+ return check_cpu_util(float(info[0][0]), params)
+
+
+check_info['cisco_nexus_cpu'] = {
+ 'inventory_function' : inventory_cisco_nexus_cpu,
+ 'check_function' : check_cisco_nexus_cpu,
+ 'service_description' : 'CPU utilization',
+ 'has_perfdata' : True,
+ 'snmp_info' : (".1.3.6.1.4.1.9.9.305.1.1.1.0", [ "" ]),
+ 'snmp_scan_function' : lambda oid: "cisco" in oid(".1.3.6.1.2.1.1.1.0").lower() \
+ and "nx-os" in oid(".1.3.6.1.2.1.1.1.0").lower() \
+ and not oid(".1.3.6.1.4.1.9.9.109.1.1.1.1.*") \
+ and oid(".1.3.6.1.4.1.9.9.305.1.1.1.0"),
+ 'group' : "cpu_utilization",
+ 'includes' : [ "cpu_util.include" ],
+}
diff --git a/checks/cisco_oldcpu b/checks/cisco_oldcpu
new file mode 100644
index 0000000..8b550ec
--- /dev/null
+++ b/checks/cisco_oldcpu
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2015 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+# .1.3.6.1.4.1.9.2.1.57.0 13 --> OLD-CISCO-CPU-MIB::avgBusy1.0
+
+
+cisco_oldcpu_default_levels = (80.0, 90.0)
+
+
+def inventory_cisco_oldcpu(info):
+ if info[0][0]:
+ return [ (None, "cisco_oldcpu_default_levels") ]
+
+
+def check_cisco_oldcpu(_no_item, params, info):
+ return check_cpu_util(float(info[0][0]), params)
+
+
+check_info['cisco_oldcpu'] = {
+ 'inventory_function' : inventory_cisco_oldcpu,
+ 'check_function' : check_cisco_oldcpu,
+ 'service_description' : 'CPU utilization',
+ 'has_perfdata' : True,
+ 'snmp_info' : (".1.3.6.1.4.1.9.2.1", [ "57" ]),
+ # For old cisco catalyst devices (1745) which do not support newer snmp data
+ # e.g. 'Cisco Catalyst 3850 Series Switches'
+ 'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.9.1.1745") \
+ and not oid(".1.3.6.1.4.1.9.9.109.1.1.1.1.*") \
+ and oid(".1.3.6.1.4.1.9.2.1.57.0"),
+ 'group' : "cpu_utilization",
+}
Module: check_mk
Branch: master
Commit: e1842f89709ffc34751b51d9884fe6162334173b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e1842f89709ffc…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jan 14 09:37:29 2016 +0100
fixed typo
---
checkman/cisco_cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checkman/cisco_cpu b/checkman/cisco_cpu
index 82c5431..cfe9136 100644
--- a/checkman/cisco_cpu
+++ b/checkman/cisco_cpu
@@ -11,7 +11,7 @@ description:
{.1.3.6.1.4.1.9.9.109.1.1.1.1.8.1 = cpmCPUTotal5minRev}
- The latter is depreceated by cisco and will only be used if {cpmCPUTotal5minRev}
+ The latter is deprecated by cisco and will only be used if {cpmCPUTotal5minRev}
is unavailable.
Module: check_mk
Branch: master
Commit: 4d193c1b689575f93d05d6f18073f4851ab53515
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4d193c1b689575…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jan 14 09:10:46 2016 +0100
#2889 snmp_extended_info: new inventory function which discovers the model name and serial number
The information about model name and serial number is discovered on all SNMP devices on which
the OIDs "1.3.6.1.2.1.47.1.1.1.1.4.1" or "1.3.6.1.2.1.47.1.1.1.1.4.1001" have value zero.
This means the device itself.
---
.werks/2889 | 11 ++++++++
ChangeLog | 1 +
inventory/snmp_extended_info | 56 ++++++++++++++++++++++++++++++++++++++++
web/plugins/views/inventory.py | 2 ++
4 files changed, 70 insertions(+)
diff --git a/.werks/2889 b/.werks/2889
new file mode 100644
index 0000000..ad05caa
--- /dev/null
+++ b/.werks/2889
@@ -0,0 +1,11 @@
+Title: snmp_extended_info: new inventory function which discovers the model name and serial number
+Level: 1
+Component: inv
+Compatible: compat
+Version: 1.2.7i4
+Date: 1452758542
+Class: feature
+
+The information about model name and serial number is discovered on all SNMP devices on which
+the OIDs "1.3.6.1.2.1.47.1.1.1.1.4.1" or "1.3.6.1.2.1.47.1.1.1.1.4.1001" have value zero.
+This means the device itself.
diff --git a/ChangeLog b/ChangeLog
index c8db707..170cbe1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -266,6 +266,7 @@
HW/SW-Inventory:
* 2436 NetApp monitoring: Now able to gather data for inventory...
* 2440 VMware ESX inventory: Now able to display ESX hostsystems and virtualmachines of clusters
+ * 2889 snmp_extended_info: new inventory function which discovers the model name and serial number...
* 2667 FIX: solaris_mem: fix exception in inventory plugin
* 2714 FIX: Fixed visibility of folding arrows by making them dark
* 2439 FIX: solaris_prtdiag: Can now handle Oracle Corporation SUN FIRE X4170 M2 SERVER...
diff --git a/inventory/snmp_extended_info b/inventory/snmp_extended_info
new file mode 100644
index 0000000..9f5c9e5
--- /dev/null
+++ b/inventory/snmp_extended_info
@@ -0,0 +1,56 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2016 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+
+# .1.3.6.1.2.1.47.1.1.1.1.4.1 0 --> ENTITY-MIB::entPhysicalContainedIn.1
+# .1.3.6.1.2.1.47.1.1.1.1.11.1 SMG0926A0CR --> ENTITY-MIB::entPhysicalSerialNum.1
+# .1.3.6.1.2.1.47.1.1.1.1.13.1 WS-C6509 --> ENTITY-MIB::entPhysicalModelName.1
+
+
+
+def inv_snmp_extended_info(info):
+ node = inv_tree("hardware.system.")
+
+ if len(info) >= 3:
+ if info[0][0].split(".")[-1] == "0":
+ node["serial_number"] = info[1][0].split(".")[-1]
+ node["model_name"] = info[2][0].split(".")[-1]
+ elif info[0][1].split(".")[-1] == "0":
+ node["serial_number"] = info[1][1].split(".")[-1]
+ node["model_name"] = info[2][1].split(".")[-1]
+
+ return node
+
+
+inv_info['snmp_extended_info'] = {
+ 'inv_function' : inv_snmp_extended_info,
+ 'snmp_info' : ('.1.3.6.1.2.1.47.1.1.1.1', [
+ "4", # entPhysicalContainedIn.1
+ "11", # entPhysicalSerialNum.1
+ "13" # entPhysicalModelName.1
+ ], [ "1", "1001" ]),
+ 'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.47.1.1.1.1.*"),
+}
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 9016478..1fb802b 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -571,6 +571,8 @@ inventory_displayhints.update({
".hardware.memory.arrays:*.devices:*.speed" : { "title" : _("Speed"), "paint" : "hz", },
".hardware.system." : { "title" : _("System") },
".hardware.system.product" : { "title" : _("Product") },
+ ".hardware.system.serial_number" : { "title" : _("Serial Number") },
+ ".hardware.system.model_name" : { "title" : _("Model Name") },
".hardware.storage." : { "title" : _("Storage") },
".hardware.storage.disks:" : { "title" : _("Block Devices") },
".hardware.storage.disks:*." : { "title" : _("Block Device %d") },