Module: check_mk
Branch: master
Commit: fa768bd6342b346f71f38fb1ebbb29e23616b3cc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fa768bd6342b34…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Mar 17 10:37:50 2014 +0100
arcserve_backup: improved documentation (check manpage and comments in the agent plugin)
---
.werks/705 | 8 ++++++++
ChangeLog | 1 +
agents/windows/plugins/arcserve_backup.ps1 | 21 +++++++++++++--------
checkman/arcserve_backup | 10 +++++++---
4 files changed, 29 insertions(+), 11 deletions(-)
diff --git a/.werks/705 b/.werks/705
new file mode 100644
index 0000000..14013f8
--- /dev/null
+++ b/.werks/705
@@ -0,0 +1,8 @@
+Title: arcserve_backup: improved documentation (check manpage and comments in the agent plugin)
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1395049017
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 1d4dc15..8fefae5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -109,6 +109,7 @@
* 0591 dell_poweredge_mem: new check to monitor memory modules of Dell PowerEdge Servers
* 0592 dell_poweredge_pci: new check for pci devices on dell PowerEdge Servers
* 0141 ups_socomec_capacity: Battery Capacity Check for Socomec UPS Devices.
+ * 0705 arcserve_backup: improved documentation (check manpage and comments in the agent plugin)
* 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/agents/windows/plugins/arcserve_backup.ps1 b/agents/windows/plugins/arcserve_backup.ps1
index 7a51e0e..0b78233 100755
--- a/agents/windows/plugins/arcserve_backup.ps1
+++ b/agents/windows/plugins/arcserve_backup.ps1
@@ -18,7 +18,8 @@
# GetLatestJobId #
##################
function GetLatestJobId($sqlCmd) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT top 1 jobid FROM dbo.aslogw WHERE msgtext LIKE '%Ausführung von Job Sichern%' ORDER BY jobid DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -34,7 +35,8 @@ function GetLatestJobId($sqlCmd) {
# GetPreLatestJobId #
#####################
function GetPreLatestJobId($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT top 1 jobid FROM dbo.aslogw WHERE msgtext LIKE '%Ausführung von Job Sichern%' AND jobid < " + $jobId + " ORDER BY jobid DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -51,7 +53,8 @@ function GetPreLatestJobId($sqlCmd, $jobId) {
#############
function GetStatus($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT top 1 msgtext FROM dbo.aslogw WHERE msgtext LIKE '%Vorgang Sichern%' AND jobid = " + $jobid + " ORDER BY id DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -70,7 +73,8 @@ function GetStatus($sqlCmd, $jobId) {
##################
function GetBackupFiles($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT msgtext FROM dbo.aslogw WHERE msgtext LIKE '%Verzeichnis(se)%' AND jobid = " + $jobId + " ORDER BY id DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -89,7 +93,8 @@ function GetBackupFiles($sqlCmd, $jobId) {
##################
function GetDescription($sqlCmd, $jobId) {
- # Put the command in our sqlCmd
+ # Put the command in our sqlCmd
+ # Please adapt description if english translation is used
$sqlCmd.CommandText = "SELECT msgtext + ' (' + convert(varchar(10), logtime, 104) + ')' FROM dbo.aslogw WHERE msgtext LIKE '%Beschreibung:%' AND jobid = " + $jobId + " ORDER BY id DESC"
# Create an adapter to put the data we get from SQL and get the data
@@ -110,7 +115,8 @@ function GetDescription($sqlCmd, $jobId) {
# We need no arguments
- # Make a connection with the SQL-server
+ # Make a connection with the SQL-server
+ # Please adapt Server and Database name
$sqlServer = "SATURN\ARCSERVE_DB"
$sqlConnection = New-Object System.Data.SqlClient.SqlConnection
$sqlConnection.ConnectionString = "Server=$sqlServer;Integrated Security=True;Database=aslog"
@@ -136,6 +142,7 @@ function GetDescription($sqlCmd, $jobId) {
write-output ""
+ # Please adapt job description
if ( $desc.contains("Wochensicherung") ) {
$temp = GetPreLatestJobId $sqlCmd $j
@@ -165,5 +172,3 @@ function GetDescription($sqlCmd, $jobId) {
# Close the SQL-connection
$sqlConnection.Close()
-
-
diff --git a/checkman/arcserve_backup b/checkman/arcserve_backup
index c93ffd1..96976e1 100644
--- a/checkman/arcserve_backup
+++ b/checkman/arcserve_backup
@@ -8,9 +8,13 @@ description:
System. Therefor it queries the database on the backup server. It needs
the arcserve_backup.ps1 agent plugin to be installed there.
- Returns {OK} if the backup job did finish with an OK message, {WARN} if
- the job reported warnings and {CRIT} if the job did report errors.
- {UNKN} is returned if the job did finish with an unidentified message.
+ Please note: On the Arcserve database TCP/IP and named pipes need to
+ be activated for the plugin to work.
+
+ The check returns {OK} if the backup job did finish with an OK message,
+ {WARN} if the job reported warnings and {CRIT} if the job did report
+ errors. {UNKN} is returned if the job did finish with an unidentified
+ message.
Number of directories, number of files and size are only reported but
do never trigger any non-OK state.
Module: check_mk
Branch: master
Commit: 81b9f0fe06340f1bd06a1d43b7904eb6476b0725
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=81b9f0fe06340f…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Mar 14 14:31:46 2014 +0100
check_bi_local.py now always has the possibility to use https protocol, if needed with selfsigned certificates
---
doc/treasures/localchecks/check_bi_local.py | 34 +++++--
.../localchecks/check_bi_local_https_insecure.py | 99 --------------------
2 files changed, 28 insertions(+), 105 deletions(-)
diff --git a/doc/treasures/localchecks/check_bi_local.py b/doc/treasures/localchecks/check_bi_local.py
index 3fb6568..1f7963a 100755
--- a/doc/treasures/localchecks/check_bi_local.py
+++ b/doc/treasures/localchecks/check_bi_local.py
@@ -49,25 +49,47 @@ automation_secret=""
# password = ""
# automation_secret = "LSEGRILPWQVLDBCYCKOC"
+# set "http" or "https" here
+protocol = "http"
+# protocol = "https"
+
+# Do you want to accept any Certificate when using HTTPS?
+# You may set this to True or False
+# You should leave it to False wherever possible
+# You need to change this to True if using a self signed certificate
+# Please note that this might be a security issue because then
+# *every* SSL certificate is accepted
+# If using http as protocol, this setting is ignored
+accept_any_certificate = False
+# accept_any_certificate = True
+
# Do not change anything below
import os, sys
+if protocol != "https":
+ protocol = "http"
+
+if protocol == "https" and accept_any_certificate == True:
+ cert_option = "--insecure"
+else:
+ cert_option = ""
+
if automation_secret != "":
- url = 'http://localhost/%scheck_mk/view.py?view_name=aggr_summary&output_format=py…' \
- '&_username=%s&_secret=%s' % (url_prefix, user, automation_secret)
+ url = '%s://localhost/%scheck_mk/view.py?view_name=aggr_summary&output_format=python' \
+ '&_username=%s&_secret=%s' % (protocol, url_prefix, user, automation_secret)
elif password != "":
- url = 'http://localhost/%scheck_mk/login.py?_login=1&_username=%s&_password=%s' \
+ url = '%s://localhost/%scheck_mk/login.py?_login=1&_username=%s&_password=%s' \
'&_origtarget=view.py%%3Fview_name=aggr_summary%%26output_format=python' % \
- (url_prefix, user, password)
+ (protocol, url_prefix, user, password)
else:
sys.stderr.write("You need to specify a password or an automation secret in the script source\n")
sys.exit(1)
try:
- command = "curl -u \"%s:%s\" -b /dev/null -L --noproxy localhost --silent '%s'" % \
- (user, password, url)
+ command = "curl -u \"%s:%s\" -b /dev/null -L --noproxy localhost %s --silent '%s'" % \
+ (user, password, cert_option, url)
output = os.popen(command).read()
data = eval(output)
except:
diff --git a/doc/treasures/localchecks/check_bi_local_https_insecure.py b/doc/treasures/localchecks/check_bi_local_https_insecure.py
deleted file mode 100755
index b1e6c92..0000000
--- a/doc/treasures/localchecks/check_bi_local_https_insecure.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/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.
-
-# Example for creating real Nagios checks from BI aggregations.
-
-# use check_bi_local_https_insecure.py instead of check_bi_local.py
-# only if using https with selfsigned certificates.
-# please note: this might be an security issue, because *every* certificate
-# is accepted
-
-# Installation:
-# 1. Put this file in /usr/lib/check_mk_agent/local
-# 2. Make the file executable
-# 3. Add a correct url_prefix (OMD site and slash)
-# user with read access to Multisite.
-# 4. Add password OR automation secret of this user
-
-url_prefix = "" # non-OMD installations
-# url_prefix = "mysite/" # with OMD site name
-
-# Authentication credentials
-user = "omdadmin"
-
-# use password OR automation_secret (you do not need both of them!!)
-# set the other one to the empty string ""
-# either:
-password = "omd"
-automation_secret=""
-
-# or:
-# password = ""
-# automation_secret = "LSEGRILPWQVLDBCYCKOC"
-
-# Do not change anything below
-
-import os, sys
-
-if automation_secret != "":
- url = 'https://localhost/%scheck_mk/view.py?view_name=aggr_summary&output_format=p…' \
- '&_username=%s&_secret=%s' % (url_prefix, user, automation_secret)
-elif password != "":
- url = 'https://localhost/%scheck_mk/login.py?_login=1&_username=%s&_password=%s' \
- '&_origtarget=view.py%%3Fview_name=aggr_summary%%26output_format=python' % \
- (url_prefix, user, password)
-else:
- sys.stderr.write("You need to specify a password or an automation secret in the script source\n")
- sys.exit(1)
-
-
-try:
- command = "curl -u \"%s:%s\" -b /dev/null -L --noproxy localhost --insecure --silent '%s'" % \
- (user, password, url)
- output = os.popen(command).read()
- data = eval(output)
-except:
- sys.stderr.write("Invalid output from URL %s:\n" % url)
- sys.stderr.write(output)
- sys.stderr.write("Command was: %s\n" % command)
- sys.exit(1)
-
-states = {
- "OK" : 0,
- "WARN" : 1,
- "CRIT" : 2,
- "UNKNOWN" : 3,
-}
-
-for name, state, output in data[1:]:
- state_nr = states.get(state, -1)
- descr = "BI_Aggr_" + name.replace(" ", "_")
- if state_nr != -1:
- text = "%d %s - %s" % (state_nr, descr, state)
- if output:
- text += " - " + output
- print text
-
special version of check_bi_local.
py accepting selfsigned certificates
on https
Message-ID: <5322de07.B25DOu565gTznny5%bs(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: eda2b4bd38d1e6ca027a5bd32b148c1bce555805
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eda2b4bd38d1e6…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Mar 14 11:45:16 2014 +0100
check_bi_local_https_insecure.py: special version of check_bi_local.py accepting selfsigned certificates on https
---
.../localchecks/check_bi_local_https_insecure.py | 99 ++++++++++++++++++++
1 file changed, 99 insertions(+)
diff --git a/doc/treasures/localchecks/check_bi_local_https_insecure.py b/doc/treasures/localchecks/check_bi_local_https_insecure.py
new file mode 100755
index 0000000..b1e6c92
--- /dev/null
+++ b/doc/treasures/localchecks/check_bi_local_https_insecure.py
@@ -0,0 +1,99 @@
+#!/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.
+
+# Example for creating real Nagios checks from BI aggregations.
+
+# use check_bi_local_https_insecure.py instead of check_bi_local.py
+# only if using https with selfsigned certificates.
+# please note: this might be an security issue, because *every* certificate
+# is accepted
+
+# Installation:
+# 1. Put this file in /usr/lib/check_mk_agent/local
+# 2. Make the file executable
+# 3. Add a correct url_prefix (OMD site and slash)
+# user with read access to Multisite.
+# 4. Add password OR automation secret of this user
+
+url_prefix = "" # non-OMD installations
+# url_prefix = "mysite/" # with OMD site name
+
+# Authentication credentials
+user = "omdadmin"
+
+# use password OR automation_secret (you do not need both of them!!)
+# set the other one to the empty string ""
+# either:
+password = "omd"
+automation_secret=""
+
+# or:
+# password = ""
+# automation_secret = "LSEGRILPWQVLDBCYCKOC"
+
+# Do not change anything below
+
+import os, sys
+
+if automation_secret != "":
+ url = 'https://localhost/%scheck_mk/view.py?view_name=aggr_summary&output_format=p…' \
+ '&_username=%s&_secret=%s' % (url_prefix, user, automation_secret)
+elif password != "":
+ url = 'https://localhost/%scheck_mk/login.py?_login=1&_username=%s&_password=%s' \
+ '&_origtarget=view.py%%3Fview_name=aggr_summary%%26output_format=python' % \
+ (url_prefix, user, password)
+else:
+ sys.stderr.write("You need to specify a password or an automation secret in the script source\n")
+ sys.exit(1)
+
+
+try:
+ command = "curl -u \"%s:%s\" -b /dev/null -L --noproxy localhost --insecure --silent '%s'" % \
+ (user, password, url)
+ output = os.popen(command).read()
+ data = eval(output)
+except:
+ sys.stderr.write("Invalid output from URL %s:\n" % url)
+ sys.stderr.write(output)
+ sys.stderr.write("Command was: %s\n" % command)
+ sys.exit(1)
+
+states = {
+ "OK" : 0,
+ "WARN" : 1,
+ "CRIT" : 2,
+ "UNKNOWN" : 3,
+}
+
+for name, state, output in data[1:]:
+ state_nr = states.get(state, -1)
+ descr = "BI_Aggr_" + name.replace(" ", "_")
+ if state_nr != -1:
+ text = "%d %s - %s" % (state_nr, descr, state)
+ if output:
+ text += " - " + output
+ print text
+
Module: check_mk
Branch: master
Commit: f67231f9ca749209057c79649aa6198d1471a442
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f67231f9ca7492…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Mar 14 10:46:53 2014 +0100
emcvnx_disks, emcvnx_raidgroups.capacity: enhanced check manpages
---
checkman/emcvnx_disks | 3 +++
checkman/emcvnx_raidgroups.capacity | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/checkman/emcvnx_disks b/checkman/emcvnx_disks
index ffbbbca..5308902 100644
--- a/checkman/emcvnx_disks
+++ b/checkman/emcvnx_disks
@@ -21,6 +21,9 @@ description:
The information is retriefed by the special agent agent_emcvnx which uses
EMC's command line tool naviseccli.
+ If you always get Read: 0.00B/s, Write: 0.00B/s and you think this are not
+ the correct values, please note: Reporting of these data must be turned on
+ at the storage by a command like {setstats -on}
item:
Consists of bus ID, enclosure ID and disk ID as returned by the agent.
E. g. "1/1 Disk 9"
diff --git a/checkman/emcvnx_raidgroups.capacity b/checkman/emcvnx_raidgroups.capacity
index 6996c0d..a239804 100644
--- a/checkman/emcvnx_raidgroups.capacity
+++ b/checkman/emcvnx_raidgroups.capacity
@@ -19,6 +19,13 @@ item:
inventory:
Automatically configures one check for every RAID Group listed in the agent output.
+examples:
+ # set levels for RAID group 0 to 90% for WARN and 95% for CRIT
+ # for all hosts with the host tag emcvnx
+ checkgroup_parameters['filesystem'] = [
+ ( {'levels': (90.0, 95.0)}, ['emcvnx'], ALL_HOSTS, ['0$'] ),
+ ] + checkgroup_parameters['filesystem']
+
perfdata:
Three values: The first value is the used space of in the RAID Group
in MB. Also the minimum (0 MB), maximum (Logical Capacity of the RAID Group)
Module: check_mk
Branch: master
Commit: 75ead9b33539b90b47cdcc84f3c86e4bb3139ec2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=75ead9b33539b9…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Wed Mar 12 18:26:29 2014 +0100
dell_poweredge_pci: new check for pci devices on dell PowerEdge Servers
---
.werks/592 | 8 +++++
ChangeLog | 1 +
checkman/dell_poweredge_mem | 8 ++---
checkman/dell_poweredge_pci | 27 +++++++++++++++
checks/dell_poweredge_pci | 80 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 120 insertions(+), 4 deletions(-)
diff --git a/.werks/592 b/.werks/592
new file mode 100644
index 0000000..8fe436a
--- /dev/null
+++ b/.werks/592
@@ -0,0 +1,8 @@
+Title: dell_poweredge_pci: new check for pci devices on dell PowerEdge Servers
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1394645145
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 70fec53..c35d1d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -106,6 +106,7 @@
* 0588 dell_poweredge_amperage.current, dell_poweredge_amperage.power, dell_poweredge_cpu, dell_poweredge_status, dell_poweredge_temp: new checks for the Dell PowerEdge Blade Server
* 0589 brocade_tm: new check monitoring traffic manager statistics for interfaces of brocade devices
* 0591 dell_poweredge_mem: new check to monitor memory modules of Dell PowerEdge Servers
+ * 0592 dell_poweredge_pci: new check for pci devices on dell PowerEdge Servers
* 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/dell_poweredge_mem b/checkman/dell_poweredge_mem
index e22f890..cc1068a 100644
--- a/checkman/dell_poweredge_mem
+++ b/checkman/dell_poweredge_mem
@@ -9,19 +9,19 @@ description:
{memoryDeviceStatus}.
The state of the check is {OK} when the device returns a state of {OK}.
- The state of the cehck is {WARN} when the device returns a state of {other},
+ The state of the check is {WARN} when the device returns a state of {other},
{unknown} or {nonCritical}. The state of the check is {CRIT} otherwise.
No limits are set in the check.
- In addition to the state the following information of the memory modules
- is retrieved and displayed in the check output: size, speed, manufacturer,
+ In addition to the state the following information of the PCI devices is
+ retrieved and displayed in the check output: size, speed, manufacturer,
part number and serial number
item:
The name of the location variable configured for the memory module
inventory:
- All memory module of the device are detected
+ All memory modules of the device are detected
diff --git a/checkman/dell_poweredge_pci b/checkman/dell_poweredge_pci
new file mode 100644
index 0000000..dfaf065
--- /dev/null
+++ b/checkman/dell_poweredge_pci
@@ -0,0 +1,27 @@
+title: Dell PowerEdge Server: State of PCI Devices
+agents: snmp
+catalog: hw/network/dell
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the state of the PCI devices of Dell PowerEdge Servers.
+ The state is extracted from the device via SNMP from the parameter
+ {pCIDeviceStatus}.
+
+ The state of the check is {OK} when the device returns a state of {OK}.
+ The state of the cehck is {WARN} when the device returns a state of {other},
+ {unknown} or {nonCritical}. The state of the check is {CRIT} otherwise.
+
+ No limits are set in the check.
+
+ In addition to the state the following information of the memory modules
+ is retrieved and displayed in the check output: width of the data bus,
+ description of the device and manufacturer,
+
+item:
+ The name of the fqdd variable for the device
+
+inventory:
+ All PCI devices of the device are detected
+
+
diff --git a/checks/dell_poweredge_pci b/checks/dell_poweredge_pci
new file mode 100644
index 0000000..fdc22cd
--- /dev/null
+++ b/checks/dell_poweredge_pci
@@ -0,0 +1,80 @@
+#!/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.
+
+dell_poweredge_pci_info = ( ".1.3.6.1.4.1.674.10892.5.4.1100.80.1", [
+ #"1", # pCIDevicechassisIndex 0
+ #"2", # pCIDeviceIndex 1
+ #"3", # pCIDeviceStateCapabilities
+ #"4", # pCIDeviceStateSettings 0
+ "5", # pCIDeviceStatus 0
+ "7", # pCIDeviceDataBusWidth 1
+ "8", # pCIDeviceManufacturerName 2
+ "9", # pCIDeviceDescriptionName 3
+ "12", # pCIDeviceFQDD 4
+ ])
+
+dell_poweredge_pci_scan = lambda oid: oid('.1.3.6.1.2.1.1.2.0') == ".1.3.6.1.4.1.674.10892.5"
+
+def inventory_dell_poweredge_pci(info):
+ inventory = []
+ for line in info:
+ fqdd = line[4]
+ if fqdd != "":
+ inventory.append( ( fqdd, None ) )
+ return inventory
+
+def check_dell_poweredge_pci(item, _no_params, info):
+ di = dict()
+ for status, di['BusWidth'], di['Manufacturer'], di['Description'], fqdd in info:
+
+ if item == fqdd:
+ state_table = {
+ "1" : ( "other", 1 ),
+ "2" : ( "unknown", 1 ),
+ "3" : ( "", 0 ),
+ "4" : ( "nonCritical", 1 ),
+ "5" : ( "Critical", 2 ),
+ "6" : ( "NonRecoverable", 2 ),
+ }
+ infotext, state = state_table.get(status, "2")
+ for parameter, value in di.items():
+ infotext += ", %s: %s" % ( parameter, value )
+
+ infotext = re.sub("^, ","", infotext)
+
+ return state, infotext
+
+ return 3, "Memory Device not found"
+
+check_info["dell_poweredge_pci"] = {
+ "check_function" : check_dell_poweredge_pci,
+ "inventory_function" : inventory_dell_poweredge_pci,
+ "service_description" : "%s",
+ "has_perfdata" : False,
+ "snmp_info" : dell_poweredge_pci_info,
+ "snmp_scan" : dell_poweredge_pci_scan,
+}
+