Module: check_mk
Branch: master
Commit: 3be1151f5520fa55725af6e7f25ff855328655f4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3be1151f5520fa…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Mar 17 16:05:07 2014 +0100
df: now able to monitor inodes
The df check is now able to monitor the number of remaining inodes.
In WATO you can configure the limits of the remaining inodes, either in
absolute or as percentage values.
---
.werks/732 | 10 +++++
ChangeLog | 3 +-
agents/check_mk_agent.linux | 6 +++
checkman/df | 6 +++
checks/df | 39 +++++++++++++++---
checks/df.include | 72 +++++++++++++++++++++++++++++-----
checks/esx_vsphere_datastores | 2 +-
web/plugins/wato/check_parameters.py | 21 ++++++++++
8 files changed, 141 insertions(+), 18 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3be1151f55…
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)