Module: check_mk
Branch: master
Commit: a57bc69c3e35b2f11ea5788c45934e6a4e2ebbe8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a57bc69c3e35b2…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Mar 3 15:56:44 2014 +0100
Removed caching function in Windows Update agent plugin
The current Windows Agent Versions has a build in caching mechanism. Cause of this the buildin caching features from windows_update.vbs are now removed. Please make shure that caching is activated in the check_mk.ini file.
A example config can look like this:
[plugin]
cache_age windows_updates.vbs = 3600
---
.werks/138 | 12 +++
ChangeLog | 2 +
agents/windows/plugins/windows_updates.vbs | 119 ++++++++++------------------
3 files changed, 55 insertions(+), 78 deletions(-)
diff --git a/.werks/138 b/.werks/138
new file mode 100644
index 0000000..a1dcfd6
--- /dev/null
+++ b/.werks/138
@@ -0,0 +1,12 @@
+Title: Removed caching function in Windows Update agent plugin
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1393858396
+Class: incomp
+
+The current Windows Agent Versions has a build in caching mechanism. Cause of this the buildin caching features from windows_update.vbs are now removed. Please make shure that caching is activated in the check_mk.ini file.
+
+A example config can look like this:
+[plugin]
+ cache_age windows_updates.vbs = 3600
diff --git a/ChangeLog b/ChangeLog
index 07491e3..e1e009c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -98,6 +98,8 @@
* 0704 windows_os_bonding: new check for bonding interfaces on windows...
* 0562 esx_vsphere_vm.guest_tools: new check to monitor guest tools status...
* 0674 brocade_fcport: Now supporting interface speed of 16 Gbit (just discovered in the wild)
+ * 0138 Removed caching function in Windows Update agent plugin...
+ NOTE: Please refer to the migration notes!
* 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/windows_updates.vbs b/agents/windows/plugins/windows_updates.vbs
index 2a8aa70..b446d81 100644
--- a/agents/windows/plugins/windows_updates.vbs
+++ b/agents/windows/plugins/windows_updates.vbs
@@ -13,6 +13,9 @@
' Based on code here: http://www.monitoring-portal.org/wbb/index.php?page=Thread&threadID=23509
' Spawning a separate process to produce cached result (as in above forum discussion) caused me
' 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
' -----------------------------------------------------------------------------------------
Option Explicit
@@ -36,12 +39,9 @@ end function
Dim result, reboot, numImp, numOpt, important, opti
Dim updtSearcher, colDownloads, objEntry
-Dim objFSO, objFile
+Dim objFSO, stdout
Set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
-
-Dim lastModificationDate
-Dim updateNeeded
-updateNeeded = True
+Set stdout = objFSO.GetStandardStream(1)
Dim WSHShell
Set WSHShell = CreateObject("WScript.Shell")
@@ -49,86 +49,49 @@ Set WSHShell = CreateObject("WScript.Shell")
Dim RebootTime
Dim RegPath
-Dim scriptname, scriptpath, strFolder
-
-scriptname = Wscript.ScriptFullName
-scriptpath = objFSO.getparentfoldername(scriptname)
-
-strFolder = scriptpath & "\windows-update"
-set objFSO = createobject("Scripting.FileSystemObject")
-
-if objFSO.FolderExists(strFolder) = False then
- objFSO.CreateFolder strFolder
-end if
-
-Dim ts, TextLine
-Dim rndFudge
-
-Randomize
-rndFudge = Int(8 * 60 * Rnd) ' random fudge factor for test (0 to 8 hrs)
-
-If objFSO.FileExists(scriptpath &"\windows-update\windows_updates-log.txt") Then
- lastModificationDate = objFSO.GetFile(scriptpath &"\windows-update\windows_updates-log.txt").DateLastModified
- If DateDiff("n", lastModificationDate, now) < ((60*24)-rndFudge) Then ' 1 day minus 0 to 8 hours
- updateNeeded = False
- End If
+If CreateObject("Microsoft.Update.AutoUpdate").DetectNow <> 0 Then
+ stdout.WriteLine("<<<windows_updates>>>")
+ WScript.Quit()
End If
-If updateNeeded Then
- Set objFile = objFSO.CreateTextFile(scriptpath &"\windows-update\windows_updates-log.txt")
+Set updtSearcher = CreateObject("Microsoft.Update.Session").CreateUpdateSearcher
- If CreateObject("Microsoft.Update.AutoUpdate").DetectNow <> 0 Then
- objFile.WriteLine("<<<windows_updates>>>")
- WScript.Quit()
- End If
-
- Set updtSearcher = CreateObject("Microsoft.Update.Session").CreateUpdateSearcher
+RegPath = "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows\CurrentVersion\WindowsUpdate\Auto Update\"
+RebootTime = ReadFromRegistry(RegPath & "NextFeaturedUpdatesNotificationTime","no_key")
- RegPath = "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows\CurrentVersion\WindowsUpdate\Auto Update\"
- RebootTime = ReadFromRegistry(RegPath & "NextFeaturedUpdatesNotificationTime","no_key")
+reboot = 0
+numImp = 0
+numOpt = 0
- reboot = 0
- numImp = 0
- numOpt = 0
-
- If CreateObject("Microsoft.Update.SystemInfo").RebootRequired Then
- reboot = 1
- End If
+If CreateObject("Microsoft.Update.SystemInfo").RebootRequired Then
+ reboot = 1
+End If
- Set result = updtSearcher.Search("IsInstalled = 0 and IsHidden = 0")
- Set colDownloads = result.Updates
-
- For Each objEntry in colDownloads
- if objEntry.AutoSelectOnWebSites Then
- if numImp = 0 Then
- important = objEntry.Title
- else
- important = important & "; " & objEntry.Title
- End If
- numImp = numImp + 1
+Set result = updtSearcher.Search("IsInstalled = 0 and IsHidden = 0")
+Set colDownloads = result.Updates
+For Each objEntry in colDownloads
+
+ if objEntry.AutoSelectOnWebSites Then
+ if numImp = 0 Then
+ important = objEntry.Title
+ else
+ important = important & "; " & objEntry.Title
+ End If
+ numImp = numImp + 1
+ Else
+ If numOpt = 0 Then
+ opti = objEntry.Title
Else
- If numOpt = 0 Then
- opti = objEntry.Title
- Else
- opti = opti & "; " & objEntry.Title
- End If
- numOpt = numOpt + 1
- End If
- Next
-
- objFile.WriteLine("<<<windows_updates>>>")
- objFile.WriteLine(reboot & " " & numImp & " " & numOpt)
- objFile.WriteLine(important)
- objFile.WriteLine(opti)
- objFile.WriteLine(RebootTime)
- objFile.Close
-
-End If
+ opti = opti & "; " & objEntry.Title
+ End If
+ numOpt = numOpt + 1
+ End If
-Set ts = objFSO.GetFile(scriptpath &"\windows-update\windows_updates-log.txt").OpenAsTextStream(1, -2)
-Do While ts.AtEndOfStream <> True
- WScript.Echo ts.ReadLine
-Loop
-ts.Close
+Next
+ stdout.WriteLine("<<<windows_updates>>>")
+ stdout.WriteLine(reboot & " " & numImp & " " & numOpt)
+ stdout.WriteLine(important)
+ stdout.WriteLine(opti)
+ stdout.WriteLine(RebootTime)
WScript.Quit()
Module: check_mk
Branch: master
Commit: 3066033e3282a928fa01c5e46fd92939ac26ec97
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3066033e3282a9…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 3 14:23:05 2014 +0100
New rules based notifications
Check_MK comes now with a completely new notification system called <i>Rule Based
Notifications</i>. While keeping the flexibility of the <i>Flexible Notifications</i>
it is easier to configure and at the same time even more flexible. Please
refer to <a href="http://mathias-kettner.com/checkmk_rbn.html">the online documentation</a>
for details.
Rule based notifications are turned off per default. They do not harm you in
any way as long as you do not enable them. If you turn them on then your current
flexible notification settings are <i>not</i> being converted!
---
.werks/711 | 16 ++
ChangeLog | 1 +
doc/drafts/README.rule_based_notifications | 274 ----------------------------
3 files changed, 17 insertions(+), 274 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3066033e32…
Module: check_mk
Branch: master
Commit: 95fbc4d11f426e950c99a362f08aa7dbda9452e0
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=95fbc4d11f426e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 3 13:11:43 2014 +0100
Create a history entry for events that failed their target count
When a counting rule sees the first matching message, then an entry in the history
is logged with the type <tt>NEW</tt>. When the event did not reach the configured
number of required message within the configured time then no history entry was
logged. Now an entry of type <tt>COUNTFAILED</tt> is being logged and you can see
the count of messages received so far in that entry.
---
.werks/710 | 12 ++++++++++++
ChangeLog | 6 ++----
mkeventd/bin/mkeventd | 3 +++
3 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/.werks/710 b/.werks/710
new file mode 100644
index 0000000..b7dd48c
--- /dev/null
+++ b/.werks/710
@@ -0,0 +1,12 @@
+Title: Create a history entry for events that failed their target count
+Level: 1
+Component: ec
+Version: 1.2.5i1
+Date: 1393848610
+Class: feature
+
+When a counting rule sees the first matching message, then an entry in the history
+is logged with the type <tt>NEW</tt>. When the event did not reach the configured
+number of required message within the configured time then no history entry was
+logged. Now an entry of type <tt>COUNTFAILED</tt> is being logged and you can see
+the count of messages received so far in that entry.
diff --git a/ChangeLog b/ChangeLog
index 58dcab2..07491e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -190,12 +190,9 @@
* 0719 FIX: postfix_mailq: fix Linux agent in case of ssmtp being installed
* 0584 FIX: agent_vsphere: special agent now handles non-standard https port correctly...
* 0585 FIX: check_mk_agent.linux: more efficient handling of cups printer queues...
-<<<<<<< HEAD
- * 0587 FIX: if64: problems resolved when running as a clustered service...
-=======
* 0703 FIX: brocade_mlx: omit inventory of cpu and memory on more states...
* 0137 FIX: Fixed printer_pages...
->>>>>>> 9a0fafc30f54e0e7f2af9ac1fa7a41136d2019d1
+ * 0587 FIX: if64: problems resolved when running as a clustered service...
Multisite:
* 0371 Added log class filter to hostsvcevents view
@@ -323,6 +320,7 @@
Event Console:
* 0301 Handling messages of special syslog format correctly...
* 0388 Moved Event Console related settings to own settings page...
+ * 0710 Create a history entry for events that failed their target count...
* 0303 FIX: Old log entries were shown in event history first...
* 0304 FIX: Escaping several unwanted chars from incoming log messages...
* 0089 FIX: CSV export of event console was broken...
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 5b87b74..b00f40f 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -1187,11 +1187,14 @@ class EventServer:
if event["count"] == 0:
log("Rule %s, event %d: again without allowed rate, dropping event" %
(rule["id"], event["id"]))
+ log_event_history(event, "COUNTFAILED")
events_to_delete.append(nr)
+
else: # algorithm 'interval'
if event["first"] + count["period"] <= now: # End of period reached
log("Rule %s: reached only %d out of %d events within %d seconds. "
"Resetting to zero." % (rule["id"], event["count"], count["count"], count["period"]))
+ log_event_history(event, "COUNTFAILED")
events_to_delete.append(nr)
# Handle delayed actions
Module: check_mk
Branch: master
Commit: 9a0fafc30f54e0e7f2af9ac1fa7a41136d2019d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a0fafc30f54e0…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Mar 3 09:49:25 2014 +0100
FIX Fix NoneType has not attribute userdb_automatic_sync bug in D-WATO
---
.werks/709 | 9 +++++++++
ChangeLog | 1 +
web/plugins/wato/userdb.py | 13 ++++++++++---
3 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/.werks/709 b/.werks/709
new file mode 100644
index 0000000..d50f91d
--- /dev/null
+++ b/.werks/709
@@ -0,0 +1,9 @@
+Title: Fix NoneType has not attribute userdb_automatic_sync bug in D-WATO
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1393836538
+
+
diff --git a/ChangeLog b/ChangeLog
index da48fa2..649a992 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -297,6 +297,7 @@
* 0690 FIX: Fix language jumping to German when saving user profiles
* 0666 FIX: Minimum port for the mknotifyd is now 1024 (never use well known ports)...
* 0559 FIX: WATO snapshots: improved validation of (uploaded) snapshots...
+ * 0709 FIX: Fix NoneType has not attribute userdb_automatic_sync bug in D-WATO
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/plugins/wato/userdb.py b/web/plugins/wato/userdb.py
index 43608fd..ff7a0ef 100644
--- a/web/plugins/wato/userdb.py
+++ b/web/plugins/wato/userdb.py
@@ -24,9 +24,16 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-import userdb
-
def sync_pre_activate_changes(_unused):
- if 'wato_pre_activate_changes' in config.userdb_automatic_sync:
+ # In some rare cases for still unknown reasons at this time the
+ # variable config sometimes has the value None. This could or could
+ # not be a mod_python problem. But it makes the activation of changes
+ # in a D-WATO setup break. So better handle this case here.
+ try:
+ do_sync = 'wato_pre_activate_changes' in config.userdb_automatic_sync
+ except:
+ do_sync = False
+ if do_sync:
userdb.hook_sync()
+
api.register_hook('pre-activate-changes', sync_pre_activate_changes)
Module: check_mk
Branch: master
Commit: a65190c9c29293f32a34898bc22645ec25280b9c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a65190c9c29293…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 3 08:26:22 2014 +0100
brocade_fcport: Now supporting interface speed of 16 Gbit (just discovered in the wild)
---
.bugs/2127 | 13 +++++++++++++
.werks/674 | 8 ++++++++
ChangeLog | 1 +
checks/brocade_fcport | 6 +++++-
4 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/.bugs/2127 b/.bugs/2127
new file mode 100644
index 0000000..c1c411c
--- /dev/null
+++ b/.bugs/2127
@@ -0,0 +1,13 @@
+Title: EC-Check: Make check for hostname AND ipaddress match possible
+Component: ec
+State: open
+Date: 2014-03-03 08:20:36
+Targetversion: 1.2.5i1
+Class: nastiness
+
+When e.g. receiving SNMP-traps, only the ipaddress is known in the event. The view resolves the ipaddress to existing
+hostnames. As a result, the user thinks the "check event state in event console" check can check for events with matching
+host name. But this is not true, since the event only has the ipaddress stored.
+
+Either add an option "hostname or ipaddress" to the ec-check or use livestatus to try to resolve ipaddres to hostnames
+to make this easier to handle.
diff --git a/.werks/674 b/.werks/674
new file mode 100644
index 0000000..d97e152
--- /dev/null
+++ b/.werks/674
@@ -0,0 +1,8 @@
+Title: brocade_fcport: Now supporting interface speed of 16 Gbit (just discovered in the wild)
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1393831533
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index b273ac7..da48fa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -97,6 +97,7 @@
* 0586 rmon_stats: new snmp check to gather network traffic statistics on RMON enabled network interfaces
* 0704 windows_os_bonding: new check for bonding interfaces on windows...
* 0562 esx_vsphere_vm.guest_tools: new check to monitor guest tools status...
+ * 0674 brocade_fcport: Now supporting interface speed of 16 Gbit (just discovered in the wild)
* 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/checks/brocade_fcport b/checks/brocade_fcport
index 40078c7..c112e7a 100644
--- a/checks/brocade_fcport
+++ b/checks/brocade_fcport
@@ -25,11 +25,15 @@
# Boston, MA 02110-1301 USA.
# lookup tables for check implementation
+# Taken from swFCPortPhyState
brocade_fcport_phystates = [ '', 'noCard', 'noTransceiver', 'laserFault', 'noLight',
'noSync', 'inSync', 'portFault', 'diagFault', 'lockRef' ]
+# Taken from swFCPortOpStatus
brocade_fcport_opstates = [ 'unknown', 'online', 'offline', 'testing', 'faulty' ]
+# Taken from swFCPortAdmStatus
brocade_fcport_admstates = [ '', 'online', 'offline', 'testing', 'faulty' ]
-brocade_fcport_speed = [ 'unknown', '1Gbit', '2Gbit', 'auto-Neg', '4Gbit', '8Gbit', '10Gbit', ]
+# Taken from swFCPortSpeed
+brocade_fcport_speed = [ '', '1Gbit', '2Gbit', 'auto-Neg', '4Gbit', '8Gbit', '10Gbit', 'unknown', '16Gbit' ]
# settings for inventory: which ports should be inventorized