fluent-plugin-grok-parser 2.6.1 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +23 -0
  3. data/.github/workflows/unit-test.yml +36 -0
  4. data/.gitignore +5 -0
  5. data/README.md +8 -4
  6. data/Rakefile +25 -22
  7. data/fluent-plugin-grok-parser.gemspec +1 -1
  8. data/lib/fluent/plugin/grok.rb +9 -2
  9. data/lib/fluent/plugin/parser_grok.rb +3 -1
  10. data/patterns/ecs-v1/aws +33 -0
  11. data/patterns/ecs-v1/bacula +53 -0
  12. data/patterns/ecs-v1/bind +13 -0
  13. data/patterns/ecs-v1/bro +30 -0
  14. data/patterns/ecs-v1/exim +26 -0
  15. data/patterns/ecs-v1/firewalls +111 -0
  16. data/patterns/ecs-v1/grok-patterns +95 -0
  17. data/patterns/ecs-v1/haproxy +40 -0
  18. data/patterns/ecs-v1/httpd +17 -0
  19. data/patterns/ecs-v1/java +34 -0
  20. data/patterns/ecs-v1/junos +13 -0
  21. data/patterns/ecs-v1/linux-syslog +16 -0
  22. data/patterns/ecs-v1/mcollective +4 -0
  23. data/patterns/ecs-v1/mongodb +7 -0
  24. data/patterns/ecs-v1/nagios +124 -0
  25. data/patterns/ecs-v1/postgresql +2 -0
  26. data/patterns/ecs-v1/rails +13 -0
  27. data/patterns/ecs-v1/redis +3 -0
  28. data/patterns/ecs-v1/ruby +2 -0
  29. data/patterns/ecs-v1/squid +6 -0
  30. data/patterns/ecs-v1/zeek +33 -0
  31. data/patterns/{aws → legacy/aws} +1 -1
  32. data/patterns/{bacula → legacy/bacula} +5 -5
  33. data/patterns/legacy/bind +3 -0
  34. data/patterns/{exim → legacy/exim} +8 -2
  35. data/patterns/{firewalls → legacy/firewalls} +2 -2
  36. data/patterns/{grok-patterns → legacy/grok-patterns} +4 -4
  37. data/patterns/{httpd → legacy/httpd} +2 -2
  38. data/patterns/{java → legacy/java} +1 -1
  39. data/patterns/legacy/maven +1 -0
  40. data/patterns/{nagios → legacy/nagios} +1 -1
  41. data/patterns/legacy/squid +4 -0
  42. data/test/test_grok_parser.rb +91 -41
  43. metadata +50 -31
  44. data/.travis.yml +0 -8
  45. data/appveyor.yml +0 -50
  46. data/patterns/bind +0 -3
  47. data/patterns/squid +0 -4
  48. /data/patterns/{maven → ecs-v1/maven} +0 -0
  49. /data/patterns/{bro → legacy/bro} +0 -0
  50. /data/patterns/{haproxy → legacy/haproxy} +0 -0
  51. /data/patterns/{junos → legacy/junos} +0 -0
  52. /data/patterns/{linux-syslog → legacy/linux-syslog} +0 -0
  53. /data/patterns/{mcollective → legacy/mcollective} +0 -0
  54. /data/patterns/{mcollective-patterns → legacy/mcollective-patterns} +0 -0
  55. /data/patterns/{mongodb → legacy/mongodb} +0 -0
  56. /data/patterns/{postgresql → legacy/postgresql} +0 -0
  57. /data/patterns/{rails → legacy/rails} +0 -0
  58. /data/patterns/{redis → legacy/redis} +0 -0
  59. /data/patterns/{ruby → legacy/ruby} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9535e605e2e5052e4c85e9ae0e2d5aa4562513b9dcba4c024cbfcc6d73e7f043
4
- data.tar.gz: 6bc692e214299628fac9dcad0961f5666d08c79c635f10d055d4edd9d1af5b3a
3
+ metadata.gz: 3eecaccfa5e2e73c87e27d9b5d3418cb151c9f7c4c8cbb621d186058998b79d0
4
+ data.tar.gz: e7e6ea8693c6a8d66b68129829842026bc7a6a6447a85ddb547d477f0c465c51
5
5
  SHA512:
6
- metadata.gz: 31a5e40658c2c6a56ace05eea2d1d231808e60f7f4a2b2ddbf079e2f0535de04cefaa5935ce17b19cb160ce7443d1215851520f8e7495b2d29f6c66a44027c7f
7
- data.tar.gz: 47d28fa8bb3ab09db2da0dd5005cfe59109d327a59d5c3fcffc2d3ea3cda521c6b0ba149018c2dd0e005788de9b0b85330ec88c502bb91eab38f9392d8ee9ca0
6
+ metadata.gz: bfb6751224fa004f064540d692910a63d04370298a23357bbc1847c5388a403ee3e0f0c6008cdd5f97bd89752ebeb6c58575b6e6b42b8e1e957f7f6705fee490
7
+ data.tar.gz: 8f54cce795c3d2637ee2bd6982fb9156388934f2dbbf73b9d13b3f04cc6c08571e60df32b355764cea7ebc1752a62d52442322b1d3539235dbb87d9d8fe4cf1c
@@ -0,0 +1,23 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'github-actions'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'monthly'
7
+ groups:
8
+ # PR: "Security update [package] from [old] to [new]"
9
+ # This PR should be merged in hurry
10
+ security-updates:
11
+ applies-to: security-updates
12
+ patterns:
13
+ - '*'
14
+
15
+ # PR: "Bump [package] from [old] to [new]"
16
+ # No need to be merged this PR in hurry. It is enough to merge
17
+ # once in a month.
18
+ monthly-updates:
19
+ applies-to: version-updates
20
+ patterns:
21
+ - '*'
22
+ # Allow to create PR both of security and normal updates.
23
+ open-pull-requests-limit: 1
@@ -0,0 +1,36 @@
1
+ name: Test
2
+ on:
3
+ push:
4
+ branches: [master]
5
+ pull_request:
6
+ branches: [master]
7
+ schedule:
8
+ - cron: '0 0 1 * *'
9
+ jobs:
10
+ ruby-versions:
11
+ uses: ruby/actions/.github/workflows/ruby_versions.yml@master
12
+ with:
13
+ engine: cruby
14
+ min_version: 3.2
15
+ build:
16
+ needs: ruby-versions
17
+ runs-on: ${{ matrix.os }}
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
22
+ exclude:
23
+ - ruby: head
24
+ os: [ 'ubuntu-latest', 'macOS-latest', 'windows-latest' ]
25
+ name: Ruby ${{ matrix.ruby }} unit testing on ${{ matrix.os }}
26
+ steps:
27
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28
+ - uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ bundler-cache: true
32
+ - name: unit testing
33
+ env:
34
+ CI: true
35
+ run: |
36
+ bundle exec rake test
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ /.bundle/
2
+ /Gemfile.lock
3
+ /pkg/
4
+ /vendor/bundle/
5
+ *.gem
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # Grok Parser for Fluentd [![Build Status](https://travis-ci.org/fluent/fluent-plugin-grok-parser.svg?branch=master)](https://travis-ci.org/fluent/fluent-plugin-grok-parser)
1
+ # Grok Parser for Fluentd
2
+
3
+ [![Test](https://github.com/fluent/fluent-plugin-grok-parser/actions/workflows/unit-test.yml/badge.svg)](https://github.com/fluent/fluent-plugin-grok-parser/actions/workflows/unit-test.yml)
2
4
 
3
5
  This is a Fluentd plugin to enable Logstash's Grok-like parsing logic.
4
6
 
@@ -43,7 +45,7 @@ extracts the first IP address that matches in the log.
43
45
  <parse>
44
46
  @type grok
45
47
  <grok>
46
- pattern %{COMBINEDAPACHELOG}
48
+ pattern %{HTTPD_COMBINEDLOG}
47
49
  time_format "%d/%b/%Y:%H:%M:%S %z"
48
50
  </grok>
49
51
  <grok>
@@ -103,6 +105,8 @@ You can use this parser without `multiline_start_regexp` when you know your data
103
105
  * **grok_failure_key** (string) (optional): The key has grok failure reason.
104
106
  * **grok_name_key** (string) (optional): The key name to store grok section's name
105
107
  * **multi_line_start_regexp** (string) (optional): The regexp to match beginning of multiline. This is only for "multiline_grok".
108
+ * **grok_pattern_series** (enum) (optional): Specify grok pattern series set.
109
+ * Default value: `legacy`.
106
110
 
107
111
  ### \<grok\> section (optional) (multiple)
108
112
 
@@ -170,7 +174,7 @@ This generates following events:
170
174
  grok_failure_key grokfailure
171
175
  <grok>
172
176
  name apache_log
173
- pattern %{COMBINEDAPACHELOG}
177
+ pattern %{HTTPD_COMBINEDLOG}
174
178
  time_format "%d/%b/%Y:%H:%M:%S %z"
175
179
  </grok>
176
180
  <grok>
@@ -187,7 +191,7 @@ This generates following events:
187
191
 
188
192
  This will add keys like following:
189
193
 
190
- * Add `grok_name: "apache_log"` if the record matches `COMBINEDAPACHELOG`
194
+ * Add `grok_name: "apache_log"` if the record matches `HTTPD_COMBINEDLOG`
191
195
  * Add `grok_name: "ip_address"` if the record matches `IP`
192
196
  * Add `grok_name: "rest_message"` if the record matches `GREEDYDATA`
193
197
 
data/Rakefile CHANGED
@@ -15,9 +15,11 @@ end
15
15
 
16
16
  desc "Import patterns from submodules"
17
17
  task "patterns:import" do
18
- `git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
19
- Dir.glob(File.join(submodule_path, "patterns/*")) do |pattern|
20
- cp(pattern, "patterns/", verbose: true)
18
+ ["legacy", "ecs-v1"].each do |series|
19
+ `git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
20
+ Dir.glob(File.join(submodule_path, "patterns/#{series}/*")) do |pattern|
21
+ cp(pattern, "patterns/#{series}", verbose: true)
22
+ end
21
23
  end
22
24
  end
23
25
 
@@ -32,29 +34,30 @@ task "patterns:import" do
32
34
  array(?::.)?)))?)?
