From 6b17a4930dd10fd10a2c49d3ccdaf87bafffd535 Mon Sep 17 00:00:00 2001 From: Fredrik Kjellman Date: Tue, 3 May 2022 18:36:25 +0200 Subject: [PATCH] Add telegraf conf to send proxy log to influxdb. --- .../telegraf.conf.d/50-json-input.conf | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/log.qa.sveidas.se/overlay/etc/telegraf/telegraf.conf.d/50-json-input.conf b/log.qa.sveidas.se/overlay/etc/telegraf/telegraf.conf.d/50-json-input.conf index 09ab4dcf..85b55041 100644 --- a/log.qa.sveidas.se/overlay/etc/telegraf/telegraf.conf.d/50-json-input.conf +++ b/log.qa.sveidas.se/overlay/etc/telegraf/telegraf.conf.d/50-json-input.conf @@ -6,3 +6,30 @@ json_time_key = "timestamp" json_time_format = "unix_ms" json_timezone = "Local" +[[inputs.tail]] + files = ["/var/log/eidas_proxy.log"] + data_format = "json" + tag_keys = ["type", + "timestamp", + "connectorEntityId", + "requesterId", + "loaMatching", + "connectorCuntry", + "spType", + "requestedLoa", + "eidasResponseLoA", + "eidasRequestId", + "eidasResponseId", + "principal", + "nationalAssertionId", + "nationalRequestId", + "nationalIdP", + "eIDASAssertionIssueTime", + "eidasAssertionId"] + json_time_key = "timestamp" + json_time_format = "unix_ms" + json_timezone = "Local" +[[processors.parser]] + parse_fields = ["message"] + merge = "override" + data_format = "json"