Module: check_mk
Branch: master
Commit: eb8236280e179f3cfb0341015a828d7bc73e8a15
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eb8236280e179f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Dec 22 09:51:10 2016 +0100
4219: Trap processing with community "public" is now only default and not
accepted in all cases anymore
Change-Id: I40052ccaff7db6d3c1525c3337ec5ba3a0380f5f
---
.werks/4219 | 15 +++++++++++++++
ChangeLog | 2 ++
bin/mkeventd | 10 ++++++----
web/plugins/wato/mkeventd.py | 6 ++++++
4 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/.werks/4219 b/.werks/4219
new file mode 100644
index 0000000..1ee574f
--- /dev/null
+++ b/.werks/4219
@@ -0,0 +1,15 @@
+Title: Trap processing with community "public" is now only default and not
accepted in all cases anymore
+Level: 1
+Component: ec
+Compatible: incomp
+Version: 1.4.0i4
+Date: 1482396336
+Class: fix
+
+Since several versions you can configure the Event Console to receive only SNMP traps
having
+specific SNMP communities set. Previous versions were simply processing all traps.
+
+The community "public" was somehow special since traps with this community were
accepted in
+any cases. We have now changed the community public to just be accepted by default. In
case
+you add additional communities, these will also be accepted. But in the moment you
remove
+the public community, the traps containing this community will not be accepted anymore.
diff --git a/ChangeLog b/ChangeLog
index 2bee0d3..2b44839 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,8 @@
* 4156 FIX: Fix off-by-one error in EC limit handling...
* 4199 FIX: Fix detection of replication mode if EC is distributed...
* 4200 FIX: Fix computation of Event Console performance snapin in distributed
mode...
+ * 4219 FIX: Trap processing with community "public" is now only default and
not accepted in all cases anymore...
+ NOTE: Please refer to the migration notes!
1.4.0i3:
diff --git a/bin/mkeventd b/bin/mkeventd
index c18d043..9bad547 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -468,9 +468,6 @@ def initialize_snmptrap_engine():
def initialize_snmp_credentials():
- # Add default v1/v2 config to make v1/v2 trap porcessing work
- snmp_config.addV1System(g_snmp_engine, 'my-area', 'public')
-
user_num = 0
for spec in g_config["snmp_credentials"]:
credentials = spec["credentials"]
@@ -4501,7 +4498,12 @@ def default_config():
"archive_orphans" : False,
"archive_mode" : "file",
"translate_snmptraps" : False,
- "snmp_credentials" : [],
+ "snmp_credentials" : [
+ {
+ "description": "\"public\" default for receiving
SNMPv1/v2 traps",
+ "credentials": "public",
+ },
+ ],
"event_limit" : {
'by_host': {
'action': 'stop_overflow_notify',
diff --git a/web/plugins/wato/mkeventd.py b/web/plugins/wato/mkeventd.py
index 2542c02..df7674f 100644
--- a/web/plugins/wato/mkeventd.py
+++ b/web/plugins/wato/mkeventd.py
@@ -2677,6 +2677,12 @@ if mkeventd_enabled:
help = _("When you want to process SNMP traps with the Event Console it
is "
"necessary to configure the credentials to decrypt the incoming
traps."),
text_if_empty = _("SNMP traps not configured"),
+ default_value = [
+ {
+ "description": _("\"public\" default for
receiving SNMPv1/v2 traps"),
+ "credentials": "public",
+ },
+ ],
),
domain = ConfigDomainEventConsole,
)