diff --git a/OpenTwins/Chart.yaml b/OpenTwins/Chart.yaml index 72162a7..2853d38 100644 --- a/OpenTwins/Chart.yaml +++ b/OpenTwins/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: 0.5.0 +appVersion: 0.6.0 description: Esta es una plataforma de codigo abierto orientada a gemelos digitales. keywords: diff --git a/OpenTwins/templates/config-maps/cm-telegraf.yaml b/OpenTwins/templates/config-maps/cm-telegraf.yaml index 1e78740..6a6cca1 100644 --- a/OpenTwins/templates/config-maps/cm-telegraf.yaml +++ b/OpenTwins/templates/config-maps/cm-telegraf.yaml @@ -51,36 +51,38 @@ data: {{- end }} {{- if and .Values.mosquitto.enabled .Values.connections.telegraf.source.mosquitto.enabled }} - [[processors.rename]] - [[processors.rename.replace]] - dest = "parent" - tag = "extra_attributes__parents" - [[processors.rename.replace]] - dest = "originator" - tag = "headers_ditto-originator" - [[processors.rename.replace]] - dest = "idSimulationRun" - tag = "extra_features_idSimulationRun_properties_value" - [[processors.rename.replace]] - dest = "thingId" - tag = "extra_thingId" - - [[inputs.mqtt_consumer]] - data_format = "json" + [[inputs.mqtt_consumer]] qos = 1 servers = [ "tcp://{{ include "opentwins.mosquitto.fullname" . }}:1883" ] - tag_keys = [ - "extra_attributes__parents", - "extra_thingId", - "headers_ditto-originator", - "extra_features_idSimulationRun_properties_value", - "value_time_properties_value" - ] topics = [ "{{ .Values.connections.ditto.target.mosquitto.address }}" ] + data_format = "json_v2" + [[inputs.mqtt_consumer.json_v2]] + [[inputs.mqtt_consumer.json_v2.tag]] + path = "extra.attributes._parents" + rename = "parent" + optional = true + [[inputs.mqtt_consumer.json_v2.tag]] + path = "extra.thingId" + rename = "thingId" + [[inputs.mqtt_consumer.json_v2.tag]] + path = "headers.ditto-originator" + rename = "originator" + optional = true + [[inputs.mqtt_consumer.json_v2.tag]] + path = "extra.features.idSimulationRun.properties.value" + rename = "idSimulationRun" + optional = true + [[inputs.mqtt_consumer.json_v2.object]] + path = "{value}" + optional = true + excluded_keys = ["value_thingId", "value_policyId", "value_attributes", "value_features"] + [[inputs.mqtt_consumer.json_v2.object]] + path = '{"value":value.features}' + optional = true {{- end }} {{- end }} \ No newline at end of file diff --git a/OpenTwins/values.yaml b/OpenTwins/values.yaml index 3337a20..c8a7fe1 100644 --- a/OpenTwins/values.yaml +++ b/OpenTwins/values.yaml @@ -150,8 +150,10 @@ kafka: ################################################################## telegraf: enabled: true # Value added by OpenTwins to indicate if this component should be installed or not + metrics: + internal: + enabled: false config: - # Do no modify #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! processors: []