Module: check_mk
Branch: master
Commit: c7f7d1a3852a6758dbdced792fb89cd59833e631
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7f7d1a3852a67…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Nov 21 15:27:16 2013 +0100
FIX: Missing module subproccess in cmk_base
---
modules/check_mk_base.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index a1a5f60..74a2c09 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-import socket, os, sys, time, re, signal, math, tempfile
+import socket, os, sys, time, re, signal, math, tempfile, subprocess
# Python 2.3 does not have 'set' in normal namespace.
# But it can be imported from 'sets'
Module: check_mk
Branch: master
Commit: ce56e57b1d23bab49d02a33c5941e175a535eb6a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ce56e57b1d23ba…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Thu Nov 21 13:26:55 2013 +0100
FIX stored snmpwalks now get correct encoding of binary values
In stored snmpwalks up to now binary values were stored in their binary
representation which caused problems when reading them. Now they are
stored in their ASCII representation.
Furthermore for producing stored walks the inline snmp is never used.
Storedwalks are allways created by the command line tools no regard what
the Global Setting is set to.
---
.werks/81 | 14 ++++++++++++++
ChangeLog | 1 +
modules/check_mk.py | 5 +----
modules/snmp.py | 10 +++++-----
4 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/.werks/81 b/.werks/81
new file mode 100644
index 0000000..78126a5
--- /dev/null
+++ b/.werks/81
@@ -0,0 +1,14 @@
+Title: stored snmpwalks now get correct encoding of binary values
+Level: 2
+Component: checks
+Version: 1.2.3i7
+Date: 1385036527
+Class: fix
+
+In stored snmpwalks up to now binary values were stored in their binary
+representation which caused problems when reading them. Now they are
+stored in their ASCII representation.
+
+Furthermore for producing stored walks the inline snmp is never used.
+Storedwalks are allways created by the command line tools no regard what
+the Global Setting is set to.
diff --git a/ChangeLog b/ChangeLog
index 2c3230a..60bc479 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* 0209 FIX: Cleaned up bad code in fileinfo.groups check
* 0003 FIX: ps: Remove exceeding [ and ] in service description when using process inventory...
* 0037 FIX: checkman: alcatel power - now with correct classification...
+ * 0081 FIX: stored snmpwalks now get correct encoding of binary values...
Multisite:
* 0001 New filters for selecting several host/service-groups at once...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index a1cefa8..019b829 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -4142,10 +4142,7 @@ def do_snmpwalk_on(hostname, filename):
sys.stdout.write("Walk on \"%s\"..." % oid)
sys.stdout.flush()
- if has_inline_snmp and use_inline_snmp:
- results = inline_snmpwalk_on_suboid(hostname, oid, strip_values = False)
- else:
- results = snmpwalk_on_suboid(hostname, ip, oid)
+ results = snmpwalk_on_suboid(hostname, ip, oid, hex_plain = True)
for oid, value in results:
out.write("%s %s\n" % (oid, value))
diff --git a/modules/snmp.py b/modules/snmp.py
index b46d048..5f3a5f7 100644
--- a/modules/snmp.py
+++ b/modules/snmp.py
@@ -30,16 +30,16 @@ OID_END = 0
OID_STRING = -1
OID_BIN = -2
-def strip_snmp_value(value):
+def strip_snmp_value(value, hex_plain = False):
v = value.strip()
if v.startswith('"'):
v = v[1:-1]
if len(v) > 2 and is_hex_string(v):
- return convert_from_hex(v)
+ return not hex_plain and convert_from_hex(v) or value
else:
return v.strip()
else:
- return v.strip()
+ return v
def is_hex_string(value):
# as far as I remember, snmpwalk puts a trailing space within
@@ -398,7 +398,7 @@ def snmp_decode_string(text):
# | Non-inline SNMP handling code. Kept for compatibility. |
# '----------------------------------------------------------------------'
-def snmpwalk_on_suboid(hostname, ip, oid):
+def snmpwalk_on_suboid(hostname, ip, oid, hex_plain = False):
portspec = snmp_port_spec(hostname)
command = snmp_walk_command(hostname) + \
" -OQ -OU -On -Ot %s%s %s" % (ip, portspec, oid)
@@ -433,7 +433,7 @@ def snmpwalk_on_suboid(hostname, ip, oid):
value += " " + nextline
if value[-1] == '"':
break
- rowinfo.append((oid, strip_snmp_value(value)))
+ rowinfo.append((oid, strip_snmp_value(value, hex_plain)))
except StopIteration:
pass
Module: check_mk
Branch: master
Commit: bd79aed23bca3e3775d7df81154cd4a9b072ec48
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bd79aed23bca3e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 21 11:23:12 2013 +0100
FIX Interface Checks: Counters are now skipped when interface is down
In most cases it was no problem to check the counter values, as they
are reset to zero for most devices. But for some devices, the counters
are still having values - and maybe also change. To handle this, we
simply ignore the counter values for down interfaces.
---
.werks/283 | 11 +++++++++++
ChangeLog | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/283 b/.werks/283
new file mode 100644
index 0000000..5c47ed9
--- /dev/null
+++ b/.werks/283
@@ -0,0 +1,11 @@
+Title: Interface Checks: Counters are now skipped when interface is down
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1385029361
+Class: fix
+
+In most cases it was no problem to check the counter values, as they
+are reset to zero for most devices. But for some devices, the counters
+are still having values - and maybe also change. To handle this, we
+simply ignore the counter values for down interfaces.
diff --git a/ChangeLog b/ChangeLog
index 09e942e..19d0522 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,7 +26,7 @@
* 0209 FIX: Cleaned up bad code in fileinfo.groups check
* 0003 FIX: ps: Remove exceeding [ and ] in service description when using process inventory...
* 0037 FIX: checkman: alcatel power - now with correct classification...
- * 0233 FIX: Interface Checks: Counters are now skipped when interface is down...
+ * 0283 FIX: Interface Checks: Counters are now skipped when interface is down...
Multisite:
* 0001 New filters for selecting several host/service-groups at once...
Module: check_mk
Branch: master
Commit: 80adc39c29a2914d07ce4b6e39c12232dec1c7dd
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=80adc39c29a291…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Nov 21 11:13:47 2013 +0100
FIX Improved handling of interface inventory states / types
---
.werks/234 | 8 ++++++++
ChangeLog | 1 +
web/htdocs/js/checkmk.js | 13 +++++++++++++
web/plugins/wato/check_parameters.py | 11 ++++++++---
4 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/.werks/234 b/.werks/234
new file mode 100644
index 0000000..bff961a
--- /dev/null
+++ b/.werks/234
@@ -0,0 +1,8 @@
+Title: Improved handling of interface inventory states / types
+Level: 1
+Component: wato
+Version: 1.2.3i7
+Date: 1385028795
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index fe66ca4..1f2b0ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 0039 FIX: Encoding bug on rendering global settings...
* 0219 FIX: Improved output of long contact group names in WATO folders
* 0220 FIX: Added HTML escaping to several global settings attributes
+ * 0234 FIX: Improved handling of interface inventory states / types
Notifications:
* 0005 Added notification script for sending SMS via mobilant.com...
diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js
index 929711f..1cd4725 100644
--- a/web/htdocs/js/checkmk.js
+++ b/web/htdocs/js/checkmk.js
@@ -1711,6 +1711,19 @@ function valuespec_listof_fixarrows(oTbody) {
}
}
+function vs_list_choice_toggle_all(varprefix) {
+ var tbl = document.getElementById(varprefix + "_tbl");
+ var checkboxes = tbl.getElementsByTagName("input");
+ if (!checkboxes)
+ return;
+
+ // simply use state of first texbox as base
+ var state = ! checkboxes[0].checked;
+ for (var i = 0; i < checkboxes.length; i++) {
+ checkboxes[i].checked = state;
+ }
+}
+
function vs_textascii_button(img, text, how) {
var oInput = img.previousElementSibling;
while (oInput.tagName == "A")
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index bb4f649..ef2058d 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -242,13 +242,18 @@ register_rule(group + '/' + subgroup_networking,
("portstates", ListChoice(title = _("Network interface port states to inventorize"),
help = _("When doing inventory on switches or other devices with network interfaces "
"then only ports found in one of the configured port states will be added to the monitoring."),
- choices = _if_portstate_choices)),
+ choices = _if_portstate_choices,
+ toggle_all = True,
+ default_value = ['1'],
+ )),
("porttypes", ListChoice(title = _("Network interface port types to inventorize"),
help = _("When doing inventory on switches or other devices with network interfaces "
"then only ports of the specified types will be created services for."),
choices = _if_porttype_choices,
- columns = 3)),
-
+ columns = 3,
+ toggle_all = True,
+ default_value = [ '6', '32', '62', '117' ]
+ )),
],
help = _('This rule can be used to control the inventory for network ports. '
'You can configure the port types and port states for inventory'