Skip to content
Permalink
Browse files

7287 FIX Fixed incorrect processing of SNMP datasource configuration

Due to an incorrect old configuration conversion routine the snmp datasource setting for a host was incorrectly set/reset to <tt>No SNMP<tt>.
This could be observed on the edit host page, for example. It only applied to hosts where the agent tag group was explicitly set.

This incorrectly transformed snmp setting was written back to disk, when the host itself was saved or when there were any changes made in the host tags configuration.
Changes in the host tag configuration had a greater impact because they forced a complete rewrite of all host configurations.

Change-Id: I9c644dc6673ce5869aecdf39c3e26964ba0d7923
  • Loading branch information
Andreas Boesl
Andreas Boesl committed Nov 28, 2019
1 parent 836b2e0 commit bcb70c7add998d868dfad4a8679dae3b418cb05e
Showing with 19 additions and 0 deletions.
  1. +16 −0 .werks/7287
  2. +3 −0 cmk/gui/watolib/hosts_and_folders.py
@@ -0,0 +1,16 @@
Title: Fixed incorrect processing of SNMP datasource configuration
Level: 2
Component: wato
Class: fix
Compatible: compat
Edition: cre
State: unknown
Version: 1.7.0i1
Date: 1574937758

Due to an incorrect old configuration conversion routine the snmp datasource setting for a host was incorrectly set/reset to <tt>No SNMP<tt>.
This could be observed on the edit host page, for example. It only applied to hosts where the agent tag group was explicitly set.

This incorrectly transformed snmp setting was written back to disk, when the host itself was saved or when there were any changes made in the host tags configuration.
Changes in the host tag configuration had a greater impact because they forced a complete rewrite of all host configurations.

@@ -585,6 +585,9 @@ def _transform_pre_15_agent_type_in_attributes(self, attributes):
if "tag_snmp" in attributes:
return attributes # Already in new format, no transformation necessary

if "meta_data" in attributes:
return attributes # These attributes were already saved with version 1.6+

value = attributes["tag_agent"]

if value == "cmk-agent":

0 comments on commit bcb70c7

Please sign in to comment.
You can’t perform that action at this time.