From 3010d4c3911db175facec519ffce51a7c0498003 Mon Sep 17 00:00:00 2001
From: Isaac Prior <isaac@stackhpc.com>
Date: Fri, 9 Aug 2019 09:58:59 +0100
Subject: [PATCH] Fixes Monasca log transformer UTC offset exception

Monasca log transformer currently throws exceptions on encountering a
non-UTC time offset (+0000):
"""
"exception": "Invalid format: \"2019-08-08 17:39:45 +0100\" is malformed at \" +0100\"",
"config_parsers":"yyyy-MM-dd HH:mm:ss +0000,ISO8601"}
"""

This fix allows logstash to interpret any valid ISO8601 offset.

Change-Id: Id70c3dd9cdcf681e955931f18a054e19cc284c0a
Closes-Bug: #1839597
---
 .../templates/monasca-log-transformer/log-transformer.conf.j2   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ansible/roles/monasca/templates/monasca-log-transformer/log-transformer.conf.j2 b/ansible/roles/monasca/templates/monasca-log-transformer/log-transformer.conf.j2
index 8c7819ff4..494bf5257 100644
--- a/ansible/roles/monasca/templates/monasca-log-transformer/log-transformer.conf.j2
+++ b/ansible/roles/monasca/templates/monasca-log-transformer/log-transformer.conf.j2
@@ -14,7 +14,7 @@ input {
 filter {
     # Update the timestamp of the event based on the time in the message.
     date {
-        match => [ "[log][dimensions][timestamp]", "yyyy-MM-dd HH:mm:ss +0000", "ISO8601"]
+        match => [ "[log][dimensions][timestamp]", "yyyy-MM-dd HH:mm:ss Z", "ISO8601"]
         remove_field => [ "[log][dimensions][timestamp]", "[log][dimensions][Timestamp]" ]
     }
 
-- 
GitLab