Module: check_mk
Branch: master
Commit: e8e978f8f1a6e7ae75d575db26302db75b72a88b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8e978f8f1a6e7…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Mar 27 14:20:36 2014 +0100
windows_update.vbs: Cleanups
---
agents/windows/plugins/windows_updates.vbs | 27 ++++++++++++---------------
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/agents/windows/plugins/windows_updates.vbs b/agents/windows/plugins/windows_updates.vbs
index b446d81..7ef05df 100644
--- a/agents/windows/plugins/windows_updates.vbs
+++ b/agents/windows/plugins/windows_updates.vbs
@@ -15,7 +15,7 @@
' some issues, so I went for a simpler solution using only one script
'
' Updated by Bastian Kuhn, 2014-03-03: Removed all caching functions cause the current agent
-' has a native caching support. Make shure that you activate caching for this script in check_mk.ini
+' has a native caching support. Make sure that you activate caching for this script in check_mk.ini
' -----------------------------------------------------------------------------------------
Option Explicit
@@ -39,9 +39,6 @@ end function
Dim result, reboot, numImp, numOpt, important, opti
Dim updtSearcher, colDownloads, objEntry
-Dim objFSO, stdout
-Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
-Set stdout = objFSO.GetStandardStream(1)
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
@@ -50,7 +47,7 @@ Dim RebootTime
Dim RegPath
If CreateObject("Microsoft.Update.AutoUpdate").DetectNow <> 0 Then
- stdout.WriteLine("<<<windows_updates>>>")
+ WScript.Echo "<<<windows_updates>>>"
WScript.Quit()
End If
@@ -76,22 +73,22 @@ For Each objEntry in colDownloads
important = objEntry.Title
else
important = important & "; " & objEntry.Title
- End If
- numImp = numImp + 1
+ End If
+ numImp = numImp + 1
Else
- If numOpt = 0 Then
+ If numOpt = 0 Then
opti = objEntry.Title
Else
opti = opti & "; " & objEntry.Title
- End If
- numOpt = numOpt + 1
+ End If
+ numOpt = numOpt + 1
End If
Next
- stdout.WriteLine("<<<windows_updates>>>")
- stdout.WriteLine(reboot & " " & numImp & " " & numOpt)
- stdout.WriteLine(important)
- stdout.WriteLine(opti)
- stdout.WriteLine(RebootTime)
+WScript.Echo "<<<windows_updates>>>"
+WScript.Echo reboot & " " & numImp & " " & numOpt
+WScript.Echo important
+WScript.Echo opti
+WScript.Echo RebootTime
WScript.Quit()
Module: check_mk
Branch: master
Commit: 334cf6bbdba5775be9e4615c99136b67553e4baa
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=334cf6bbdba577…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Mar 26 15:05:49 2014 +0100
FIX megaraid_ldisks: now able to handle "No Virtual Drive Configured" states
The check no longer crashes if the agent section contains lines like:<br>
Adapter 1: No Virtual Drive Configured.
---
.werks/737 | 10 ++++++++++
ChangeLog | 1 +
checks/megaraid_ldisks | 3 ++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/737 b/.werks/737
new file mode 100644
index 0000000..2601cc5
--- /dev/null
+++ b/.werks/737
@@ -0,0 +1,10 @@
+Title: megaraid_ldisks: now able to handle "No Virtual Drive Configured" states
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1395842658
+
+The check no longer crashes if the agent section contains lines like:<br>
+Adapter 1: No Virtual Drive Configured.
diff --git a/ChangeLog b/ChangeLog
index c7e0714..9498b65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -235,6 +235,7 @@
* 0593 FIX: zypper: agent plugin and check now lead to UNKNOWN result in case of repo problems
* 0758 FIX: check_sql: Fixed monitoring of stored procedures with oracle
* 0599 FIX: esx_vsphere_datastores: provisioning levels in WATO are no longer limited to 101%
+ * 0737 FIX: megaraid_ldisks: now able to handle "No Virtual Drive Configured" states...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/megaraid_ldisks b/checks/megaraid_ldisks
index c6c7d29..c01e047 100644
--- a/checks/megaraid_ldisks
+++ b/checks/megaraid_ldisks
@@ -48,7 +48,8 @@ def inventory_megaraid_ldisks(info):
def check_megaraid_ldisks(item, _no_params, info):
adapter = None
for line in info:
- if line[0] == "Adapter":
+ l = ' '.join(line)
+ if line[0] == "Adapter" and not l.endswith('No Virtual Drive Configured.'):
adapter = int(line[1])
elif line[0] == "Virtual" and (line[1] == "Disk:" or line[1] == "Drive:"):
disk = int(line[2])
Module: check_mk
Branch: master
Commit: dceb780df063728c9abb3c898c29f1bdd78730f1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dceb780df06372…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Mar 26 15:01:41 2014 +0100
juniper_trpz_aps: Show the number of connected access points on juniper wlan controllers
---
.werks/771 | 4 ++--
ChangeLog | 2 +-
checkman/juniper_trpz_aps | 11 +++++++++++
checks/juniper_trpz_aps | 45 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/.werks/771 b/.werks/771
index 419f531..c8bf0ae 100644
--- a/.werks/771
+++ b/.werks/771
@@ -1,8 +1,8 @@
-Title: ibm_svc_node: new check for status of IO Groups of IBM SVC / V7000 devices
+Title: juniper_trpz_aps: Show the number of connected access points on juniper wlan controllers
Level: 1
Component: checks
Version: 1.2.5i1
-Date: 1395767425
+Date: 1395842452
Class: feature
diff --git a/ChangeLog b/ChangeLog
index 349b04c..c7e0714 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -130,10 +130,10 @@
* 0707 ibm_svc_host: New check: Status of hosts an IBM SVC / V7000 presents volumes to
* 0598 kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
* 0768 ibm_svc_license: New check for Licensing Status on IBM SVC / V7000 devices
- * 0771 ibm_svc_node: new check for status of IO Groups of IBM SVC / V7000 devices
* 0778 New Special Agent for innovaphone gateways...
* 0769 juniper_trpz_cpu_util, juniper_trpz_flash, juniper_trpz_info, juniper_trpz_power: new Checks for juniper trapeze switches
* 0770 innovaphone_licenses: New check to monitor licenses on innovaphone devices"
+ * 0771 juniper_trpz_aps: Show the number of connected access points on juniper wlan controllers
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/juniper_trpz_aps b/checkman/juniper_trpz_aps
new file mode 100644
index 0000000..b52beee
--- /dev/null
+++ b/checkman/juniper_trpz_aps
@@ -0,0 +1,11 @@
+title: Number of online access points
+agents: snmp
+catalog: hw/network/juniper
+license: GPL
+distribution: check_mk
+description:
+ Show the number of online access points registered on the controller
+
+inventory:
+ One service for the number of access points
+
diff --git a/checks/juniper_trpz_aps b/checks/juniper_trpz_aps
new file mode 100644
index 0000000..c48ab5d
--- /dev/null
+++ b/checks/juniper_trpz_aps
@@ -0,0 +1,45 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+def inventory_juniper_trpz_aps(info):
+ return [ (None, None) ]
+
+def check_juniper_trpz_aps(_no_item, _no_params, info):
+ aps = info[0][0]
+ message = "%s Access Points online" % aps
+ return 0, message
+
+check_info["juniper_trpz_aps"] = {
+ "check_function" : check_juniper_trpz_aps,
+ "inventory_function" : inventory_juniper_trpz_aps,
+ "service_description" : "Access Points",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1.6"),
+ "snmp_info" : (".1.3.6.1.4.1.14525.4.5.1.1",[
+ 1, #number of Access Points
+ ])
+
+
+}
Module: check_mk
Branch: master
Commit: e2a5bacc7ae4bc6f4eda22cc489adc44514da265
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2a5bacc7ae4bc…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Mar 26 14:54:36 2014 +0100
innovaphone_licenses: New check to monitor licenses on innovaphone devices"
---
.werks/770 | 4 ++--
ChangeLog | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.werks/770 b/.werks/770
index a8833c9..29ce596 100644
--- a/.werks/770
+++ b/.werks/770
@@ -1,8 +1,8 @@
-Title: ibm_svc_mdiskgrp: New check for status and usage of MDisksGrps in IBM SVC / V7000 devices
+Title: innovaphone_licenses: New check to monitor licenses on innovaphone devices"
Level: 1
Component: checks
Version: 1.2.5i1
-Date: 1395763421
+Date: 1395842049
Class: feature
diff --git a/ChangeLog b/ChangeLog
index b84060c..349b04c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -130,10 +130,10 @@
* 0707 ibm_svc_host: New check: Status of hosts an IBM SVC / V7000 presents volumes to
* 0598 kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
* 0768 ibm_svc_license: New check for Licensing Status on IBM SVC / V7000 devices
- * 0770 ibm_svc_mdiskgrp: New check for status and usage of MDisksGrps in IBM SVC / V7000 devices
* 0771 ibm_svc_node: new check for status of IO Groups of IBM SVC / V7000 devices
* 0778 New Special Agent for innovaphone gateways...
* 0769 juniper_trpz_cpu_util, juniper_trpz_flash, juniper_trpz_info, juniper_trpz_power: new Checks for juniper trapeze switches
+ * 0770 innovaphone_licenses: New check to monitor licenses on innovaphone devices"
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
Module: check_mk
Branch: master
Commit: d8b1deb213ca9f480711cf80c4115b8fb19eace7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d8b1deb213ca9f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Mar 26 14:53:36 2014 +0100
juniper_trpz_cpu_util, juniper_trpz_flash, juniper_trpz_info, juniper_trpz_power: new Checks for juniper trapeze switches
---
.werks/769 | 4 ++--
ChangeLog | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.werks/769 b/.werks/769
index 6e49114..78b142d 100644
--- a/.werks/769
+++ b/.werks/769
@@ -1,8 +1,8 @@
-Title: ibm_svc_mdisk: new check for status and mode of MDisks in an IBM SVC / V7000 device
+Title: juniper_trpz_cpu_util, juniper_trpz_flash, juniper_trpz_info, juniper_trpz_power: new Checks for juniper trapeze switches
Level: 1
Component: checks
Version: 1.2.5i1
-Date: 1395757553
+Date: 1395842006
Class: feature
diff --git a/ChangeLog b/ChangeLog
index 3edbd17..b84060c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -130,10 +130,10 @@
* 0707 ibm_svc_host: New check: Status of hosts an IBM SVC / V7000 presents volumes to
* 0598 kentix_temp, kentix_humidity: new checks for Kentix MultiSensor-Rack
* 0768 ibm_svc_license: New check for Licensing Status on IBM SVC / V7000 devices
- * 0769 ibm_svc_mdisk: new check for status and mode of MDisks in an IBM SVC / V7000 device
* 0770 ibm_svc_mdiskgrp: New check for status and usage of MDisksGrps in IBM SVC / V7000 devices
* 0771 ibm_svc_node: new check for status of IO Groups of IBM SVC / V7000 devices
* 0778 New Special Agent for innovaphone gateways...
+ * 0769 juniper_trpz_cpu_util, juniper_trpz_flash, juniper_trpz_info, juniper_trpz_power: new Checks for juniper trapeze switches
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
Module: check_mk
Branch: master
Commit: ad17a36dc01d1f8fbe99f702258809bd0d63270a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad17a36dc01d1f…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Mar 26 14:50:06 2014 +0100
innovaphone_licenses: New Check to monitor licens usage on innovaphone devices
---
agents/special/agent_innovaphone | 15 ++++++++++-
checkman/innovaphone_licenses | 19 ++++++++++++++
checks/innovaphone_licenses | 51 ++++++++++++++++++++++++++++++++++++++
3 files changed, 84 insertions(+), 1 deletion(-)
diff --git a/agents/special/agent_innovaphone b/agents/special/agent_innovaphone
index 0654d53..c635d43 100755
--- a/agents/special/agent_innovaphone
+++ b/agents/special/agent_innovaphone
@@ -34,6 +34,7 @@ def get_pri_channel(channel_name):
link = data.get('link')
physical = data.get('physical')
if link != "Up" or physical != "Up":
+ print "%s %s %s 0 0 0" % ( channel_name, link, physical )
return
idle = 0
total = 0
@@ -42,8 +43,17 @@ def get_pri_channel(channel_name):
idle += 1
total += 1
total -= 1
- print "%s %s %s" % (channel_name, idle, total)
+ print "%s %s %s %s %s" % ( channel_name, link, physical, idle, total)
+def get_licenses():
+ address = "http://%s/PBX0/ADMIN/mod_cmd_login.xml" % server
+ data = etree.parse(get_url(address)).getroot()
+ for child in data.findall('lic'):
+ if child.get('name') == "Port":
+ count = child.get('count')
+ used = child.get('used')
+ print count, used
+ break
base_url = "/LOG0/CNT/mod_cmd.xml?cmd=xml-counts"
@@ -66,3 +76,6 @@ for what in [ "CPU", "MEM", "TEMP"]:
print "<<<%schannels>>>" % s_prefix
for channel in range(1,5):
get_pri_channel('PRI'+str(channel))
+
+print "<<<%slicenses>>>" % s_prefix
+get_licenses()
diff --git a/checkman/innovaphone_licenses b/checkman/innovaphone_licenses
new file mode 100644
index 0000000..507aed1
--- /dev/null
+++ b/checkman/innovaphone_licenses
@@ -0,0 +1,19 @@
+title: Innovaphone Gateway: Port licenses
+agents: special
+catalog: hw/network/tel
+license: GPL
+distribution: check_mk
+description:
+ This Check monitors the total number of used port licenses.
+
+inventory:
+ One check will be created
+
+perfdata:
+ The license usage, together with it's warn and crit levels
+
+[parameters]
+warning (int): The percentage of used licenses that triggers
+ a WARNING state
+critical (int): The percentage of used licenses that triggers
+ a CRITICAL state
diff --git a/checks/innovaphone_licenses b/checks/innovaphone_licenses
new file mode 100644
index 0000000..e4b79bc
--- /dev/null
+++ b/checks/innovaphone_licenses
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 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.
+
+innovaphone_licenses_default_levels = ( 90.0, 95.0 )
+
+def inventory_innovaphone_licenses(info):
+ return [ ( None, 'innovaphone_licenses_default_levels') ]
+
+def check_innovaphone_licenses(_no_item, params, info):
+ total, used = map(savefloat, info[0])
+ perc_used = ( used/ 100 ) * total
+ warn, crit = params
+ message = "Used %.0f/%.0f Licences (%.0f%%)" % ( used, total, perc_used)
+ levels = "Warning/ Critical at (%s/%s)" % ( warn, crit )
+ perf = [ ('licenses', used, None, None, total ) ]
+ if perc_used > crit:
+ return 2, message + levels, perf
+ if perc_used > warn:
+ return 1, message + levels, perf
+ return 0, message, perf
+
+check_info["innovaphone_licenses"] = {
+ "check_function" : check_innovaphone_licenses,
+ "inventory_function" : inventory_innovaphone_licenses,
+ "service_description" : "Licenses",
+ "has_perfdata" : True,
+}
+