33
35
  )
34
36
  \}/x
35
-
36
- Dir.glob("patterns/*") do |pattern_file|
37
- new_lines = ""
38
- File.readlines(pattern_file).each do |line|
39
- case
40
- when line.strip.empty?
41
- new_lines << line
42
- when line.start_with?("#")
43
- new_lines << line
44
- else
45
- name, pattern = line.split(/\s+/, 2)
46
- new_pattern = pattern.gsub(pattern_re) do |m|
47
- matched = $~
48
- if matched[:type] == "int"
49
- "%{#{matched[:pattern]}:#{matched[:subname]}:integer}"
50
- else
51
- m
37
+ ["legacy", "ecs-v1"].each do |series|
38
+ Dir.glob("patterns/#{series}/*") do |pattern_file|
39
+ new_lines = ""
40
+ File.readlines(pattern_file).each do |line|
41
+ case
42
+ when line.strip.empty?
43
+ new_lines << line
44
+ when line.start_with?("#")
45
+ new_lines << line
46
+ else
47
+ name, pattern = line.split(/\s+/, 2)
48
+ new_pattern = pattern.gsub(pattern_re) do |m|
49
+ matched = $~
50
+ if matched[:type] == "int"
51
+ "%{#{matched[:pattern]}:#{matched[:subname]}:integer}"
52
+ else
53
+ m
54
+ end
52
55
  end
56
+ new_lines << "#{name} #{new_pattern}"
53
57
  end
54
- new_lines << "#{name} #{new_pattern}"
55
58
  end
59
+ File.write(pattern_file, new_lines)
56
60
  end
57
- File.write(pattern_file, new_lines)
58
61
  end
59
62
  end
60
63
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-grok-parser"
7
- spec.version = "2.6.1"
7
+ spec.version = "2.6.3"
8
8
  spec.authors = ["kiyoto", "Kenji Okimoto"]
9
9
  spec.email = ["kiyoto@treasure-data.com", "okimoto@clear-code.com"]
10
10
  spec.summary = %q{Fluentd plugin to support Logstash-inspired Grok format for parsing logs}
@@ -134,8 +134,15 @@ module Fluent
134
134
  curr_pattern = @pattern_map[m["pattern"]]
135
135
  raise GrokPatternNotFoundError, "grok pattern not found: #{pattern}" unless curr_pattern
136
136
  if m["subname"]
137
- replacement_pattern = "(?<#{m["subname"]}>#{curr_pattern})"
138
- type_map[m["subname"]] = m["type"] || "string"
137
+ ecs = /(?<ecs-key>(^\[.*\]$))/.match(m["subname"])
138
+ subname = if ecs
139
+ # remove starting "[" and trailing "]" on matched data
140
+ ecs["ecs-key"][1..-2].split("][").join('.')
141
+ else
142
+ m["subname"]
143
+ end
144
+ replacement_pattern = "(?<#{subname}>#{curr_pattern})"
145
+ type_map[subname] = m["type"] || "string"
139
146
  else
140
147
  replacement_pattern = "(?:#{curr_pattern})"
141
148
  end
@@ -16,6 +16,8 @@ module Fluent
16
16
  config_param :grok_failure_key, :string, default: nil
17
17
  desc "The key name to store grok section's name"
18
18
  config_param :grok_name_key, :string, default: nil
19
+ desc "Specify grok pattern series set"
20
+ config_param :grok_pattern_series, :enum, list: [:legacy, :"ecs-v1"], default: :legacy
19
21
 
20
22
  config_section :grok, param_name: "grok_confs", multi: true do
21
23
  desc "The name of this grok section"
@@ -42,7 +44,7 @@ module Fluent
42
44
 
43
45
  @grok = Grok.new(self, conf)
44
46
 
45
- default_pattern_dir = File.expand_path("../../../../patterns/*", __FILE__)
47
+ default_pattern_dir = File.expand_path("../../../../patterns/#{@grok_pattern_series}/*", __FILE__)
46
48
  Dir.glob(default_pattern_dir) do |pattern_file_path|
47
49
  @grok.add_patterns_from_file(pattern_file_path)
48
50
  end
