diff --git a/src/formats/formats.am b/src/formats/formats.am index 74be15cb3a7..98f7511fb39 100644 --- a/src/formats/formats.am +++ b/src/formats/formats.am @@ -22,6 +22,7 @@ FORMAT_FILES = \ $(srcdir)/%reldir%/openstack_log.json \ $(srcdir)/%reldir%/page_log.json \ $(srcdir)/%reldir%/papertrail_log.json \ + $(srcdir)/%reldir%/rabbitmq_log.json \ $(srcdir)/%reldir%/snaplogic_log.json \ $(srcdir)/%reldir%/sssd_log.json \ $(srcdir)/%reldir%/strace_log.json \ diff --git a/src/formats/rabbitmq_log.json b/src/formats/rabbitmq_log.json new file mode 100644 index 00000000000..e88f8719faa --- /dev/null +++ b/src/formats/rabbitmq_log.json @@ -0,0 +1,46 @@ +{ + "$schema": "https://lnav.org/schemas/format-v1.schema.json", + "rabbitmq_log": { + "regex": { + "connection": { + "pattern" : "^=(?[A-Z]+) REPORT==== (?\\d\\d?-\\w{3}-\\d{4}::\\d{2}:\\d{2}:\\d{2}) ===(\\n(?(closing AMQP connection <(?.+)> \\((?\\d[\\d.]+\\d?):(?\\d+) -> (?\\d[\\d.]+\\d?):(?\\d+)\\))?(.*\\n)*))?$" + } + }, + "timestamp-format" : ["%e-%b-%Y::%H:%M:%S"], + "level": { + "error": "ERROR", + "warning": "WARNING|SUPERVISOR", + "info": "INFO|PROGRESS", + "fatal": "CRASH" + }, + "value" : { + "body" : { + "kind" : "string", + "identifier" : true + }, + "sourceIP" : { + "kind" : "string", + "identifier" : true, + "collate" : "ipaddress" + }, + "sourcePort" : { + "kind" : "integer", + "identifier" : true + }, + "destIP" : { + "kind" : "string", + "identifier" : true, + "collate" : "ipaddress" + }, + "destPort" : { + "kind" : "integer", + "identifier" : true + } + }, + "sample": [ + { + "line": "=ERROR REPORT==== 21-Apr-2016::21:19:01 ===\n** Node 'rabbit@red-hound-01' not responding **\n** Removing (timedout) connection **\n\n" + } + ] + } +}