Module: check_mk
Branch: master
Commit: 1ffac1deb7c5316fee8e6ec152005cfa91a8ece7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ffac1deb7c531…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 29 08:54:43 2015 +0200
Fixed identation ; removed debug statements
---
agents/windows/plugins/mssql.vbs | 79 ++++++++++++++++++--------------------
1 file changed, 38 insertions(+), 41 deletions(-)
diff --git a/agents/windows/plugins/mssql.vbs b/agents/windows/plugins/mssql.vbs
index 0838f6f..69ff3d3 100644
--- a/agents/windows/plugins/mssql.vbs
+++ b/agents/windows/plugins/mssql.vbs
@@ -50,26 +50,26 @@ End Sub
Function readIniFile(path)
Dim parsed : Set parsed = CreateObject("Scripting.Dictionary")
If path <> "" Then
- Dim FH
- Set FH = FSO.OpenTextFile(path)
- Dim line, sec, pair
- Do Until FH.AtEndOfStream
- line = Trim(FH.ReadLine())
- If Left(line, 1) = "[" Then
- sec = Mid(line, 2, Len(line) - 2)
- Set parsed(sec) = CreateObject("Scripting.Dictionary")
- Else
- If line <> "" Then
- pair = Split(line, "=")
- If 1 = UBound(pair) Then
- parsed(sec)(Trim(pair(0))) = Trim(pair(1))
- End If
- End If
- End If
- Loop
- FH.Close
- End If
- Set readIniFile = parsed
+ Dim FH
+ Set FH = FSO.OpenTextFile(path)
+ Dim line, sec, pair
+ Do Until FH.AtEndOfStream
+ line = Trim(FH.ReadLine())
+ If Left(line, 1) = "[" Then
+ sec = Mid(line, 2, Len(line) - 2)
+ Set parsed(sec) = CreateObject("Scripting.Dictionary")
+ Else
+ If line <> "" Then
+ pair = Split(line, "=")
+ If 1 = UBound(pair) Then
+ parsed(sec)(Trim(pair(0))) = Trim(pair(1))
+ End If
+ End If
+ End If
+ Loop
+ FH.Close
+ End If
+ Set readIniFile = parsed
End Function
' Dummy empty output.
@@ -151,41 +151,38 @@ For Each instId In instIds.Keys
cfg_file = ""
End If
End If
-
- Set CFG = readIniFile(cfg_file)
- If Not CFG.Exists("auth") Then
- Set AUTH = CreateObject("Scripting.Dictionary")
- Else
- Set AUTH = CFG("auth")
- End If
-
+
+ Set CFG = readIniFile(cfg_file)
+ If Not CFG.Exists("auth") Then
+ Set AUTH = CreateObject("Scripting.Dictionary")
+ Else
+ Set AUTH = CFG("auth")
+ End If
+
' At this place one could implement to use other authentication mechanism
- If Not AUTH.Exists("type") or AUTH("type") = "system" Then
- CONN.Properties("Integrated Security").Value = "SSPI"
- Else
- CONN.Properties("User ID").Value = AUTH("username")
- CONN.Properties("Password").Value = AUTH("password")
- End If
- wscript.echo instId
+ If Not AUTH.Exists("type") or AUTH("type") = "system" Then
+ CONN.Properties("Integrated Security").Value = "SSPI"
+ Else
+ CONN.Properties("User ID").Value = AUTH("username")
+ CONN.Properties("Password").Value = AUTH("password")
+ End If
If InStr(instId, "__") <> 0 Then
instName = Split(instId, "__")(1)
- instId = Replace(instId, "__", "_")
- Else
+ instId = Replace(instId, "__", "_")
+ Else
instName = instId
End If
- wscript.echo instId
' In case of instance name "MSSQLSERVER" always use (local) as connect string
If instName = "MSSQLSERVER" Then
CONN.Properties("Data Source").Value = "(local)"
Else
CONN.Properties("Data Source").Value = hostname & "\" & instName
- End If
- WScript.echo (CONN)
+ End If
CONN.Open
-
+
' Get counter data for the whole instance
RS.Open "SELECT counter_name, object_name, instance_name, cntr_value " & _
"FROM sys.dm_os_performance_counters " & _
Module: check_mk
Branch: master
Commit: 5ea5e5ed936f2821d915729d5472ab4ec437fdbf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ea5e5ed936f28…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 29 08:48:53 2015 +0200
BI rules: Added some small help for rule config
---
web/htdocs/wato.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 05a918e..5c32900 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -17545,6 +17545,8 @@ def declare_bi_valuespecs(aggregation_rules):
explicit = TextAscii(size = 60),
otherlabel = _("Regex for host name"),
default_value = None,
+ help = _("If you choose \"Regex for host name\", you need to provide a regex "
+ "which results in exactly one match group."),
),
CascadingDropdown(
title = _("Nodes to create:"),
Module: check_mk
Branch: master
Commit: 823d29b35e9373a25ef20404d1b33c5665db91f8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=823d29b35e9373…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jul 29 08:29:47 2015 +0200
#2500 FIX qlogic_fcport: Can now deal with missing port status information
Some devices, like for example QLogic 8 Gb and 4/8 Gb Intelligent Pass-thru
Modules for IBM BladeCenter do not report admin/oper-status information
for their interfaces. These interfaces are allways discovered.
---
.werks/2500 | 11 +++++++++++
ChangeLog | 1 +
checks/qlogic_fcport | 27 +++++++++++++++++++++------
3 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/.werks/2500 b/.werks/2500
new file mode 100644
index 0000000..c2522e3
--- /dev/null
+++ b/.werks/2500
@@ -0,0 +1,11 @@
+Title: qlogic_fcport: Can now deal with missing port status information
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1438151316
+Class: fix
+
+Some devices, like for example QLogic 8 Gb and 4/8 Gb Intelligent Pass-thru
+Modules for IBM BladeCenter do not report admin/oper-status information
+for their interfaces. These interfaces are allways discovered.
diff --git a/ChangeLog b/ChangeLog
index b3cf5cf..543fc4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -86,6 +86,7 @@
* 2498 FIX: livestatus_status: Records the number of hosts/services now
* 2489 FIX: cmciii_lcp_water: New check replacing cmciii_lcp_waterin/out, support for newer devices...
NOTE: Please refer to the migration notes!
+ * 2500 FIX: qlogic_fcport: Can now deal with missing port status information...
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce unhandled exceptions...
diff --git a/checks/qlogic_fcport b/checks/qlogic_fcport
index 4c5f279..c2b4cad 100644
--- a/checks/qlogic_fcport
+++ b/checks/qlogic_fcport
@@ -47,8 +47,11 @@ def inventory_qlogic_fcport(info):
c2_discards, c2_fbsy_frames, c2_frjt_frames, c3_in_frames, \
c3_out_frames, c3_in_octets, c3_out_octets, c3_discards in info:
- if admin_status in qlogic_fcport_inventory_admstates and \
- oper_status in qlogic_fcport_inventory_opstates:
+ # There are devices out there which are totally missing the status related
+ # SNMP tables. In this case we add all interfaces.
+ if (admin_status == '' and oper_status == '') \
+ or (admin_status in qlogic_fcport_inventory_admstates and \
+ oper_status in qlogic_fcport_inventory_opstates):
inventory.append( (qlogic_fcport_generate_port_id(port_id), None) )
return inventory
@@ -73,13 +76,18 @@ def check_qlogic_fcport(item, params, info):
message += " AdminStatus: online"
status = 0
elif admin_status == "2":
- message += "AdminStatus: offline (!!)"
+ message += " AdminStatus: offline (!!)"
status = 2
elif admin_status == "3":
- message += "AdminStatus: testing (!)"
+ message += " AdminStatus: testing (!)"
status = 1
+ elif admin_status == "":
+ # Is not a possible valid value in the MIB, but some devices don't
+ # provide status information at all (SNMP table missing).
+ message += " AdminStatus: not reported"
+ status = 0
else:
- message += "unknown AdminStatus %s (!)" % admin_status
+ message += " unknown AdminStatus %s (!)" % admin_status
status = 1
# fcFxPortPhysOperStatus
@@ -95,6 +103,11 @@ def check_qlogic_fcport(item, params, info):
elif oper_status == "4":
message += ", OperStatus: linkFailure (!!)"
status = max(status, 2)
+ elif admin_status == "":
+ # Is not a possible valid value in the MIB, but some devices don't
+ # provide status information at all (SNMP table missing).
+ message += ", OperStatus: not reported"
+ status = 0
else:
message += ", unknown OperStatus %s (!)" % oper_status
status = max(status, 1)
@@ -202,9 +215,11 @@ check_info["qlogic_fcport"] = {
]),
# .1.3.6.1.4.1.3873.1.14 Qlogic-Switch
# .1.3.6.1.4.1.3873.1.8 Qlogic-4Gb SAN Switch Module for IBM BladeCenter
+ # .1.3.6.1.4.1.3873.1.12 QLogic 8 Gb and 4/8 Gb Intelligent Pass-thru Module
'snmp_scan_function' : lambda oid: \
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.3873.1.14") \
- or oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.3873.1.8"),
+ or oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.3873.1.8") \
+ or oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.3873.1.12"),
'group': 'qlogic_fcport',
'default_levels_variable': 'qlogic_fcport_default_levels',
}
Module: check_mk
Branch: master
Commit: 09f47fac156b8a0b156dc3ce8ce3f42b0df753a1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=09f47fac156b8a…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Tue Jul 28 12:30:32 2015 +0200
Fixed typo
---
web/plugins/wato/check_parameters.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 79a9132..594c03a 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -6102,7 +6102,7 @@ register_rule(
"description. The UUID will be displayed in the pluging output."))
),
],
- help = _("This rule controls wether the UUID or the alias is used in the service description during "
+ help = _("This rule controls whether the UUID or the alias is used in the service description during "
"discovery of Multipath devices on Linux."),
),
match = 'dict',
Module: check_mk
Branch: master
Commit: 46628eb7d14b5ebedf1906bd7e3278e066afd128
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=46628eb7d14b5e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 28 12:28:49 2015 +0200
#2499 FIX Git: Fixed message "Please tell me who you are. Run git config ..." on making changes
At least on Ubuntu 15.04 a user/mail had to be configured in the git repository. Even
when the single changes of the users do set an own author.
---
.werks/2499 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/.werks/2499 b/.werks/2499
new file mode 100644
index 0000000..ce5ca55
--- /dev/null
+++ b/.werks/2499
@@ -0,0 +1,11 @@
+Title: Git: Fixed message "Please tell me who you are. Run git config ..." on making changes
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1438079275
+
+At least on Ubuntu 15.04 a user/mail had to be configured in the git repository. Even
+when the single changes of the users do set an own author.
diff --git a/ChangeLog b/ChangeLog
index 79bca0d..b3cf5cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -132,6 +132,7 @@
* 2467 FIX: Fixed encoding exception occuring in localized GUI when a WATO action triggers an error message...
* 2407 FIX: WATO master/slave replication: fixed problem where the configuration from the master site was not activate on slave site...
* 2474 FIX: Fixed possible corruption of user datasets (contact, mail, rbn config)...
+ * 2499 FIX: Git: Fixed message "Please tell me who you are. Run git config ..." on making changes...
Notifications:
* 2478 Integrated notification plugin for mobile phone push messages via Pushover...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4ca4127..05a918e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -392,6 +392,12 @@ def do_git_commit():
if not os.path.exists(git_dir):
git_command(["init"])
+ # Set git repo global user/mail. seems to be needed to prevent warning message
+ # on at least ubuntu 15.04: "Please tell me who you are. Run git config ..."
+ # The individual commits by users override the author on their own
+ git_command(["config", "user.email", "check_mk"])
+ git_command(["config", "user.name", "check_mk"])
+
# Make sure that .gitignore-files are present and uptodate
file(defaults.default_config_dir + "/.gitignore", "w").write("*\n!*.d\n!.gitignore\n*swp\n")
for subdir in os.listdir(defaults.default_config_dir):