@@ -0,0 +1,33 @@
1
+ S3_REQUEST_LINE (?:%{WORD:[http][request][method]} %{NOTSPACE:[url][original]}(?: HTTP/%{NUMBER:[http][version]})?)
2
+
3
+ S3_ACCESS_LOG %{WORD:[aws][s3access][bucket_owner]} %{NOTSPACE:[aws][s3access][bucket]} \[%{HTTPDATE:timestamp}\] (?:-|%{IP:[client][ip]}) (?:-|%{NOTSPACE:[client][user][id]}) %{NOTSPACE:[aws][s3access][request_id]} %{NOTSPACE:[aws][s3access][operation]} (?:-|%{NOTSPACE:[aws][s3access][key]}) (?:-|"%{S3_REQUEST_LINE:[aws][s3access][request_uri]}") (?:-|%{INT:[http][response][status_code]:integer}) (?:-|%{NOTSPACE:[aws][s3access][error_code]}) (?:-|%{INT:[aws][s3access][bytes_sent]:integer}) (?:-|%{INT:[aws][s3access][object_size]:integer}) (?:-|%{INT:[aws][s3access][total_time]:integer}) (?:-|%{INT:[aws][s3access][turn_around_time]:integer}) "(?:-|%{DATA:[http][request][referrer]})" "(?:-|%{DATA:[user_agent][original]})" (?:-|%{NOTSPACE:[aws][s3access][version_id]})(?: (?:-|%{NOTSPACE:[aws][s3access][host_id]}) (?:-|%{NOTSPACE:[aws][s3access][signature_version]}) (?:-|%{NOTSPACE:[tls][cipher]}) (?:-|%{NOTSPACE:[aws][s3access][authentication_type]}) (?:-|%{NOTSPACE:[aws][s3access][host_header]}) (?:-|%{NOTSPACE:[aws][s3access][tls_version]}))?
4
+ # :long - %{INT:[aws][s3access][bytes_sent]:int}
5
+ # :long - %{INT:[aws][s3access][object_size]:int}
6
+
7
+ ELB_URIHOST %{IPORHOST:[url][domain]}(?::%{POSINT:[url][port]:integer})?
8
+ ELB_URIPATHQUERY %{URIPATH:[url][path]}(?:\?%{URIQUERY:[url][query]})?
9
+ # deprecated - old name:
10
+ ELB_URIPATHPARAM %{ELB_URIPATHQUERY}
11
+ ELB_URI %{URIPROTO:[url][scheme]}://(?:%{USER:[url][username]}(?::[^@]*)?@)?(?:%{ELB_URIHOST})?(?:%{ELB_URIPATHQUERY})?
12
+
13
+ ELB_REQUEST_LINE (?:%{WORD:[http][request][method]} %{ELB_URI:[url][original]}(?: HTTP/%{NUMBER:[http][version]})?)
14
+
15
+ # pattern supports 'regular' HTTP ELB format
16
+ ELB_V1_HTTP_LOG %{TIMESTAMP_ISO8601:timestamp} %{NOTSPACE:[aws][elb][name]} %{IP:[source][ip]}:%{INT:[source][port]:integer} (?:-|(?:%{IP:[aws][elb][backend][ip]}:%{INT:[aws][elb][backend][port]:integer})) (?:-1|%{NUMBER:[aws][elb][request_processing_time][sec]:float}) (?:-1|%{NUMBER:[aws][elb][backend_processing_time][sec]:float}) (?:-1|%{NUMBER:[aws][elb][response_processing_time][sec]:float}) %{INT:[http][response][status_code]:integer} (?:-|%{INT:[aws][elb][backend][http][response][status_code]:integer}) %{INT:[http][request][body][bytes]:integer} %{INT:[http][response][body][bytes]:integer} "%{ELB_REQUEST_LINE}"(?: "(?:-|%{DATA:[user_agent][original]})" (?:-|%{NOTSPACE:[tls][cipher]}) (?:-|%{NOTSPACE:[aws][elb][ssl_protocol]}))?
17
+ # :long - %{INT:[http][request][body][bytes]:int}
18
+ # :long - %{INT:[http][response][body][bytes]:int}
19
+
20
+ ELB_ACCESS_LOG %{ELB_V1_HTTP_LOG}
21
+
22
+ # Each edge location is identified by a three-letter code and an arbitrarily assigned number.
23
+ # The three-letter IATA code typically represents an airport near the edge location.
24
+ # examples: "LHR62-C2", "SFO5-P1", ""IND6", "CPT50"
25
+ CLOUDFRONT_EDGE_LOCATION [A-Z]{3}[0-9]{1,2}(?:-[A-Z0-9]{2})?
26
+
27
+ # pattern used to match a shorted format, that's why we have the optional part (starting with *http.version*) at the end
28
+ CLOUDFRONT_ACCESS_LOG (?<timestamp>%{YEAR}-%{MONTHNUM}-%{MONTHDAY}\t%{TIME})\t%{CLOUDFRONT_EDGE_LOCATION:[aws][cloudfront][x_edge_location]}\t(?:-|%{INT:[destination][bytes]:integer})\t%{IPORHOST:[source][ip]}\t%{WORD:[http][request][method]}\t%{HOSTNAME:[url][domain]}\t%{NOTSPACE:[url][path]}\t(?:(?:000)|%{INT:[http][response][status_code]:integer})\t(?:-|%{DATA:[http][request][referrer]})\t%{DATA:[user_agent][original]}\t(?:-|%{DATA:[url][query]})\t(?:-|%{DATA:[aws][cloudfront][http][request][cookie]})\t%{WORD:[aws][cloudfront][x_edge_result_type]}\t%{NOTSPACE:[aws][cloudfront][x_edge_request_id]}\t%{HOSTNAME:[aws][cloudfront][http][request][host]}\t%{URIPROTO:[network][protocol]}\t(?:-|%{INT:[source][bytes]:integer})\t%{NUMBER:[aws][cloudfront][time_taken]:float}\t(?:-|%{IP:[network][forwarded_ip]})\t(?:-|%{DATA:[aws][cloudfront][ssl_protocol]})\t(?:-|%{NOTSPACE:[tls][cipher]})\t%{WORD:[aws][cloudfront][x_edge_response_result_type]}(?:\t(?:-|HTTP/%{NUMBER:[http][version]})\t(?:-|%{DATA:[aws][cloudfront][fle_status]})\t(?:-|%{DATA:[aws][cloudfront][fle_encrypted_fields]})\t%{INT:[source][port]:integer}\t%{NUMBER:[aws][cloudfront][time_to_first_byte]:float}\t(?:-|%{DATA:[aws][cloudfront][x_edge_detailed_result_type]})\t(?:-|%{NOTSPACE:[http][request][mime_type]})\t(?:-|%{INT:[aws][cloudfront][http][request][size]:integer})\t(?:-|%{INT:[aws][cloudfront][http][request][range][start]:integer})\t(?:-|%{INT:[aws][cloudfront][http][request][range][end]:integer}))?
29
+ # :long - %{INT:[destination][bytes]:int}
30
+ # :long - %{INT:[source][bytes]:int}
31
+ # :long - %{INT:[aws][cloudfront][http][request][size]:int}
32
+ # :long - %{INT:[aws][cloudfront][http][request][range][start]:int}
33
+ # :long - %{INT:[aws][cloudfront][http][request][range][end]:int}
@@ -0,0 +1,53 @@
1
+ BACULA_TIMESTAMP %{MONTHDAY}-%{MONTH}(?:-%{YEAR})? %{HOUR}:%{MINUTE}
2
+ BACULA_HOST %{HOSTNAME}
3
+ BACULA_VOLUME %{USER}
4
+ BACULA_DEVICE %{USER}
5
+ BACULA_DEVICEPATH %{UNIXPATH}
6
+ BACULA_CAPACITY %{INT}{1,3}(,%{INT}{3})*
7
+ BACULA_VERSION %{USER}
8
+ BACULA_JOB %{USER}
9
+
10
+ BACULA_LOG_MAX_CAPACITY User defined maximum volume capacity %{BACULA_CAPACITY:[bacula][volume][max_capacity]} exceeded on device \"%{BACULA_DEVICE:[bacula][volume][device]}\" \(%{BACULA_DEVICEPATH:[bacula][volume][path]}\).?
11
+ BACULA_LOG_END_VOLUME End of medium on Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\" Bytes=%{BACULA_CAPACITY:[bacula][volume][bytes]} Blocks=%{BACULA_CAPACITY:[bacula][volume][blocks]} at %{BACULA_TIMESTAMP:[bacula][timestamp]}.
12
+ BACULA_LOG_NEW_VOLUME Created new Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\" in catalog.
13
+ BACULA_LOG_NEW_LABEL Labeled new Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\" on (?:file )?device \"%{BACULA_DEVICE:[bacula][volume][device]}\" \(%{BACULA_DEVICEPATH:[bacula][volume][path]}\).
14
+ BACULA_LOG_WROTE_LABEL Wrote label to prelabeled Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\" on device \"%{BACULA_DEVICE:[bacula][volume][device]}\" \(%{BACULA_DEVICEPATH:[bacula][volume][path]}\)
15
+ BACULA_LOG_NEW_MOUNT New volume \"%{BACULA_VOLUME:[bacula][volume][name]}\" mounted on device \"%{BACULA_DEVICE:[bacula][volume][device]}\" \(%{BACULA_DEVICEPATH:[bacula][volume][path]}\) at %{BACULA_TIMESTAMP:[bacula][timestamp]}.
16
+ BACULA_LOG_NOOPEN \s*Cannot open %{DATA}: ERR=%{GREEDYDATA:[error][message]}
17
+ BACULA_LOG_NOOPENDIR \s*Could not open directory \"?%{DATA:[file][path]}\"?: ERR=%{GREEDYDATA:[error][message]}
18
+ BACULA_LOG_NOSTAT \s*Could not stat %{DATA:[file][path]}: ERR=%{GREEDYDATA:[error][message]}
19
+ BACULA_LOG_NOJOBS There are no more Jobs associated with Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\". Marking it purged.
20
+ BACULA_LOG_ALL_RECORDS_PRUNED .*?All records pruned from Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\"; marking it \"Purged\"
21
+ BACULA_LOG_BEGIN_PRUNE_JOBS Begin pruning Jobs older than %{INT} month %{INT} days .
22
+ BACULA_LOG_BEGIN_PRUNE_FILES Begin pruning Files.
23
+ BACULA_LOG_PRUNED_JOBS Pruned %{INT} Jobs* for client %{BACULA_HOST:[bacula][client][name]} from catalog.
24
+ BACULA_LOG_PRUNED_FILES Pruned Files from %{INT} Jobs* for client %{BACULA_HOST:[bacula][client][name]} from catalog.
25
+ BACULA_LOG_ENDPRUNE End auto prune.
26
+ BACULA_LOG_STARTJOB Start Backup JobId %{INT}, Job=%{BACULA_JOB:[bacula][job][name]}
27
+ BACULA_LOG_STARTRESTORE Start Restore Job %{BACULA_JOB:[bacula][job][name]}
28
+ BACULA_LOG_USEDEVICE Using Device \"%{BACULA_DEVICE:[bacula][volume][device]}\"
29
+ BACULA_LOG_DIFF_FS \s*%{UNIXPATH} is a different filesystem. Will not descend from %{UNIXPATH} into it.
30
+ BACULA_LOG_JOBEND Job write elapsed time = %{DATA:[bacula][job][elapsed_time]}, Transfer rate = %{NUMBER} (K|M|G)? Bytes/second
31
+ BACULA_LOG_NOPRUNE_JOBS No Jobs found to prune.
32
+ BACULA_LOG_NOPRUNE_FILES No Files found to prune.
33
+ BACULA_LOG_VOLUME_PREVWRITTEN Volume \"?%{BACULA_VOLUME:[bacula][volume][name]}\"? previously written, moving to end of data.
34
+ BACULA_LOG_READYAPPEND Ready to append to end of Volume \"%{BACULA_VOLUME:[bacula][volume][name]}\" size=%{INT:[bacula][volume][size]:integer}
35
+ # :long - %{INT:[bacula][volume][size]:int}
36
+ BACULA_LOG_CANCELLING Cancelling duplicate JobId=%{INT:[bacula][job][other_id]}.
37
+ BACULA_LOG_MARKCANCEL JobId %{INT:[bacula][job][id]}, Job %{BACULA_JOB:[bacula][job][name]} marked to be canceled.
38
+ BACULA_LOG_CLIENT_RBJ shell command: run ClientRunBeforeJob \"%{GREEDYDATA:[bacula][job][client_run_before_command]}\"
39
+ BACULA_LOG_VSS (Generate )?VSS (Writer)?
40
+ BACULA_LOG_MAXSTART Fatal [eE]rror: Job canceled because max start delay time exceeded.
41
+ BACULA_LOG_DUPLICATE Fatal [eE]rror: JobId %{INT:[bacula][job][other_id]} already running. Duplicate job not allowed.
42
+ BACULA_LOG_NOJOBSTAT Fatal [eE]rror: No Job status returned from FD.
43
+ BACULA_LOG_FATAL_CONN Fatal [eE]rror: bsock.c:133 Unable to connect to (Client: %{BACULA_HOST:[bacula][client][name]}|Storage daemon) on %{IPORHOST:[client][address]}:%{POSINT:[client][port]:integer}. ERR=%{GREEDYDATA:[error][message]}
44
+ BACULA_LOG_NO_CONNECT Warning: bsock.c:127 Could not connect to (Client: %{BACULA_HOST:[bacula][client][name]}|Storage daemon) on %{IPORHOST:[client][address]}:%{POSINT:[client][port]:integer}. ERR=%{GREEDYDATA:[error][message]}
45
+ BACULA_LOG_NO_AUTH Fatal error: Unable to authenticate with File daemon at \"?%{IPORHOST:[client][address]}(?::%{POSINT:[client][port]:integer})?\"?. Possible causes:
46
+ BACULA_LOG_NOSUIT No prior or suitable Full backup found in catalog. Doing FULL backup.
47
+ BACULA_LOG_NOPRIOR No prior Full backup Job record found.
48
+
49
+ BACULA_LOG_JOB (Error: )?Bacula %{BACULA_HOST} %{BACULA_VERSION} \(%{BACULA_VERSION}\):
50
+
51
+ BACULA_LOG %{BACULA_TIMESTAMP:timestamp} %{BACULA_HOST:[host][hostname]}(?: JobId %{INT:[bacula][job][id]})?:? (%{BACULA_LOG_MAX_CAPACITY}|%{BACULA_LOG_END_VOLUME}|%{BACULA_LOG_NEW_VOLUME}|%{BACULA_LOG_NEW_LABEL}|%{BACULA_LOG_WROTE_LABEL}|%{BACULA_LOG_NEW_MOUNT}|%{BACULA_LOG_NOOPEN}|%{BACULA_LOG_NOOPENDIR}|%{BACULA_LOG_NOSTAT}|%{BACULA_LOG_NOJOBS}|%{BACULA_LOG_ALL_RECORDS_PRUNED}|%{BACULA_LOG_BEGIN_PRUNE_JOBS}|%{BACULA_LOG_BEGIN_PRUNE_FILES}|%{BACULA_LOG_PRUNED_JOBS}|%{BACULA_LOG_PRUNED_FILES}|%{BACULA_LOG_ENDPRUNE}|%{BACULA_LOG_STARTJOB}|%{BACULA_LOG_STARTRESTORE}|%{BACULA_LOG_USEDEVICE}|%{BACULA_LOG_DIFF_FS}|%{BACULA_LOG_JOBEND}|%{BACULA_LOG_NOPRUNE_JOBS}|%{BACULA_LOG_NOPRUNE_FILES}|%{BACULA_LOG_VOLUME_PREVWRITTEN}|%{BACULA_LOG_READYAPPEND}|%{BACULA_LOG_CANCELLING}|%{BACULA_LOG_MARKCANCEL}|%{BACULA_LOG_CLIENT_RBJ}|%{BACULA_LOG_VSS}|%{BACULA_LOG_MAXSTART}|%{BACULA_LOG_DUPLICATE}|%{BACULA_LOG_NOJOBSTAT}|%{BACULA_LOG_FATAL_CONN}|%{BACULA_LOG_NO_CONNECT}|%{BACULA_LOG_NO_AUTH}|%{BACULA_LOG_NOSUIT}|%{BACULA_LOG_JOB}|%{BACULA_LOG_NOPRIOR})
52
+ # old (deprecated) name :
53
+ BACULA_LOGLINE %{BACULA_LOG}
@@ -0,0 +1,13 @@
1
+ BIND9_TIMESTAMP %{MONTHDAY}[-]%{MONTH}[-]%{YEAR} %{TIME}
2
+
3
+ BIND9_DNSTYPE (?:A|AAAA|CAA|CDNSKEY|CDS|CERT|CNAME|CSYNC|DLV|DNAME|DNSKEY|DS|HINFO|LOC|MX|NAPTR|NS|NSEC|NSEC3|OPENPGPKEY|PTR|RRSIG|RP|SIG|SMIMEA|SOA|SRV|TSIG|TXT|URI)
4
+ BIND9_CATEGORY (?:queries)
5
+
6
+ # dns.question.class is static - only 'IN' is supported by Bind9
7
+ # bind.log.question.name is expected to be a 'duplicate' (same as the dns.question.name capture)
8
+ BIND9_QUERYLOGBASE client(:? @0x(?:[0-9A-Fa-f]+))? %{IP:[client][ip]}#%{POSINT:[client][port]:integer} \(%{GREEDYDATA:[bind][log][question][name]}\): query: %{GREEDYDATA:[dns][question][name]} (?<[dns][question][class]>IN) %{BIND9_DNSTYPE:[dns][question][type]}(:? %{DATA:[bind][log][question][flags]})? \(%{IP:[server][ip]}\)
9
+
10
+ # for query-logging category and severity are always fixed as "queries: info: "
11
+ BIND9_QUERYLOG %{BIND9_TIMESTAMP:timestamp} %{BIND9_CATEGORY:[bind][log][category]}: %{LOGLEVEL:[log][level]}: %{BIND9_QUERYLOGBASE}
12
+
13
+ BIND9 %{BIND9_QUERYLOG}
@@ -0,0 +1,30 @@
1
+ # supports the 'old' BRO log files, for updated Zeek log format see the patters/ecs-v1/zeek
2
+ # https://www.bro.org/sphinx/script-reference/log-files.html
3
+
4
+ BRO_BOOL [TF]
5
+ BRO_DATA [^\t]+
6
+
7
+ # http.log - old format (before the Zeek rename) :
8
+ BRO_HTTP %{NUMBER:timestamp}\t%{NOTSPACE:[zeek][session_id]}\t%{IP:[source][ip]}\t%{INT:[source][port]:integer}\t%{IP:[destination][ip]}\t%{INT:[destination][port]:integer}\t%{INT:[zeek][http][trans_depth]:integer}\t(?:-|%{WORD:[http][request][method]})\t(?:-|%{BRO_DATA:[url][domain]})\t(?:-|%{BRO_DATA:[url][original]})\t(?:-|%{BRO_DATA:[http][request][referrer]})\t(?:-|%{BRO_DATA:[user_agent][original]})\t(?:-|%{NUMBER:[http][request][body][bytes]:integer})\t(?:-|%{NUMBER:[http][response][body][bytes]:integer})\t(?:-|%{POSINT:[http][response][status_code]:integer})\t(?:-|%{DATA:[zeek][http][status_msg]})\t(?:-|%{POSINT:[zeek][http][info_code]:integer})\t(?:-|%{DATA:[zeek][http][info_msg]})\t(?:-|%{BRO_DATA:[zeek][http][filename]})\t(?:\(empty\)|%{BRO_DATA:[zeek][http][tags]})\t(?:-|%{BRO_DATA:[url][username]})\t(?:-|%{BRO_DATA:[url][password]})\t(?:-|%{BRO_DATA:[zeek][http][proxied]})\t(?:-|%{BRO_DATA:[zeek][http][orig_fuids]})\t(?:-|%{BRO_DATA:[http][request][mime_type]})\t(?:-|%{BRO_DATA:[zeek][http][resp_fuids]})\t(?:-|%{BRO_DATA:[http][response][mime_type]})
9
+ # :long - %{NUMBER:[http][request][body][bytes]:int}
10
+ # :long - %{NUMBER:[http][response][body][bytes]:int}
11
+
12
+ # dns.log - old format
13
+ BRO_DNS %{NUMBER:timestamp}\t%{NOTSPACE:[zeek][session_id]}\t%{IP:[source][ip]}\t%{INT:[source][port]:integer}\t%{IP:[destination][ip]}\t%{INT:[destination][port]:integer}\t%{WORD:[network][transport]}\t(?:-|%{INT:[dns][id]:integer})\t(?:-|%{BRO_DATA:[dns][question][name]})\t(?:-|%{INT:[zeek][dns][qclass]:integer})\t(?:-|%{BRO_DATA:[zeek][dns][qclass_name]})\t(?:-|%{INT:[zeek][dns][qtype]:integer})\t(?:-|%{BRO_DATA:[dns][question][type]})\t(?:-|%{INT:[zeek][dns][rcode]:integer})\t(?:-|%{BRO_DATA:[dns][response_code]})\t(?:-|%{BRO_BOOL:[zeek][dns][AA]})\t(?:-|%{BRO_BOOL:[zeek][dns][TC]})\t(?:-|%{BRO_BOOL:[zeek][dns][RD]})\t(?:-|%{BRO_BOOL:[zeek][dns][RA]})\t(?:-|%{NONNEGINT:[zeek][dns][Z]:integer})\t(?:-|%{BRO_DATA:[zeek][dns][answers]})\t(?:-|%{DATA:[zeek][dns][TTLs]})\t(?:-|%{BRO_BOOL:[zeek][dns][rejected]})
14
+
15
+ # conn.log - old bro, also supports 'newer' format (optional *zeek.connection.local_resp* flag) compared to non-ecs mode
16
+ BRO_CONN %{NUMBER:timestamp}\t%{NOTSPACE:[zeek][session_id]}\t%{IP:[source][ip]}\t%{INT:[source][port]:integer}\t%{IP:[destination][ip]}\t%{INT:[destination][port]:integer}\t%{WORD:[network][transport]}\t(?:-|%{BRO_DATA:[network][protocol]})\t(?:-|%{NUMBER:[zeek][connection][duration]:float})\t(?:-|%{INT:[zeek][connection][orig_bytes]:integer})\t(?:-|%{INT:[zeek][connection][resp_bytes]:integer})\t(?:-|%{BRO_DATA:[zeek][connection][state]})\t(?:-|%{BRO_BOOL:[zeek][connection][local_orig]})\t(?:(?:-|%{BRO_BOOL:[zeek][connection][local_resp]})\t)?(?:-|%{INT:[zeek][connection][missed_bytes]:integer})\t(?:-|%{BRO_DATA:[zeek][connection][history]})\t(?:-|%{INT:[source][packets]:integer})\t(?:-|%{INT:[source][bytes]:integer})\t(?:-|%{INT:[destination][packets]:integer})\t(?:-|%{INT:[destination][bytes]:integer})\t(?:\(empty\)|%{BRO_DATA:[zeek][connection][tunnel_parents]})
17
+ # :long - %{INT:[zeek][connection][orig_bytes]:int}
18
+ # :long - %{INT:[zeek][connection][resp_bytes]:int}
19
+ # :long - %{INT:[zeek][connection][missed_bytes]:int}
20
+ # :long - %{INT:[source][packets]:int}
21
+ # :long - %{INT:[source][bytes]:int}
22
+ # :long - %{INT:[destination][packets]:int}
23
+ # :long - %{INT:[destination][bytes]:int}
24
+
25
+ # files.log - old format
26
+ BRO_FILES %{NUMBER:timestamp}\t%{NOTSPACE:[zeek][files][fuid]}\t(?:-|%{IP:[server][ip]})\t(?:-|%{IP:[client][ip]})\t(?:-|%{BRO_DATA:[zeek][files][session_ids]})\t(?:-|%{BRO_DATA:[zeek][files][source]})\t(?:-|%{INT:[zeek][files][depth]:integer})\t(?:-|%{BRO_DATA:[zeek][files][analyzers]})\t(?:-|%{BRO_DATA:[file][mime_type]})\t(?:-|%{BRO_DATA:[file][name]})\t(?:-|%{NUMBER:[zeek][files][duration]:float})\t(?:-|%{BRO_DATA:[zeek][files][local_orig]})\t(?:-|%{BRO_BOOL:[zeek][files][is_orig]})\t(?:-|%{INT:[zeek][files][seen_bytes]:integer})\t(?:-|%{INT:[file][size]:integer})\t(?:-|%{INT:[zeek][files][missing_bytes]:integer})\t(?:-|%{INT:[zeek][files][overflow_bytes]:integer})\t(?:-|%{BRO_BOOL:[zeek][files][timedout]})\t(?:-|%{BRO_DATA:[zeek][files][parent_fuid]})\t(?:-|%{BRO_DATA:[file][hash][md5]})\t(?:-|%{BRO_DATA:[file][hash][sha1]})\t(?:-|%{BRO_DATA:[file][hash][sha256]})\t(?:-|%{BRO_DATA:[zeek][files][extracted]})
27
+ # :long - %{INT:[zeek][files][seen_bytes]:int}
28
+ # :long - %{INT:[file][size]:int}
29
+ # :long - %{INT:[zeek][files][missing_bytes]:int}
30
+ # :long - %{INT:[zeek][files][overflow_bytes]:int}
@@ -0,0 +1,26 @@
1
+ EXIM_MSGID [0-9A-Za-z]{6}-[0-9A-Za-z]{6}-[0-9A-Za-z]{2}
2
+ # <= message arrival
3
+ # => normal message delivery
4
+ # -> additional address in same delivery
5
+ # *> delivery suppressed by -N
6
+ # ** delivery failed; address bounced
7
+ # == delivery deferred; temporary problem
8
+ EXIM_FLAGS (?:<=|=>|->|\*>|\*\*|==|<>|>>)
9
+ EXIM_DATE (:?%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME})
10
+ EXIM_PID \[%{POSINT:[process][pid]:integer}\]
11
+ EXIM_QT ((\d+y)?(\d+w)?(\d+d)?(\d+h)?(\d+m)?(\d+s)?)
12
+ EXIM_EXCLUDE_TERMS (Message is frozen|(Start|End) queue run| Warning: | retry time not reached | no (IP address|host name) found for (IP address|host) | unexpected disconnection while reading SMTP command | no immediate delivery: |another process is handling this message)
13
+ EXIM_REMOTE_HOST (H=(%{NOTSPACE:[source][address]} )?(\(%{NOTSPACE:[exim][log][remote_address]}\) )?\[%{IP:[source][ip]}\](?::%{POSINT:[source][port]:integer})?)
14
+ EXIM_INTERFACE (I=\[%{IP:[destination][ip]}\](?::%{NUMBER:[destination][port]:integer}))
15
+ EXIM_PROTOCOL (P=%{NOTSPACE:[network][protocol]})
16
+ EXIM_MSG_SIZE (S=%{NUMBER:[exim][log][message][size]:integer})
17
+ EXIM_HEADER_ID (id=%{NOTSPACE:[exim][log][header_id]})
18
+ EXIM_QUOTED_CONTENT (?:\\.|[^\\"])*
19
+ EXIM_SUBJECT (T="%{EXIM_QUOTED_CONTENT:[exim][log][message][subject]}")
20
+
21
+ EXIM_UNKNOWN_FIELD (?:[A-Za-z0-9]{1,4}=(?:%{QUOTEDSTRING}|%{NOTSPACE}))
22
+ EXIM_NAMED_FIELDS (?: (?:%{EXIM_REMOTE_HOST}|%{EXIM_INTERFACE}|%{EXIM_PROTOCOL}|%{EXIM_MSG_SIZE}|%{EXIM_HEADER_ID}|%{EXIM_SUBJECT}|%{EXIM_UNKNOWN_FIELD}))*
23
+
24
+ EXIM_MESSAGE_ARRIVAL %{EXIM_DATE:timestamp} (?:%{EXIM_PID} )?%{EXIM_MSGID:[exim][log][message][id]} (?<[exim][log][flags]><=) (?<[exim][log][status]>[a-z:] )?%{EMAILADDRESS:[exim][log][sender][email]}%{EXIM_NAMED_FIELDS}(?:(?: from <?%{DATA:[exim][log][sender][original]}>?)? for %{EMAILADDRESS:[exim][log][recipient][email]})?
25
+
26
+ EXIM %{EXIM_MESSAGE_ARRIVAL}
@@ -0,0 +1,111 @@
1
+ # NetScreen firewall logs
2
+ NETSCREENSESSIONLOG %{SYSLOGTIMESTAMP:timestamp} %{IPORHOST:[observer][hostname]} %{NOTSPACE:[observer][name]}: (?<[observer][product]>NetScreen) device_id=%{WORD:[netscreen][device_id]} .*?(system-\w+-%{NONNEGINT:[event][code]}\(%{WORD:[netscreen][session][type]}\))?: start_time="%{DATA:[netscreen][session][start_time]}" duration=%{INT:[netscreen][session][duration]:integer} policy_id=%{INT:[netscreen][policy_id]} service=%{DATA:[netscreen][service]} proto=%{INT:[netscreen][protocol_number]:integer} src zone=%{WORD:[observer][ingress][zone]} dst zone=%{WORD:[observer][egress][zone]} action=%{WORD:[event][action]} sent=%{INT:[source][bytes]:integer} rcvd=%{INT:[destination][bytes]:integer} src=%{IPORHOST:[source][address]} dst=%{IPORHOST:[destination][address]}(?: src_port=%{INT:[source][port]:integer} dst_port=%{INT:[destination][port]:integer})?(?: src-xlated ip=%{IP:[source][nat][ip]} port=%{INT:[source][nat][port]:integer} dst-xlated ip=%{IP:[destination][nat][ip]} port=%{INT:[destination][nat][port]:integer})?(?: session_id=%{INT:[netscreen][session][id]} reason=%{GREEDYDATA:[netscreen][session][reason]})?
3
+ # :long - %{INT:[source][bytes]:int}
4
+ # :long - %{INT:[destination][bytes]:int}
5
+
6
+ #== Cisco ASA ==
7
+ CISCO_TAGGED_SYSLOG ^<%{POSINT:[log][syslog][priority]:integer}>%{CISCOTIMESTAMP:timestamp}( %{SYSLOGHOST:[host][hostname]})? ?: %%{CISCOTAG:[cisco][asa][tag]}:
8
+ CISCOTIMESTAMP %{MONTH} +%{MONTHDAY}(?: %{YEAR})? %{TIME}
9
+ CISCOTAG [A-Z0-9]+-%{INT}-(?:[A-Z0-9_]+)
10
+ # Common Particles
11
+ CISCO_ACTION Built|Teardown|Deny|Denied|denied|requested|permitted|denied by ACL|discarded|est-allowed|Dropping|created|deleted
12
+ CISCO_REASON Duplicate TCP SYN|Failed to locate egress interface|Invalid transport field|No matching connection|DNS Response|DNS Query|(?:%{WORD}\s*)*
13
+ CISCO_DIRECTION Inbound|inbound|Outbound|outbound
14
+ CISCO_INTERVAL first hit|%{INT}-second interval
15
+ CISCO_XLATE_TYPE static|dynamic
16
+ # helpers
17
+ CISCO_HITCOUNT_INTERVAL hit-cnt %{INT:[cisco][asa][hit_count]:integer} (?:first hit|%{INT:[cisco][asa][interval]:integer}-second interval)
18
+ CISCO_SRC_IP_USER %{NOTSPACE:[observer][ingress][interface][name]}:%{IP:[source][ip]}(?:\(%{DATA:[source][user][name]}\))?
19
+ CISCO_DST_IP_USER %{NOTSPACE:[observer][egress][interface][name]}:%{IP:[destination][ip]}(?:\(%{DATA:[destination][user][name]}\))?
20
+ CISCO_SRC_HOST_PORT_USER %{NOTSPACE:[observer][ingress][interface][name]}:(?:(?:%{IP:[source][ip]})|(?:%{HOSTNAME:[source][address]}))(?:/%{INT:[source][port]:integer})?(?:\(%{DATA:[source][user][name]}\))?
21
+ CISCO_DST_HOST_PORT_USER %{NOTSPACE:[observer][egress][interface][name]}:(?:(?:%{IP:[destination][ip]})|(?:%{HOSTNAME:[destination][address]}))(?:/%{INT:[destination][port]:integer})?(?:\(%{DATA:[destination][user][name]}\))?
22
+ # ASA-1-104001
23
+ CISCOFW104001 \((?:Primary|Secondary)\) Switching to ACTIVE - %{GREEDYDATA:[event][reason]}
24
+ # ASA-1-104002
25
+ CISCOFW104002 \((?:Primary|Secondary)\) Switching to STANDBY - %{GREEDYDATA:[event][reason]}
26
+ # ASA-1-104003
27
+ CISCOFW104003 \((?:Primary|Secondary)\) Switching to FAILED\.
28
+ # ASA-1-104004
29
+ CISCOFW104004 \((?:Primary|Secondary)\) Switching to OK\.
30
+ # ASA-1-105003
31
+ CISCOFW105003 \((?:Primary|Secondary)\) Monitoring on [Ii]nterface %{NOTSPACE:[network][interface][name]} waiting
32
+ # ASA-1-105004
33
+ CISCOFW105004 \((?:Primary|Secondary)\) Monitoring on [Ii]nterface %{NOTSPACE:[network][interface][name]} normal
34
+ # ASA-1-105005
35
+ CISCOFW105005 \((?:Primary|Secondary)\) Lost Failover communications with mate on [Ii]nterface %{NOTSPACE:[network][interface][name]}
36
+ # ASA-1-105008
37
+ CISCOFW105008 \((?:Primary|Secondary)\) Testing [Ii]nterface %{NOTSPACE:[network][interface][name]}
38
+ # ASA-1-105009
39
+ CISCOFW105009 \((?:Primary|Secondary)\) Testing on [Ii]nterface %{NOTSPACE:[network][interface][name]} (?:Passed|Failed)
40
+ # ASA-2-106001
41
+ CISCOFW106001 %{CISCO_DIRECTION:[cisco][asa][network][direction]} %{WORD:[cisco][asa][network][transport]} connection %{CISCO_ACTION:[cisco][asa][outcome]} from %{IP:[source][ip]}/%{INT:[source][port]:integer} to %{IP:[destination][ip]}/%{INT:[destination][port]:integer} flags %{DATA:[cisco][asa][tcp_flags]} on interface %{NOTSPACE:[observer][egress][interface][name]}
42
+ # ASA-2-106006, ASA-2-106007, ASA-2-106010
43
+ CISCOFW106006_106007_106010 %{CISCO_ACTION:[cisco][asa][outcome]} %{CISCO_DIRECTION:[cisco][asa][network][direction]} %{WORD:[cisco][asa][network][transport]} (?:from|src) %{IP:[source][ip]}/%{INT:[source][port]:integer}(?:\(%{DATA:[source][user][name]}\))? (?:to|dst) %{IP:[destination][ip]}/%{INT:[destination][port]:integer}(?:\(%{DATA:[destination][user][name]}\))? (?:(?:on interface %{NOTSPACE:[observer][egress][interface][name]})|(?:due to %{CISCO_REASON:[event][reason]}))
44
+ # ASA-3-106014
45
+ CISCOFW106014 %{CISCO_ACTION:[cisco][asa][outcome]} %{CISCO_DIRECTION:[cisco][asa][network][direction]} %{WORD:[cisco][asa][network][transport]} src %{CISCO_SRC_IP_USER} dst %{CISCO_DST_IP_USER}\s?\(type %{INT:[cisco][asa][icmp_type]:integer}, code %{INT:[cisco][asa][icmp_code]:integer}\)
46
+ # ASA-6-106015
47
+ CISCOFW106015 %{CISCO_ACTION:[cisco][asa][outcome]} %{WORD:[cisco][asa][network][transport]} \(%{DATA:[cisco][asa][rule_name]}\) from %{IP:[source][ip]}/%{INT:[source][port]:integer} to %{IP:[destination][ip]}/%{INT:[destination][port]:integer} flags %{DATA:[cisco][asa][tcp_flags]} on interface %{NOTSPACE:[observer][egress][interface][name]}
48
+ # ASA-1-106021
49
+ CISCOFW106021 %{CISCO_ACTION:[cisco][asa][outcome]} %{WORD:[cisco][asa][network][transport]} reverse path check from %{IP:[source][ip]} to %{IP:[destination][ip]} on interface %{NOTSPACE:[observer][egress][interface][name]}
50
+ # ASA-4-106023
51
+ CISCOFW106023 %{CISCO_ACTION:[cisco][asa][outcome]}(?: protocol)? %{WORD:[cisco][asa][network][transport]} src %{CISCO_SRC_HOST_PORT_USER} dst %{CISCO_DST_HOST_PORT_USER}( \(type %{INT:[cisco][asa][icmp_type]:integer}, code %{INT:[cisco][asa][icmp_code]:integer}\))? by access-group "?%{DATA:[cisco][asa][rule_name]}"? \[%{DATA:[@metadata][cisco][asa][hashcode1]}, %{DATA:[@metadata][cisco][asa][hashcode2]}\]
52
+ # ASA-4-106100, ASA-4-106102, ASA-4-106103
53
+ CISCOFW106100_2_3 access-list %{NOTSPACE:[cisco][asa][rule_name]} %{CISCO_ACTION:[cisco][asa][outcome]} %{WORD:[cisco][asa][network][transport]} for user '%{DATA:[user][name]}' %{DATA:[observer][ingress][interface][name]}/%{IP:[source][ip]}\(%{INT:[source][port]:integer}\) -> %{DATA:[observer][egress][interface][name]}/%{IP:[destination][ip]}\(%{INT:[destination][port]:integer}\) %{CISCO_HITCOUNT_INTERVAL} \[%{DATA:[@metadata][cisco][asa][hashcode1]}, %{DATA:[@metadata][cisco][asa][hashcode2]}\]
54
+ # ASA-5-106100
55
+ CISCOFW106100 access-list %{NOTSPACE:[cisco][asa][rule_name]} %{CISCO_ACTION:[cisco][asa][outcome]} %{WORD:[cisco][asa][network][transport]} %{DATA:[observer][ingress][interface][name]}/%{IP:[source][ip]}\(%{INT:[source][port]:integer}\)(?:\(%{DATA:[source][user][name]}\))? -> %{DATA:[observer][egress][interface][name]}/%{IP:[destination][ip]}\(%{INT:[destination][port]:integer}\)(?:\(%{DATA:[source][user][name]}\))? hit-cnt %{INT:[cisco][asa][hit_count]:integer} %{CISCO_INTERVAL} \[%{DATA:[@metadata][cisco][asa][hashcode1]}, %{DATA:[@metadata][cisco][asa][hashcode2]}\]
56
+ # ASA-5-304001
57
+ CISCOFW304001 %{IP:[source][ip]}(?:\(%{DATA:[source][user][name]}\))? Accessed URL %{IP:[destination][ip]}:%{GREEDYDATA:[url][original]}
58
+ # ASA-6-110002
59
+ CISCOFW110002 %{CISCO_REASON:[event][reason]} for %{WORD:[cisco][asa][network][transport]} from %{DATA:[observer][ingress][interface][name]}:%{IP:[source][ip]}/%{INT:[source][port]:integer} to %{IP:[destination][ip]}/%{INT:[destination][port]:integer}
60
+ # ASA-6-302010
61
+ CISCOFW302010 %{INT:[cisco][asa][connections][in_use]:integer} in use, %{INT:[cisco][asa][connections][most_used]:integer} most used
62
+ # ASA-6-302013, ASA-6-302014, ASA-6-302015, ASA-6-302016
63
+ CISCOFW302013_302014_302015_302016 %{CISCO_ACTION:[cisco][asa][outcome]}(?: %{CISCO_DIRECTION:[cisco][asa][network][direction]})? %{WORD:[cisco][asa][network][transport]} connection %{INT:[cisco][asa][connection_id]} for %{NOTSPACE:[observer][ingress][interface][name]}:%{IP:[source][ip]}/%{INT:[source][port]:integer}(?: \(%{IP:[source][nat][ip]}/%{INT:[source][nat][port]:integer}\))?(?:\(%{DATA:[source][user][name]}\))? to %{NOTSPACE:[observer][egress][interface][name]}:%{IP:[destination][ip]}/%{INT:[destination][port]:integer}( \(%{IP:[destination][nat][ip]}/%{INT:[destination][nat][port]:integer}\))?(?:\(%{DATA:[destination][user][name]}\))?( duration %{TIME:[cisco][asa][duration]} bytes %{INT:[network][bytes]:integer})?(?: %{CISCO_REASON:[event][reason]})?(?: \(%{DATA:[user][name]}\))?
64
+ # :long - %{INT:[network][bytes]:int}
65
+ # ASA-6-302020, ASA-6-302021
66
+ CISCOFW302020_302021 %{CISCO_ACTION:[cisco][asa][outcome]}(?: %{CISCO_DIRECTION:[cisco][asa][network][direction]})? %{WORD:[cisco][asa][network][transport]} connection for faddr %{IP:[destination][ip]}/%{INT:[cisco][asa][icmp_seq]:integer}(?:\(%{DATA:[destination][user][name]}\))? gaddr %{IP:[source][nat][ip]}/%{INT:[cisco][asa][icmp_type]:integer} laddr %{IP:[source][ip]}/%{INT}(?: \(%{DATA:[source][user][name]}\))?
67
+ # ASA-6-305011
68
+ CISCOFW305011 %{CISCO_ACTION:[cisco][asa][outcome]} %{CISCO_XLATE_TYPE} %{WORD:[cisco][asa][network][transport]} translation from %{DATA:[observer][ingress][interface][name]}:%{IP:[source][ip]}(/%{INT:[source][port]:integer})?(?:\(%{DATA:[source][user][name]}\))? to %{DATA:[observer][egress][interface][name]}:%{IP:[destination][ip]}/%{INT:[destination][port]:integer}
69
+ # ASA-3-313001, ASA-3-313004, ASA-3-313008
70
+ CISCOFW313001_313004_313008 %{CISCO_ACTION:[cisco][asa][outcome]} %{WORD:[cisco][asa][network][transport]} type=%{INT:[cisco][asa][icmp_type]:integer}, code=%{INT:[cisco][asa][icmp_code]:integer} from %{IP:[source][ip]} on interface %{NOTSPACE:[observer][egress][interface][name]}(?: to %{IP:[destination][ip]})?
71
+ # ASA-4-313005
72
+ CISCOFW313005 %{CISCO_REASON:[event][reason]} for %{WORD:[cisco][asa][network][transport]} error message: %{WORD} src %{CISCO_SRC_IP_USER} dst %{CISCO_DST_IP_USER} \(type %{INT:[cisco][asa][icmp_type]:integer}, code %{INT:[cisco][asa][icmp_code]:integer}\) on %{NOTSPACE} interface\.\s+Original IP payload: %{WORD:[cisco][asa][original_ip_payload][network][transport]} src %{IP:[cisco][asa][original_ip_payload][source][ip]}/%{INT:[cisco][asa][original_ip_payload][source][port]:integer}(?:\(%{DATA:[cisco][asa][original_ip_payload][source][user][name]}\))? dst %{IP:[cisco][asa][original_ip_payload][destination][ip]}/%{INT:[cisco][asa][original_ip_payload][destination][port]:integer}(?:\(%{DATA:[cisco][asa][original_ip_payload][destination][user][name]}\))?
73
+ # ASA-5-321001
74
+ CISCOFW321001 Resource '%{DATA:[cisco][asa][resource][name]}' limit of %{POSINT:[cisco][asa][resource][limit]:integer} reached for system
75
+ # ASA-4-402117
76
+ CISCOFW402117 %{WORD:[cisco][asa][network][type]}: Received a non-IPSec packet \(protocol=\s?%{WORD:[cisco][asa][network][transport]}\) from %{IP:[source][ip]} to %{IP:[destination][ip]}\.?
77
+ # ASA-4-402119
78
+ CISCOFW402119 %{WORD:[cisco][asa][network][type]}: Received an %{WORD:[cisco][asa][ipsec][protocol]} packet \(SPI=\s?%{DATA:[cisco][asa][ipsec][spi]}, sequence number=\s?%{DATA:[cisco][asa][ipsec][seq_num]}\) from %{IP:[source][ip]} \(user=\s?%{DATA:[source][user][name]}\) to %{IP:[destination][ip]} that failed anti-replay checking\.?
79
+ # ASA-4-419001
80
+ CISCOFW419001 %{CISCO_ACTION:[cisco][asa][outcome]} %{WORD:[cisco][asa][network][transport]} packet from %{NOTSPACE:[observer][ingress][interface][name]}:%{IP:[source][ip]}/%{INT:[source][port]:integer} to %{NOTSPACE:[observer][egress][interface][name]}:%{IP:[destination][ip]}/%{INT:[destination][port]:integer}, reason: %{GREEDYDATA:[event][reason]}
81
+ # ASA-4-419002
82
+ CISCOFW419002 %{CISCO_REASON:[event][reason]} from %{DATA:[observer][ingress][interface][name]}:%{IP:[source][ip]}/%{INT:[source][port]:integer} to %{DATA:[observer][egress][interface][name]}:%{IP:[destination][ip]}/%{INT:[destination][port]:integer} with different initial sequence number
83
+ # ASA-4-500004
84
+ CISCOFW500004 %{CISCO_REASON:[event][reason]} for protocol=%{WORD:[cisco][asa][network][transport]}, from %{IP:[source][ip]}/%{INT:[source][port]:integer} to %{IP:[destination][ip]}/%{INT:[destination][port]:integer}
85
+ # ASA-6-602303, ASA-6-602304
86
+ CISCOFW602303_602304 %{WORD:[cisco][asa][network][type]}: An %{CISCO_DIRECTION:[cisco][asa][network][direction]} %{DATA:[cisco][asa][ipsec][tunnel_type]} SA \(SPI=\s?%{DATA:[cisco][asa][ipsec][spi]}\) between %{IP:[source][ip]} and %{IP:[destination][ip]} \(user=\s?%{DATA:[source][user][name]}\) has been %{CISCO_ACTION:[cisco][asa][outcome]}
87
+ # ASA-7-710001, ASA-7-710002, ASA-7-710003, ASA-7-710005, ASA-7-710006
88
+ CISCOFW710001_710002_710003_710005_710006 %{WORD:[cisco][asa][network][transport]} (?:request|access) %{CISCO_ACTION:[cisco][asa][outcome]} from %{IP:[source][ip]}/%{INT:[source][port]:integer} to %{DATA:[observer][egress][interface][name]}:%{IP:[destination][ip]}/%{INT:[destination][port]:integer}
89
+ # ASA-6-713172
90
+ CISCOFW713172 Group = %{DATA:[cisco][asa][source][group]}, IP = %{IP:[source][ip]}, Automatic NAT Detection Status:\s+Remote end\s*%{DATA:[@metadata][cisco][asa][remote_nat]}\s*behind a NAT device\s+This\s+end\s*%{DATA:[@metadata][cisco][asa][local_nat]}\s*behind a NAT device
91
+ # ASA-4-733100
92
+ CISCOFW733100 \[\s*%{DATA:[cisco][asa][burst][object]}\s*\] drop %{DATA:[cisco][asa][burst][id]} exceeded. Current burst rate is %{INT:[cisco][asa][burst][current_rate]:integer} per second, max configured rate is %{INT:[cisco][asa][burst][configured_rate]:integer}; Current average rate is %{INT:[cisco][asa][burst][avg_rate]:integer} per second, max configured rate is %{INT:[cisco][asa][burst][configured_avg_rate]:integer}; Cumulative total count is %{INT:[cisco][asa][burst][cumulative_count]:integer}
93
+ #== End Cisco ASA ==
94
+
95
+
96
+ IPTABLES_TCP_FLAGS (CWR |ECE |URG |ACK |PSH |RST |SYN |FIN )*
97
+ IPTABLES_TCP_PART (?:SEQ=%{INT:[iptables][tcp][seq]:integer}\s+)?(?:ACK=%{INT:[iptables][tcp][ack]:integer}\s+)?WINDOW=%{INT:[iptables][tcp][window]:integer}\s+RES=0x%{BASE16NUM:[iptables][tcp_reserved_bits]}\s+%{IPTABLES_TCP_FLAGS:[iptables][tcp][flags]}
98
+
99
+ IPTABLES4_FRAG (?:(?<= )(?:CE|DF|MF))*
100
+ IPTABLES4_PART SRC=%{IPV4:[source][ip]}\s+DST=%{IPV4:[destination][ip]}\s+LEN=(?:%{INT:[iptables][length]:integer})?\s+TOS=(?:0|0x%{BASE16NUM:[iptables][tos]})?\s+PREC=(?:0x%{BASE16NUM:[iptables][precedence_bits]})?\s+TTL=(?:%{INT:[iptables][ttl]:integer})?\s+ID=(?:%{INT:[iptables][id]})?\s+(?:%{IPTABLES4_FRAG:[iptables][fragment_flags]})?(?:\s+FRAG: %{INT:[iptables][fragment_offset]:integer})?
101
+ IPTABLES6_PART SRC=%{IPV6:[source][ip]}\s+DST=%{IPV6:[destination][ip]}\s+LEN=(?:%{INT:[iptables][length]:integer})?\s+TC=(?:0|0x%{BASE16NUM:[iptables][tos]})?\s+HOPLIMIT=(?:%{INT:[iptables][ttl]:integer})?\s+FLOWLBL=(?:%{INT:[iptables][flow_label]})?
102
+
103
+ IPTABLES IN=(?:%{NOTSPACE:[observer][ingress][interface][name]})?\s+OUT=(?:%{NOTSPACE:[observer][egress][interface][name]})?\s+(?:MAC=(?:%{COMMONMAC:[destination][mac]})?(?::%{COMMONMAC:[source][mac]})?(?::[A-Fa-f0-9]{2}:[A-Fa-f0-9]{2})?\s+)?(:?%{IPTABLES4_PART}|%{IPTABLES6_PART}).*?PROTO=(?:%{WORD:[network][transport]})?\s+SPT=(?:%{INT:[source][port]:integer})?\s+DPT=(?:%{INT:[destination][port]:integer})?\s+(?:%{IPTABLES_TCP_PART})?
104
+
105
+ # Shorewall firewall logs
106
+ SHOREWALL (?:%{SYSLOGTIMESTAMP:timestamp}) (?:%{WORD:[observer][hostname]}) .*Shorewall:(?:%{WORD:[shorewall][firewall][type]})?:(?:%{WORD:[shorewall][firewall][action]})?.*%{IPTABLES}
107
+ #== End Shorewall
108
+ #== SuSE Firewall 2 ==
109
+ SFW2_LOG_PREFIX SFW2\-INext\-%{NOTSPACE:[suse][firewall][action]}
110
+ SFW2 ((?:%{SYSLOGTIMESTAMP:timestamp})|(?:%{TIMESTAMP_ISO8601:timestamp}))\s*%{HOSTNAME:[observer][hostname]}.*?%{SFW2_LOG_PREFIX:[suse][firewall][log_prefix]}\s*%{IPTABLES}
111
+ #== End SuSE ==
@@ -0,0 +1,95 @@
1
+ USERNAME [a-zA-Z0-9._-]+
2
+ USER %{USERNAME}
3
+ EMAILLOCALPART [a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]{1,64}(?:\.[a-zA-Z0-9!#$%&'*+\-/=?^_`{|}~]{1,62}){0,63}
4
+ EMAILADDRESS %{EMAILLOCALPART}@%{HOSTNAME}
5
+ INT (?:[+-]?(?:[0-9]+))
6
+ BASE10NUM (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))
7
+ NUMBER (?:%{BASE10NUM})
8
+ BASE16NUM (?<![0-9A-Fa-f])(?:[+-]?(?:0x)?(?:[0-9A-Fa-f]+))
9
+ BASE16FLOAT \b(?<![0-9A-Fa-f.])(?:[+-]?(?:0x)?(?:(?:[0-9A-Fa-f]+(?:\.[0-9A-Fa-f]*)?)|(?:\.[0-9A-Fa-f]+)))\b
10
+
11
+ POSINT \b(?:[1-9][0-9]*)\b
12
+ NONNEGINT \b(?:[0-9]+)\b
13
+ WORD \b\w+\b
14
+ NOTSPACE \S+
15
+ SPACE \s*
16
+ DATA .*?
17
+ GREEDYDATA .*
18
+ QUOTEDSTRING (?>(?<!\\)(?>"(?>\\.|[^\\"]+)+"|""|(?>'(?>\\.|[^\\']+)+')|''|(?>`(?>\\.|[^\\`]+)+`)|``))
19
+ UUID [A-Fa-f0-9]{8}-(?:[A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}
20
+ # URN, allowing use of RFC 2141 section 2.3 reserved characters
21
+ URN urn:[0-9A-Za-z][0-9A-Za-z-]{0,31}:(?:%[0-9a-fA-F]{2}|[0-9A-Za-z()+,.:=@;$_!*'/?#-])+
22
+
23
+ # Networking
24
+ MAC (?:%{CISCOMAC}|%{WINDOWSMAC}|%{COMMONMAC})
25
+ CISCOMAC (?:(?:[A-Fa-f0-9]{4}\.){2}[A-Fa-f0-9]{4})
26
+ WINDOWSMAC (?:(?:[A-Fa-f0-9]{2}-){5}[A-Fa-f0-9]{2})
27
+ COMMONMAC (?:(?:[A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2})
28
+ IPV6 ((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?
29
+ IPV4 (?<![0-9])(?:(?:[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])[.](?:[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])[.](?:[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])[.](?:[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]))(?![0-9])
30
+ IP (?:%{IPV6}|%{IPV4})
31
+ HOSTNAME \b(?:[0-9A-Za-z][0-9A-Za-z-]{0,62})(?:\.(?:[0-9A-Za-z][0-9A-Za-z-]{0,62}))*(\.?|\b)
32
+ IPORHOST (?:%{IP}|%{HOSTNAME})
33
+ HOSTPORT %{IPORHOST}:%{POSINT}
34
+
35
+ # paths (only absolute paths are matched)
36
+ PATH (?:%{UNIXPATH}|%{WINPATH})
37
+ UNIXPATH (/[[[:alnum:]]_%!$@:.,+~-]*)+
38
+ TTY (?:/dev/(pts|tty([pq])?)(\w+)?/?(?:[0-9]+))
39
+ WINPATH (?>[A-Za-z]+:|\\)(?:\\[^\\?*]*)+
40
+ URIPROTO [A-Za-z]([A-Za-z0-9+\-.]+)+
41
+ URIHOST %{IPORHOST}(?::%{POSINT})?
42
+ # uripath comes loosely from RFC1738, but mostly from what Firefox doesn't turn into %XX
43
+ URIPATH (?:/[A-Za-z0-9$.+!*'(){},~:;=@#%&_\-]*)+
44
+ URIQUERY [A-Za-z0-9$.+!*'|(){},~@#%&/=:;_?\-\[\]<>]*
45
+ # deprecated (kept due compatibility):
46
+ URIPARAM \?%{URIQUERY}
47
+ URIPATHPARAM %{URIPATH}(?:\?%{URIQUERY})?
48
+ URI %{URIPROTO}://(?:%{USER}(?::[^@]*)?@)?(?:%{URIHOST})?(?:%{URIPATH}(?:\?%{URIQUERY})?)?
49
+
50
+ # Months: January, Feb, 3, 03, 12, December
51
+ MONTH \b(?:[Jj]an(?:uary|uar)?|[Ff]eb(?:ruary|ruar)?|[Mm](?:a|ä)?r(?:ch|z)?|[Aa]pr(?:il)?|[Mm]a(?:y|i)?|[Jj]un(?:e|i)?|[Jj]ul(?:y|i)?|[Aa]ug(?:ust)?|[Ss]ep(?:tember)?|[Oo](?:c|k)?t(?:ober)?|[Nn]ov(?:ember)?|[Dd]e(?:c|z)(?:ember)?)\b
52
+ MONTHNUM (?:0?[1-9]|1[0-2])
53
+ MONTHNUM2 (?:0[1-9]|1[0-2])
54
+ MONTHDAY (?:(?:0[1-9])|(?:[12][0-9])|(?:3[01])|[1-9])
55
+
56
+ # Days: Monday, Tue, Thu, etc...
57
+ DAY (?:Mon(?:day)?|Tue(?:sday)?|Wed(?:nesday)?|Thu(?:rsday)?|Fri(?:day)?|Sat(?:urday)?|Sun(?:day)?)
58
+
59
+ # Years?
60
+ YEAR (?>\d\d){1,2}
61
+ HOUR (?:2[0123]|[01]?[0-9])
62
+ MINUTE (?:[0-5][0-9])
63
+ # '60' is a leap second in most time standards and thus is valid.
64
+ SECOND (?:(?:[0-5]?[0-9]|60)(?:[:.,][0-9]+)?)
65
+ TIME (?!<[0-9])%{HOUR}:%{MINUTE}(?::%{SECOND})(?![0-9])
66
+ # datestamp is YYYY/MM/DD-HH:MM:SS.UUUU (or something like it)
67
+ DATE_US %{MONTHNUM}[/-]%{MONTHDAY}[/-]%{YEAR}
68
+ DATE_EU %{MONTHDAY}[./-]%{MONTHNUM}[./-]%{YEAR}
69
+ ISO8601_TIMEZONE (?:Z|[+-]%{HOUR}(?::?%{MINUTE}))
70
+ ISO8601_SECOND %{SECOND}
71
+ TIMESTAMP_ISO8601 %{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T ]%{HOUR}:?%{MINUTE}(?::?%{SECOND})?%{ISO8601_TIMEZONE}?
72
+ DATE %{DATE_US}|%{DATE_EU}
73
+ DATESTAMP %{DATE}[- ]%{TIME}
74
+ TZ (?:[APMCE][SD]T|UTC)
75
+ DATESTAMP_RFC822 %{DAY} %{MONTH} %{MONTHDAY} %{YEAR} %{TIME} %{TZ}
76
+ DATESTAMP_RFC2822 %{DAY}, %{MONTHDAY} %{MONTH} %{YEAR} %{TIME} %{ISO8601_TIMEZONE}
77
+ DATESTAMP_OTHER %{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{TZ} %{YEAR}
78
+ DATESTAMP_EVENTLOG %{YEAR}%{MONTHNUM2}%{MONTHDAY}%{HOUR}%{MINUTE}%{SECOND}
79
+
80
+ # Syslog Dates: Month Day HH:MM:SS
81
+ SYSLOGTIMESTAMP %{MONTH} +%{MONTHDAY} %{TIME}
82
+ PROG [\x21-\x5a\x5c\x5e-\x7e]+
83
+ SYSLOGPROG %{PROG:[process][name]}(?:\[%{POSINT:[process][pid]:integer}\])?
84
+ SYSLOGHOST %{IPORHOST}
85
+ SYSLOGFACILITY <%{NONNEGINT:[log][syslog][facility][code]:integer}.%{NONNEGINT:[log][syslog][priority]:integer}>
86
+ HTTPDATE %{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME} %{INT}
87
+
88
+ # Shortcuts
89
+ QS %{QUOTEDSTRING}
90
+
91
+ # Log formats
92
+ SYSLOGBASE %{SYSLOGTIMESTAMP:timestamp} (?:%{SYSLOGFACILITY} )?%{SYSLOGHOST:[host][hostname]} %{SYSLOGPROG}:
93
+
94
+ # Log Levels
95
+ LOGLEVEL ([Aa]lert|ALERT|[Tt]race|TRACE|[Dd]ebug|DEBUG|[Nn]otice|NOTICE|[Ii]nfo?(?:rmation)?|INFO?(?:RMATION)?|[Ww]arn?(?:ing)?|WARN?(?:ING)?|[Ee]rr?(?:or)?|ERR?(?:OR)?|[Cc]rit?(?:ical)?|CRIT?(?:ICAL)?|[Ff]atal|FATAL|[Ss]evere|SEVERE|EMERG(?:ENCY)?|[Ee]merg(?:ency)?)