Module: check_mk
Branch: master
Commit: 786c47236bd9f44f521568e4fe0109c326b917d3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=786c47236bd9f4…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Jan 31 12:06:10 2014 +0100
FIX Error rates for network interfaces can now be set smaller then 0.1 when using Wato.
Values like smaller 0.1 are not longer saved as 0.0.
---
.werks/131 | 9 +++++++++
ChangeLog | 1 +
web/plugins/wato/check_parameters.py | 4 ++--
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.werks/131 b/.werks/131
new file mode 100644
index 0000000..2c1011c
--- /dev/null
+++ b/.werks/131
@@ -0,0 +1,9 @@
+Title: Error rates for network interfaces can now be set smaller then 0.1 when using Wato.
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1391166250
+
+Values like smaller 0.1 are not longer saved as 0.0.
diff --git a/ChangeLog b/ChangeLog
index 116dc46..ccf2518 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -241,6 +241,7 @@
* 0129 FIX: Fixed permission bug in "Edit user profile" dialog....
* 0269 FIX: brocade_fcport: fixed problem on displaying check_parameters in WATO...
* 0271 FIX: Fixed sorting in duallist element (two lists with interchangable elements)...
+ * 0131 FIX: Error rates for network interfaces can now be set smaller then 0.1 when using Wato....
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index f411f4a..6973b05 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1746,8 +1746,8 @@ register_check_parameters(
"the given bounds. The error rate is computed by dividing number of "
"errors by the total number of packets (successful plus errors)."),
elements = [
- Percentage(title = _("Warning if above"), label = _("errors"), default_value = 0.01),
- Percentage(title = _("Critical if above"), label = _("errors"), default_value = 0.1)
+ Percentage(title = _("Warning if above"), label = _("errors"), default_value = 0.01, display_format = '%.3f' ),
+ Percentage(title = _("Critical if above"), label = _("errors"), default_value = 0.1, display_format = '%.3f' )
])),
( "speed",
OptionalDropdownChoice(
Module: check_mk
Branch: master
Commit: d51f7f9bed716f777b46c76f47bb89071ae09879
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d51f7f9bed716f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 31 10:34:22 2014 +0100
Update for Inventory system draft
---
doc/drafts/LIESMICH.hardwareinventur | 71 +++++++++++++++-------------------
1 file changed, 31 insertions(+), 40 deletions(-)
diff --git a/doc/drafts/LIESMICH.hardwareinventur b/doc/drafts/LIESMICH.hardwareinventur
index efca246..ab26c90 100644
--- a/doc/drafts/LIESMICH.hardwareinventur
+++ b/doc/drafts/LIESMICH.hardwareinventur
@@ -31,10 +31,10 @@ interaktiv aufklappen und ansehen kann.
suchen kann, z.B. alle Hosts, die eine bestimmte Software enthalten,
oder dergleichen.
-6. Man kann einen Funktion global konfigurieren, die jeden Update der
+6. Man kann eine Funktion global konfigurieren, die jedes Update der
Inventurdaten eines Hosts an ein Skript übergibt. Dieses kann die Daten
-dann an eine CMBD senden (z.B. i-doit).
-
+dann an eine CMBD senden (z.B. i-doit) oder ein Lizenzverwaltungssystem
+(z.B. Aspera).
@@ -46,7 +46,7 @@ dann an eine CMBD senden (z.B. i-doit).
[1] Agenten
Wir schreiben sowohl für Linux, als auch für Windows ein Plugin mk_hwinventory,
-welches Daten sammelt, die von aktuellen Checks nicht ermittelt werden. Ein
+welches Daten sammelt, die von aktuellen Checks nicht ermittelt werden. Ein
Beispiel dafür für Linux:
Code im Plugin:
@@ -70,19 +70,18 @@ account-plugin-salut 3.6.0.3-0ubuntu1
account-plugin-twitter 0.8-0ubuntu2.2
account-plugin-windows-live 0.8-0ubuntu2.2
-Damit die Menge der Daten, die vom Agenten übertragen wird, nicht
-unnötige aufgebläht wird, überträgt der Agent die Inventurdaten nur
-in einem einstellbaren Turnus. Dazu wird bei Linux die run_cached-Funktion
-so erweitert, dass sie eine --once Option bekommt. Diese führt dazu,
-dass das Ergebnis eines asynchronen Laufes nur ein einziges Mal
-ausgeliefert wird. In den Sektionsheader wird der Schlüssel :persist
-eingebaut (Beispiel: <<<deb_packages:persist(1440)>>>). Dieser signalisiert
-Check_MK, dass diese Sektion persistiert werden soll. Wenn bei einem
-Agentenlauf die Sektion fehlt, wird sie einfach aus diesem Persistenzspeicher
-geholt. Die Zahl in Klammern ist die Anzahl von Minuten, für die
-das gültig sein soll. Wenn innerhalb dieser Zeit keine neuen Daten
-kommen, wird das persistierte Verworfen und gilt als veraltet.
-Im aktuellen Windows-Agenten muss das analog umgesetzt werden.
+Damit die Menge der Daten, die vom Agenten übertragen wird, nicht unnötige
+aufgebläht wird, überträgt der Agent die Inventurdaten nur in einem
+einstellbaren Turnus. Dazu wird bei Linux die run_cached-Funktion so
+erweitert, dass sie eine --once Option bekommt. Diese führt dazu, dass
+das Ergebnis eines asynchronen Laufes nur ein einziges Mal ausgeliefert
+wird. In den Sektionsheader wird der Schlüssel :persist eingebaut (Beispiel:
+<<<deb_packages:persist(1440)>>>). Dieser signalisiert Check_MK, dass diese
+Sektion persistiert werden soll. Wenn bei einem Agentenlauf die Sektion fehlt,
+wird sie einfach aus diesem Persistenzspeicher geholt. Die Zahl in Klammern
+ist die Anzahl von Minuten, für die das gültig sein soll. Wenn innerhalb
+dieser Zeit keine neuen Daten kommen, wird das persistierte Verworfen und gilt
+als veraltet. Im aktuellen Windows-Agenten muss das analog umgesetzt werden.
Im Check_mk werden diese Daten abgelegt nach var/check_mk/persist/HOSTNAME/SECTION
@@ -91,9 +90,9 @@ Im Check_mk werden diese Daten abgelegt nach var/check_mk/persist/HOSTNAME/SECTI
Pro Host wird ein logischer Baum angelegt, in dem die Inventurdaten gespeichert
werden. Diese kann von Check_MK aus leicht in eine Python-Struktur eingelesen
-werden und wieder gespeichert werden. Die Speicherung kann im Prototyp wie
-üblich mit repr() erfolgen. Später kann man evtl. eine MongoDB einsetzen,
-falls die Recherchefunktionen sonst nicht performant genug sind.
+werden und wieder gespeichert werden. Die Speicherung erfolgt zunächst
+wie üblich als Python-Datenstruktur. Später kann man evtl. eine MongoDB
+einsetzen, falls die Recherchefunktionen sonst nicht performant genug sind.
Hier ist ein Beispiel für eine sehr rudimentäre, gekürzte Struktur:
{
@@ -161,26 +160,24 @@ def inventary_foo(info, tree):
tree["software"]["packages"] = packages
-Es kann auch Plugins geben, die keine Daten aus info auswerten,
-sondern direkt in den Baum schauen und weitere Daten daraus
-ableiten. So könnte man z.B. aus der RPM-Liste ermitteln, dass
-auf einem System eine Apache installiert ist.
-
+Es kann auch Plugins geben, die keine Daten aus info auswerten, sondern direkt
+in den Baum schauen und weitere Daten daraus ableiten. So könnte man z.B. aus
+der RPM-Liste ermitteln, dass auf einem System eine Apache installiert ist.
-Die Baumstruktur wird ebenfalls über eine Art Plugins aufgebaut.
-Damit wird sichergestellt, dass der Baum alle Äste enthält, bevor
-die Inventurplugins aufgerufen werden. In den Strukturdefinitionen
-wird auch festgelegt, wie die einzelnen Äste später dargestellt werden.
-Dazu muss man noch ein Konzept entwickeln.
+Die Baumstruktur wird ebenfalls über eine Art Plugins aufgebaut. Damit wird
+sichergestellt, dass der Baum alle Äste enthält, bevor die Inventurplugins
+aufgerufen werden. In den Strukturdefinitionen wird auch festgelegt, wie
+die einzelnen Äste später dargestellt werden. Dazu muss man noch ein
+Konzept entwickeln.
[3] Hooks und Eintrag in CMDB
Nachdem der Baum für einen Host gefüllt und auf Platte geschrieben wurde,
-werden frei definierbare Hookskripten ausgefürt. So ein Hook kann dann
-in die CMDB den Update der Daten eines Hosts schreiben. Dazu stellt die
-CMDB z.B. einen Webservice bereit, welcher in JSON-Syntax den Baum erhält
-und diesen dann komplett oder teilweise in eigene Datenstrukturen ablegt.
+werden frei definierbare Hookskripten ausgefürt. So ein Hook kann dann in
+die CMDB den Update der Daten eines Hosts schreiben. Dazu stellt die CMDB
+z.B. einen Webservice bereit, welcher in JSON-Syntax den Baum erhält und
+diesen dann komplett oder teilweise in eigene Datenstrukturen ablegt.
[4] Ansicht der Daten in Multisite: Baumdarstellung
@@ -209,9 +206,3 @@ RPM-Paket X", dann ist das X ja variabel. Dies könnten wir evtl. lösen,
in dem wir den bestehenden Mechanismus zum Anzeigen von Service-Daten in
Hosttabellen verwenden.
-
--------------------------------------------------------------------------------
- N O T I Z E N
--------------------------------------------------------------------------------
-
-- Das ganze muss natürlich auch auf Workstations funktionieren!
Module: check_mk
Branch: master
Commit: ad42210e1157eec632437f0dca630cb5ef56e6c5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ad42210e1157ee…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 30 15:15:46 2014 +0100
Updated bug entries #1089
---
.bugs/1089 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/1089 b/.bugs/1089
new file mode 100644
index 0000000..d3d094f
--- /dev/null
+++ b/.bugs/1089
@@ -0,0 +1,10 @@
+Title: New user custom attribute needs apache restart to work
+Component: wato
+State: open
+Date: 2014-01-30 15:14:42
+Targetversion: 1.2.5i1
+Class: bug
+
+If you create a new custom attribute for users then you
+need to restart Apache in order to make that attribute visible
+in the WATO pages.
Module: check_mk
Branch: master
Commit: ac6581cc559eebc056ccccd941c26f2d268a5c0c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ac6581cc559eeb…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Jan 30 13:58:48 2014 +0100
FIX: fixed a few exceptions in new parameters of service overview
---
web/htdocs/wato.py | 60 ++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 47 insertions(+), 13 deletions(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 85ec017..f1edb20 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2234,33 +2234,68 @@ def mode_object_parameters(phase):
groupnames.sort()
+ def render_rule_reason(title, title_url, reason, reason_url, is_default, setting):
+ if title_url:
+ title = '<a href="%s">%s</a>' % (title_url, title)
+ forms.section(title)
+
+ if reason:
+ title = '<a href="%s">%s</a>' % (reason_url, reason)
+ if is_default:
+ reason = '<i>' + reason + '</i>'
+ html.write("<table class=setting><tr><td class=reason>%s</td>" % reason)
+ html.write('<td class="settingvalue %s">%s</td></tr></table>' % (is_default and "unused" or "used", setting))
+
+
# For services we make a special handling the for origin and parameters
# of that service!
if service:
serviceinfo = check_mk_automation(host[".siteid"], "analyse-service", [hostname, service])
if serviceinfo:
forms.header(_("Check Origin and Parameters"), isopen = True, narrow=True, css="rulesettings")
- forms.section(_("Type of check"))
- html.write("<table class=setting><tr><td class=reason></td><td class=setting>")
origin = serviceinfo["origin"]
- html.write({
+ origin_txt = {
"active" : _("Active check"),
"static" : _("Manual check"),
"auto" : _("Inventorized check"),
"classic" : _("Classical check"),
- }[origin])
- html.write("</td></tr></table>")
+ }[origin]
+ render_rule_reason(_("Type of check"), None, "", "", False, origin_txt)
+ # First case: inventorized checks. They come from var/check_mk/autochecks/HOST.
if origin == "auto":
checkgroup = serviceinfo["checkgroup"]
checktype = serviceinfo["checktype"]
- if not group:
- htmlwrite(_("This check is not configurable via WATO"))
- else:
- rulespec = g_rulespecs["checkgroup_parameters:" + checkgroup]
+ if not checkgroup:
+ render_rule_reason(_("Parameters"), None, "", "", True, _("This check is not configurable via WATO"))
+
+ # Logwatch needs a special handling, since it is not configured
+ # via checkgroup_parameters but via "logwatch_rules" in a special
+ # WATO module.
+ elif checkgroup == "logwatch":
+ rulespec = g_rulespecs["logwatch_rules"]
output_analysed_ruleset(all_rulesets, rulespec, hostname,
serviceinfo["item"], serviceinfo["parameters"])
+ else:
+ # Note: some inventorized checks have a check group but
+ # *no* ruleset for inventorized checks. One example is "ps".
+ # That can be configured as a manual check or created by
+ # inventory. But in the later case all parameters are set
+ # by the inventory. This will be changed in a later version,
+ # but we need to address it anyway.
+ grouprule = "checkgroup_parameters:" + checkgroup
+ if grouprule not in g_rulespecs:
+ rulespec = g_rulespecs["static_checks:" + checkgroup]
+ url = make_link([('mode', 'edit_ruleset'), ('varname', "static_checks:" + checkgroup), ('host', hostname)])
+ render_rule_reason(_("Parameters"), url, _("Determined by inventory"), None, False,
+ rulespec["valuespec"]._elements[2].value_to_text(serviceinfo["parameters"]))
+
+ else:
+ rulespec = g_rulespecs[grouprule]
+ output_analysed_ruleset(all_rulesets, rulespec, hostname,
+ serviceinfo["item"], serviceinfo["parameters"])
+
elif origin == "static":
checkgroup = serviceinfo["checkgroup"]
checktype = serviceinfo["checktype"]
@@ -2271,12 +2306,11 @@ def mode_object_parameters(phase):
itemspec = rulespec["itemspec"]
if itemspec:
item_text = itemspec.value_to_text(serviceinfo["item"])
- forms.section(rulespec["itemspec"].title())
+ title = rulespec["itemspec"].title()
else:
- forms.section(_("Item"))
item_text = serviceinfo["item"]
- html.write("<table class=setting><tr><td class=reason></td><td class=setting>%s</td></tr></table>" %
- item_text)
+ title = _("Item")
+ render_rule_reason(title, None, "", "", False, item_text)
output_analysed_ruleset(all_rulesets, rulespec, hostname,
serviceinfo["item"], PARAMETERS_OMIT)
html.write(rulespec["valuespec"]._elements[2].value_to_text(serviceinfo["parameters"]))
Module: check_mk
Branch: master
Commit: 6ca864778d9e69d1fce246bf38d00ba2886cba6f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ca864778d9e69…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 29 16:29:40 2014 +0100
FIX if checks: port type 56 (fibrechannel) is no longer inventorized per default
Fibrechannel ports have their own checks, specifically written for them.
There is no need to inventorize them as if* services as well.
---
.werks/272 | 9 +++++++++
ChangeLog | 1 +
checks/hitachi_hnas_fc_if | 2 +-
checks/if.include | 5 ++++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/272 b/.werks/272
new file mode 100644
index 0000000..e4793e6
--- /dev/null
+++ b/.werks/272
@@ -0,0 +1,9 @@
+Title: if checks: port type 56 (fibrechannel) is no longer inventorized per default
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1391009094
+Class: fix
+
+Fibrechannel ports have their own checks, specifically written for them.
+There is no need to inventorize them as if* services as well.
diff --git a/ChangeLog b/ChangeLog
index 4d99b37..fc6c0f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -147,6 +147,7 @@
* 0262 FIX: ps: Now able to skip disabled "Process Inventory" rules...
* 0264 FIX: printer_supply_ricoh: now reports correct filling levels...
* 0575 FIX: cmciii_lcp_airin, cmciii_lcp_airout, cmciii_lcp_waterin, cmciii_lcp_waterout: improved handling of warning state...
+ * 0272 FIX: if checks: port type 56 (fibrechannel) is no longer inventorized per default...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/hitachi_hnas_fc_if b/checks/hitachi_hnas_fc_if
index f30ac6f..d1a66dc 100644
--- a/checks/hitachi_hnas_fc_if
+++ b/checks/hitachi_hnas_fc_if
@@ -31,7 +31,7 @@ def hitachi_hnas_fc_if_convert_info(info):
converted.append(map(str, [
"%d%03d" % (int(line[0]), int(line[1])), # ifIndex
line[0] + "." + line[1], # ifDescr (use ClusterNode.InterfaceIndex)
- 56, # ifType 56 (fibreChannel)
+ "", # ifType: do not set port type
int(line[3]) * 1000000000, # ifHighSpeed
line[2] == "1" and 1 or 2, # ifOperStatus (map other states to down)
line[4], # ifHCInOctets
diff --git a/checks/if.include b/checks/if.include
index 9d7a50f..a915911 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -26,7 +26,7 @@
# Functions and definitions used by if and if64
-if_inventory_porttypes = [ '6', '32', '56', '62', '117' ]
+if_inventory_porttypes = [ '6', '32', '62', '117' ]
if_inventory_portstates = [ '1' ]
if_inventory_uses_description = False
if_inventory_uses_alias = False
@@ -117,6 +117,9 @@ def inventory_if_common(info, has_nodeinfo = False):
porttypes = settings.get('porttypes', if_inventory_porttypes)
portstates = settings.get('portstates', if_inventory_portstates)
+ # Allow main check to set no port type (e.g. hitachi_hnas_fc_if)
+ porttypes.append("")
+
pre_inventory = []
pre_inventory_groups = []
group_patterns = {}
two lists with interchangable elements)
Message-ID: <52e90168.qP6kflZIAJSsoC07%ab(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: 703dfb85244f89167d1e25c13968f1292f8cbd6f
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=703dfb85244f89…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 29 14:23:53 2014 +0100
FIX Fixed sorting in duallist element (two lists with interchangable elements)
This fix ensures that if elements are moved from one list to the other
they are inserted at the correct alphanumerical index and not at the end.
---
.werks/271 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 15 ++++++++++++++-
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/.werks/271 b/.werks/271
new file mode 100644
index 0000000..4b30c21
--- /dev/null
+++ b/.werks/271
@@ -0,0 +1,10 @@
+Title: Fixed sorting in duallist element (two lists with interchangable elements)
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1391001637
+
+This fix ensures that if elements are moved from one list to the other
+they are inserted at the correct alphanumerical index and not at the end.
diff --git a/ChangeLog b/ChangeLog
index 534b548..0355943 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -238,6 +238,7 @@
* 0686 FIX: Fix replication with WATO if EC is enabled on master and disabled on slave
* 0129 FIX: Fixed permission bug in "Edit user profile" dialog....
* 0269 FIX: brocade_fcport: fixed problem on displaying check_parameters in WATO...
+ * 0271 FIX: Fixed sorting in duallist element (two lists with interchangable elements)...
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 5fd261a..3dd086e 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1803,7 +1803,20 @@ function vs_duallist_switch(field, varprefix) {
// Move the selected option to the other select field
var selected = field.options[field.selectedIndex];
field.removeChild(selected);
- other_field.appendChild(selected);
+
+ // Determine the correct child to insert
+ var sibling = other_field.firstChild;
+ while (sibling != null) {
+ if (sibling.nodeType == 1 && sibling.label.toLowerCase() > selected.label.toLowerCase())
+ break;
+ sibling = sibling.nextSibling
+ }
+
+ if (sibling)
+ other_field.insertBefore(selected, sibling);
+ else
+ other_field.appendChild(selected);
+
selected.selected = false;
// add remove from internal helper field