From 125c8728499cb9e774ea134973b7e5634e1a25b3 Mon Sep 17 00:00:00 2001 From: Nicolas Bock Date: Wed, 28 Apr 2021 15:06:14 -0600 Subject: [PATCH] Add format for OpenStack Keystone log files Keystone logs are formatted differently than the other OpenStack service logs. Signed-off-by: Nicolas Bock --- src/formats/openstack_log.json | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/formats/openstack_log.json b/src/formats/openstack_log.json index b517bb04..23104ea4 100644 --- a/src/formats/openstack_log.json +++ b/src/formats/openstack_log.json @@ -11,8 +11,18 @@ "mod-std": { "module-format": true, "pattern": "^(?\\w+) (?\\S+) \\[(?[^\\]]+)\\] (?.*)" + }, + "keystone": { + "pattern": "^[(](?[^)]+)[)]: (?\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}) (?\\w+) (?.*)" + }, + "keystone-debug": { + "pattern": "^[(](?[^)]+)[)]: (?\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2},\\d{3}) (?\\w+) [(](?[^)]+)[)] (?.*)" } }, + "timestamp-format": [ + "%Y-%m-%d %H:%M:%S.%L", + "%Y-%m-%d %H:%M:%S,%L" + ], "level-field": "level", "level": { "critical": "CRITICAL", @@ -34,12 +44,22 @@ "logger": { "kind": "string", "identifier": true + }, + "user": { + "kind": "string", + "identifier": true } }, "sample": [ { "line": "2014-10-28 10:42:22.772 23623 INFO neutron.wsgi [req-40743023-00ed-441c-9d0a-19b8167ea0ad None] 10.1.255.252 - - [28/Oct/2014 10:42:22] GET /v2.0/floatingips.json?fixed_ip_address=80.0.0.9&port_id=b4291e0e-a941-4663-9379-7af6471e983f HTTP/1.1 200 208 0.008971" + }, + { + "line": "(sqlalchemy.orm.mapper.Mapper): 2021-04-27 06:25:32,122 INFO (User|user) Identified primary key columns: ColumnSet([Column('id', String(length=64), table=, primary_key=True, nullable=False)])" + }, + { + "line": "(sqlalchemy.pool.QueuePool): 2021-04-28 16:37:00,355 DEBUG Connection being returned to pool" } ] } -} \ No newline at end of file +}