From c73d03a11b55b732a9dae29b6e6887a82d02caa5 Mon Sep 17 00:00:00 2001 From: fumingwei Date: Fri, 12 May 2023 11:51:46 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=E4=BF=AE=E6=94=B9telegraf=20outputs.kaf?= =?UTF-8?q?ka=E7=9A=84=E6=97=B6=E9=97=B4=E6=88=B3=E4=BB=A5=E6=AF=AB?= =?UTF-8?q?=E7=A7=92=E4=B8=BA=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../telegraf_statistic/templates/telegraf_shaping.conf.j2.j2 | 1 + .../telegraf_statistic/templates/telegraf_statistic.conf.j2.j2 | 1 + .../roles/traffic-engine/files/helm/conf/telegraf_statistic.conf | 1 + 3 files changed, 3 insertions(+) diff --git a/ansible/roles/telegraf_statistic/templates/telegraf_shaping.conf.j2.j2 b/ansible/roles/telegraf_statistic/templates/telegraf_shaping.conf.j2.j2 index f9187091..e40533d5 100644 --- a/ansible/roles/telegraf_statistic/templates/telegraf_shaping.conf.j2.j2 +++ b/ansible/roles/telegraf_statistic/templates/telegraf_shaping.conf.j2.j2 @@ -117,6 +117,7 @@ topic = "TRAFFIC-SHAPING-METRICS" fielddrop = ["*pkts*max", "*bytes*max", "*session*max", "*queue*max", "*latency*sum"] data_format = "json" + json_timestamp_units = "1ms" json_transformation = ''' $merge([{"timestamp": timestamp}, tags, fields]) ''' diff --git a/ansible/roles/telegraf_statistic/templates/telegraf_statistic.conf.j2.j2 b/ansible/roles/telegraf_statistic/templates/telegraf_statistic.conf.j2.j2 index 7f411f09..7b83888b 100644 --- a/ansible/roles/telegraf_statistic/templates/telegraf_statistic.conf.j2.j2 +++ b/ansible/roles/telegraf_statistic/templates/telegraf_statistic.conf.j2.j2 @@ -34,6 +34,7 @@ {% endraw %} topic = "NETWORK-TRAFFIC-METRICS" data_format = "json" + json_timestamp_units = "1ms" [[inputs.socket_listener]] service_address = "udp://:8100" data_format = "influx" \ No newline at end of file diff --git a/ansible/roles/traffic-engine/files/helm/conf/telegraf_statistic.conf b/ansible/roles/traffic-engine/files/helm/conf/telegraf_statistic.conf index 590aa12d..1f115b28 100644 --- a/ansible/roles/traffic-engine/files/helm/conf/telegraf_statistic.conf +++ b/ansible/roles/traffic-engine/files/helm/conf/telegraf_statistic.conf @@ -26,6 +26,7 @@ brokers = [ "{{- include "traffic-engine.config.olap-address" (list . "\",\"") }}" ] topic = "NETWORK-TRAFFIC-METRICS" data_format = "json" + json_timestamp_units = "1ms" [[inputs.socket_listener]] service_address = "udp://:8100" data_format = "influx"