fluent-plugin-parser_cef 1.0.0 → 1.0.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 28b195b49a40cd27dcaf136e342f7a4912901010
4
- data.tar.gz: 04b4477f4b315e721ad588d70a4adc330ed8d132
2
+ SHA256:
3
+ metadata.gz: 0bc85f7ebcf43a48fba7deabb791c74db42bc70625fb6c43529b39812d14e139
4
+ data.tar.gz: 0df516f87fe24dd6e0df70aeb3e79d015134ddb092dab1cee216d979c891395b
5
5
  SHA512:
6
- metadata.gz: 182d3610e26d0e4a9fbb1f2424928cc7320f21f019ed3e13ec699ec60de4d7db0f26741794f8d078ede666c277d6223c60c28c1e07a18bde66858e8e65d2db0a
7
- data.tar.gz: 10d33b50f2e00d6c19cb853c9e92111b1781097e42b24cbefc1a8b26c18b330a88b39573aa937123418f7516315b6e9b9112a1c590100a8e1667b783006f019a
6
+ metadata.gz: acaf20adf9af9c84f5b6a5d9f6ece1d00073ea6d41e9345d17cdc455836e9b18e86f199535e7b22f257b735c69d0dfa0544c40794eb50eaa67f51a064175493d
7
+ data.tar.gz: 8ff3dbf2755e1a9fddcd8044b908e34cfd396580e42d7ad56ed8a878a677a1d1a8c1eb2071b3e5f8cd29882dc1a0ab04fb6c10439be6d8e0686a87fc30d66dad
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "fluent-plugin-parser_cef",
3
+ "image": "mcr.microsoft.com/devcontainers/ruby:3.4",
4
+ "postCreateCommand": "bundle install",
5
+ "customizations": {
6
+ "vscode": {
7
+ "extensions": ["Shopify.ruby-lsp"]
8
+ }
9
+ }
10
+ }
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ # Keep the actions used by the CI and release workflows up to date,
4
+ # including the commit SHAs pinned in release.yml.
5
+ - package-ecosystem: github-actions
6
+ directory: /
7
+ schedule:
8
+ interval: monthly
@@ -0,0 +1,47 @@
1
+ name: Release
2
+
3
+ # Publishes the gem to RubyGems.org via Trusted Publishing (OIDC) when a
4
+ # version tag such as v1.2.3 is pushed. No RubyGems API key is stored here.
5
+ on:
6
+ push:
7
+ tags:
8
+ - "v*"
9
+
10
+ permissions: {}
11
+
12
+ jobs:
13
+ release:
14
+ name: Push gem to RubyGems.org
15
+ runs-on: ubuntu-latest
16
+ # Must match the environment configured for the trusted publisher on
17
+ # RubyGems.org.
18
+ environment: release
19
+ permissions:
20
+ contents: read
21
+ id-token: write # required to request the OIDC token for RubyGems.org
22
+
23
+ steps:
24
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25
+ with:
26
+ persist-credentials: false
27
+
28
+ - name: Check that the tag matches VERSION
29
+ env:
30
+ TAG: ${{ github.ref_name }}
31
+ run: |
32
+ expected="v$(cat VERSION)"
33
+ if [ "$TAG" != "$expected" ]; then
34
+ echo "::error::Tag $TAG does not match VERSION ($expected)"
35
+ exit 1
36
+ fi
37
+
38
+ - uses: ruby/setup-ruby@7eaac3fe3108dfb746bef3a3c1a21344d57923c7 # v1.348.0
39
+ with:
40
+ ruby-version: ruby
41
+ bundler-cache: true
42
+
43
+ - name: Run specs
44
+ run: bundle exec rake spec
45
+
46
+ # The tag already exists, so `rake release` only builds and pushes the gem.
47
+ - uses: rubygems/release-gem@2654a0fe0dc39725c07fe84d7fe863a084f2424e # v1.5.0
@@ -0,0 +1,27 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby: ["2.7", "3.1", "3.2", "3.3", "3.4", "4.0"]
18
+ name: Ruby ${{ matrix.ruby }}
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+ - uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby }}
24
+ bundler-cache: true
25
+ - run: bundle exec rake spec
26
+ env:
27
+ COVERAGE: "1"
data/.gitignore CHANGED
@@ -56,3 +56,7 @@ Gemfile.lock
56
56
 
57
57
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
58
58
  .rvmrc
59
+
60
+ # Local development
61
+ Gemfile.lock
62
+ /vendor/bundle
data/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ ## 1.0.1 - 2026-12-05
6
+
7
+ ### Fixed
8
+
9
+ - The gem can be installed on Ruby 3.x and later again:
10
+ `required_ruby_version` is now `>= 2.7` instead of `~> 2.1`, which
11
+ limited 1.0.0 to Ruby 2.x (#10; also requested in #7, #9).
12
+
13
+ ### Changed
14
+
15
+ - CI moved from Travis CI to GitHub Actions and runs on Ruby 2.7 and
16
+ 3.1 - 4.0 (#10).
17
+ - Releases are published from GitHub Actions via RubyGems Trusted
18
+ Publishing (#10).
19
+ - Gem metadata now includes `source_code_uri`, `bug_tracker_uri` and
20
+ `rubygems_mfa_required`, and the summary and description were
21
+ rewritten (#10).
22
+ - README rewritten; the parameter `syslog_timestamp_format` was
23
+ documented under a wrong name (#10).
24
+
25
+ No change to parsing behaviour.
26
+
27
+ ## 1.0.0 - 2017-12-03
28
+
29
+ ### Changed
30
+
31
+ - Migrated to the Fluentd v0.14 plugin API; requires Fluentd v0.14 or
32
+ later (#1).
33
+
34
+ ## 0.3.1 - 2017-02-23
35
+
36
+ ### Changed
37
+
38
+ - Required Ruby version changed from 2.0 to 2.1.
39
+
40
+ ## 0.3.0 - 2017-02-23
41
+
42
+ ### Changed
43
+
44
+ - Invalid UTF-8 characters are replaced with `?`.
45
+
46
+ ## 0.2.0 - 2017-01-06
47
+
48
+ ### Added
49
+
50
+ - `log_utc_offset` option and support for timestamps with a time zone.
51
+
52
+ ## 0.1.1 - 2016-12-06
53
+
54
+ - Code quality fixes.
55
+
56
+ ## 0.1.0 - 2016-12-05
57
+
58
+ - Initial release.
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in fluent-plugin-parser_cef.gemspec
2
4
  gemspec
3
- gem 'coveralls', require: false
4
- gem 'simplecov'
5
+
6
+ group :development, :test do
7
+ gem 'simplecov', require: false
8
+ end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016 Tomoyuki Sugimura
1
+ Copyright (c) 2016-2026 Tomoyuki Sugimura
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,96 +1,170 @@
1
- # fluent-plugin-parser_cef
2
-
3
- [![Gem Version](https://badge.fury.io/rb/fluent-plugin-parser_cef.svg)](https://badge.fury.io/rb/fluent-plugin-parser_cef)
4
- [![Build Status](https://travis-ci.org/lunardial/fluent-plugin-parser_cef.svg?branch=master)](https://travis-ci.org/lunardial/fluent-plugin-parser_cef)
5
- [![Code Climate](https://codeclimate.com/github/lunardial/fluent-plugin-parser_cef/badges/gpa.svg)](https://codeclimate.com/github/lunardial/fluent-plugin-parser_cef)
6
- [![Coverage Status](https://coveralls.io/repos/github/lunardial/fluent-plugin-parser_cef/badge.svg?branch=master)](https://coveralls.io/github/lunardial/fluent-plugin-parser_cef?branch=master)
7
- [![downloads](https://img.shields.io/gem/dt/fluent-plugin-parser_cef.svg)](https://rubygems.org/gems/fluent-plugin-parser_cef)
8
- [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
9
-
10
- Fluentd Parser plugin to parse CEF - common event format -
11
-
12
- ## Requirements
13
-
14
- | fluent-plugin-parser_cef | fluentd |
15
- |---------------------------|---------|
16
- | >= 1.0.0 | >= v0.14.0 |
17
- | < 1.0.0 | >= v0.12.0 |
18
-
19
- ## Installation
20
-
21
- Add this line to your application's Gemfile:
22
-
23
- ```bash
24
- # for fluentd v0.12
25
- gem install fluent-plugin-parser_cef -v "< 1.0.0"
26
-
27
- # for fluentd v0.14 or higher
28
- gem install fluent-plugin-parser_cef
29
-
30
- # for td-agent2
31
- td-agent-gem install fluent-plugin-parser_cef -v "< 1.0.0"
32
-
33
- # for td-agent3
34
- td-agent-gem install fluent-plugin-parser_cef
35
- ```
36
-
37
- ## Usage
38
-
39
- ```
40
- <source>
41
- @type tail
42
- tag develop.cef
43
- path /tmp/fluentd/test.log
44
- pos_file /tmp/fluentd/test.pos
45
-
46
- format cef
47
- #log_format syslog
48
- #syslog_timestamp_format '\w{3}\s+\d{1,2}\s\d{2}:\d{2}:\d{2}'
49
- #cef_version 0
50
- #parse_strict_mode true
51
- #cef_keyfilename 'config/cef_version_0_keys.yaml'
52
- #output_raw_field false
53
- </source>
54
- ```
55
-
56
- ## parameters
57
-
58
- * `log_format` (default: syslog)
59
-
60
- input log format, currently only 'syslog' is valid
61
-
62
- * `log_utc_offset` (default: nil)
63
-
64
- set log utc_offset if each record does not have timezone information and the timezone is not local timezone
65
-
66
- if log_utc_offset set to nil or invalid value, then use system timezone
67
-
68
- if a log have timezone information, log_utc_offset is ignored
69
-
70
- * `syslog_timestamp` (default: '\w{3}\s+\d{1,2}\s\d{2}:\d{2}:\d{2}')
71
-
72
- syslog timestamp format, the default is traditional syslog timestamp
73
-
74
- * `cef_version` (default: 0)
75
-
76
- CEF version, this should be 0
77
-
78
- * `parse_strict_mode` (default: true)
79
-
80
- if the CEF extensions are the following, the value of the key cs2 should 'foo hoge=fuga'
81
-
82
- - cs1=test cs2=foo hoge=fuga cs3=bar
83
-
84
- if parse_strict_mode is false, this is raugh parse, so the value of the key cs2 become 'foo' and non CEF key 'hoge' shown, and the value is 'fuga'
85
-
86
- * `cef_keyfilename` (default: 'config/cef_version_0_keys.yaml')
87
-
88
- used when parse_strict_mode is true, this is the array of the valid CEF keys
89
-
90
- * `output_raw_field` (default: false)
91
-
92
- append {"raw":\<message itself\>} key-value even if success parsing
93
-
94
- ## License
95
-
96
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
1
+ # fluent-plugin-parser_cef
2
+
3
+ [![Gem Version](https://img.shields.io/gem/v/fluent-plugin-parser_cef.svg)](https://rubygems.org/gems/fluent-plugin-parser_cef)
4
+ [![Test](https://github.com/lunardial/fluent-plugin-parser_cef/actions/workflows/test.yml/badge.svg)](https://github.com/lunardial/fluent-plugin-parser_cef/actions/workflows/test.yml)
5
+ [![downloads](https://img.shields.io/gem/dt/fluent-plugin-parser_cef.svg)](https://rubygems.org/gems/fluent-plugin-parser_cef)
6
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
7
+
8
+ A [Fluentd](https://www.fluentd.org/) parser plugin for ArcSight
9
+ **Common Event Format (CEF)** messages sent over syslog. It splits the syslog
10
+ header, the CEF header and the CEF extension (`key=value` pairs) into record
11
+ fields.
12
+
13
+ ## Requirements
14
+
15
+ | fluent-plugin-parser_cef | fluentd | Ruby |
16
+ |--------------------------|------------|--------|
17
+ | >= 1.0.1 | >= v0.14.0 | >= 2.7 |
18
+ | 1.0.0 | >= v0.14.0 | 2.x |
19
+ | < 1.0.0 | v0.12.x | - |
20
+
21
+ 1.0.0 could only be installed on Ruby 2.x. Use 1.0.1 or later with
22
+ fluent-package v5 / v6 and other Ruby 3.x or later environments.
23
+
24
+ The 1.x series is tested against Fluentd v1 on Ruby 2.7 and 3.1 - 4.0.
25
+
26
+ ## Installation
27
+
28
+ ```bash
29
+ # fluent-package (formerly td-agent)
30
+ sudo fluent-gem install fluent-plugin-parser_cef
31
+
32
+ # plain Ruby / Bundler
33
+ gem install fluent-plugin-parser_cef
34
+ ```
35
+
36
+ Official Fluentd container images and Helm charts do not include this plugin.
37
+ If you see `Unknown parser plugin 'cef'`, install the gem in your image, for
38
+ example:
39
+
40
+ ```dockerfile
41
+ FROM fluent/fluentd:v1.17-debian-1
42
+ USER root
43
+ RUN fluent-gem install fluent-plugin-parser_cef
44
+ USER fluent
45
+ ```
46
+
47
+ With the [fluent/helm-charts](https://github.com/fluent/helm-charts) `fluentd`
48
+ chart, add it to the `plugins` value instead.
49
+
50
+ ## Usage
51
+
52
+ Use it in a `<parse>` section:
53
+
54
+ ```xml
55
+ <source>
56
+ @type tail
57
+ tag security.cef
58
+ path /var/log/cef.log
59
+ pos_file /var/log/fluentd/cef.log.pos
60
+ <parse>
61
+ @type cef
62
+ # log_utc_offset +09:00
63
+ # parse_strict_mode true
64
+ # output_raw_field false
65
+ </parse>
66
+ </source>
67
+ ```
68
+
69
+ Parameters such as `parse_strict_mode` must be written inside `<parse>`;
70
+ outside it they are ignored.
71
+
72
+ ### Example
73
+
74
+ Input line:
75
+
76
+ ```text
77
+ Dec 5 10:00:00 fw01 CEF:0|Example|Firewall|1.0|100|Connection blocked|5|src=192.0.2.10 dst=198.51.100.5 dpt=443 act=blocked msg=Blocked by policy web-deny
78
+ ```
79
+
80
+ Record (event time: `2026-12-05 10:00:00 +09:00` with `log_utc_offset +09:00`):
81
+
82
+ ```json
83
+ {
84
+ "syslog_timestamp": "Dec 5 10:00:00",
85
+ "syslog_hostname": "fw01",
86
+ "syslog_tag": "",
87
+ "cef_version": "0",
88
+ "cef_device_vendor": "Example",
89
+ "cef_device_product": "Firewall",
90
+ "cef_device_version": "1.0",
91
+ "cef_device_event_class_id": "100",
92
+ "cef_name": "Connection blocked",
93
+ "cef_severity": "5",
94
+ "src": "192.0.2.10",
95
+ "dst": "198.51.100.5",
96
+ "dpt": "443",
97
+ "act": "blocked",
98
+ "msg": "Blocked by policy web-deny"
99
+ }
100
+ ```
101
+
102
+ The syslog timestamp becomes the event time. Lines that do not match the
103
+ expected format are emitted as `{"raw": "<the original line>"}`.
104
+
105
+ ### Supported input format
106
+
107
+ Each line must start with a traditional (RFC 3164 style) syslog header —
108
+ timestamp, hostname and an optional tag — followed by the CEF message:
109
+
110
+ ```text
111
+ <timestamp> <hostname> [<tag>] CEF:0|Vendor|Product|Version|SignatureID|Name|Severity|Extension
112
+ ```
113
+
114
+ A leading `<PRI>` value, RFC 5424 headers and CEF messages without a syslog
115
+ header are not supported yet and are emitted as `raw`.
116
+
117
+ ## Parameters
118
+
119
+ | Name | Type | Default | Description |
120
+ |---------------------------|---------|-----------------------------------------------|-------------|
121
+ | `log_format` | string | `syslog` | Input format. Only `syslog` is supported. |
122
+ | `log_utc_offset` | string | `nil` | UTC offset (e.g. `+09:00`) used when the timestamp has no time zone. When unset or invalid, the system time zone is used. Ignored for timestamps that include a time zone. |
123
+ | `syslog_timestamp_format` | string | `\w{3}\s+\d{1,2}\s\d{2}:\d{2}:\d{2}` | Regular expression that matches the syslog timestamp. The default matches `Dec 5 10:00:00`. |
124
+ | `cef_version` | integer | `0` | CEF version in the `CEF:<version>` header. |
125
+ | `parse_strict_mode` | bool | `true` | Only treat known CEF keys as keys. See below. |
126
+ | `cef_keyfilename` | string | `config/cef_version_0_keys.yaml` | YAML file with the known CEF keys used in strict mode. Relative paths are resolved from the plugin directory. |
127
+ | `output_raw_field` | bool | `false` | Also add the original line as `raw` when parsing succeeds. |
128
+
129
+ ### Strict mode
130
+
131
+ CEF extension values may contain spaces and `=`. With `parse_strict_mode true`,
132
+ only the keys listed in `cef_keyfilename` start a new field, so for
133
+
134
+ ```text
135
+ cs1=test cs2=foo hoge=fuga cs3=bar
136
+ ```
137
+
138
+ `cs2` becomes `foo hoge=fuga`. With `parse_strict_mode false`, every `key=`
139
+ starts a new field, so `cs2` becomes `foo` and an extra `hoge` field with
140
+ `fuga` is added.
141
+
142
+ In strict mode, vendor-specific keys that are not in the key file are appended
143
+ to the previous value. Use your own key file, or `parse_strict_mode false`, if
144
+ your devices send such keys.
145
+
146
+ ## Development
147
+
148
+ The easiest way is the included [Dev Container](.devcontainer/devcontainer.json)
149
+ (VS Code / GitHub Codespaces), which sets up Ruby and runs `bundle install`:
150
+
151
+ ```bash
152
+ bundle exec rake spec
153
+
154
+ # with a local coverage report (coverage/index.html)
155
+ COVERAGE=1 bundle exec rake spec
156
+ ```
157
+
158
+ Without the Dev Container, any Docker host works:
159
+
160
+ ```bash
161
+ docker run --rm -v "$PWD":/app -w /app ruby:3.4 \
162
+ bash -c "bundle install && bundle exec rake spec"
163
+ ```
164
+
165
+ Bug reports and pull requests are welcome on
166
+ [GitHub](https://github.com/lunardial/fluent-plugin-parser_cef).
167
+
168
+ ## License
169
+
170
+ The gem is available as open source under the terms of the [MIT License](LICENSE).
data/Rakefile CHANGED
@@ -1,2 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
2
6
  task :default => :spec
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -6,24 +6,28 @@ Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-parser_cef"
7
7
  spec.version = File.read("VERSION").strip
8
8
  spec.authors = ["Tomoyuki Sugimura"]
9
- spec.email = ["tomoyuki.sugimura@gmail.com"]
10
- spec.description = %q{common event format(CEF) parser plugin for fluentd}
11
- spec.summary = %q{common event format(CEF) parser plugin, currently only 'syslog' format is permitted}
9
+ spec.email = ["12116691+lunardial@users.noreply.github.com"]
10
+ spec.summary = %q{Fluentd parser plugin for Common Event Format (CEF) messages}
11
+ spec.description = %q{A Fluentd parser plugin that parses syslog messages carrying ArcSight Common Event Format (CEF) into records, splitting the CEF header and extension fields.}
12
12
  spec.homepage = "https://github.com/lunardial/fluent-plugin-parser_cef"
13
13
  spec.license = "MIT"
14
+ spec.metadata = {
15
+ "source_code_uri" => "https://github.com/lunardial/fluent-plugin-parser_cef",
16
+ "bug_tracker_uri" => "https://github.com/lunardial/fluent-plugin-parser_cef/issues",
17
+ "rubygems_mfa_required" => "true",
18
+ }
14
19
 
15
20
  spec.files = `git ls-files`.split($/)
16
21
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
23
  spec.require_paths = ["lib"]
19
24
 
20
- spec.required_ruby_version = "~> 2.1"
25
+ spec.required_ruby_version = ">= 2.7"
21
26
 
22
27
  spec.add_runtime_dependency "fluentd", ">= 0.14.0", "< 2"
23
28
 
24
- spec.add_development_dependency "bundler", "~> 1.3"
25
- spec.add_development_dependency "rake"
29
+ spec.add_development_dependency "bundler"
30
+ spec.add_development_dependency "rake", ">= 13.0"
26
31
  spec.add_development_dependency "rspec", "~> 3.0"
27
- spec.add_development_dependency "rspec-core"
28
- spec.add_development_dependency "test-unit"
32
+ spec.add_development_dependency "test-unit", "~> 3.0"
29
33
  end
@@ -2,6 +2,9 @@
2
2
 
3
3
  require 'fluent/plugin/parser_cef'
4
4
  require 'fluent/test'
5
+ # fluent/test loads test-unit, whose at_exit autorunner would otherwise try
6
+ # to parse RSpec's command-line options (e.g. --pattern) and fail the run.
7
+ Test::Unit::AutoRunner.need_auto_run = false if defined?(Test::Unit::AutoRunner)
5
8
  require 'fluent/test/driver/parser'
6
9
 
7
10
  RSpec.describe Fluent::Plugin::CommonEventFormatParser do
@@ -1,31 +1,20 @@
1
1
  <source>
2
- @type tail
3
- tag develop.cef
2
+ @type tail
3
+ tag develop.cef
4
4
  path /tmp/fluentd/test.log
5
5
  pos_file /tmp/fluentd/test.pos
6
-
7
- format cef
8
- #log_format syslog
9
- #syslog_timestamp_format '\w{3}\s+\d{1,2}\s\d{2}:\d{2}:\d{2}'
10
- #cef_version 0
11
- #parse_strict_mode true
12
- #cef_keyfilename 'config/cef_version_0_keys.yaml'
13
- #output_raw_field false
6
+ <parse>
7
+ @type cef
8
+ #log_format syslog
9
+ #log_utc_offset +09:00
10
+ #syslog_timestamp_format '\w{3}\s+\d{1,2}\s\d{2}:\d{2}:\d{2}'
11
+ #cef_version 0
12
+ #parse_strict_mode true
13
+ #cef_keyfilename 'config/cef_version_0_keys.yaml'
14
+ #output_raw_field false
15
+ </parse>
14
16
  </source>
15
17
 
16
- <match **>
17
- @type stdout
18
+ <match develop.cef>
19
+ @type stdout
18
20
  </match>
19
-
20
- #<match cevelop.cef>
21
- # @type elasticsearch
22
- # host elasticsearch
23
- # port 9200
24
- # logstash_format true
25
- # logstash_dateformat %Y.%m.%d
26
- # utc_index true
27
- # include_tag_key false
28
- # logstash_prefix develop
29
- # type_name develop
30
- # flush_interval 1s
31
- #</match>
data/spec/spec_helper.rb CHANGED
@@ -1,116 +1,24 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause
4
- # this file to always be loaded, without a need to explicitly require it in any
5
- # files.
6
- #
7
- # Given that it is always loaded, you are encouraged to keep this file as
8
- # light-weight as possible. Requiring heavyweight dependencies from this file
9
- # will add to the boot time of your test suite on EVERY test run, even for an
10
- # individual file that may not need all of that loaded. Instead, consider making
11
- # a separate helper file that requires the additional dependencies and performs
12
- # the additional setup, and require it from the spec files that actually need
13
- # it.
14
- #
15
- # The `.rspec` file also contains a few flags that are not defaults but that
16
- # users commonly want.
17
- #
18
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
-
20
- $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
21
- $LOAD_PATH.unshift(File.expand_path('../spec', __FILE__))
22
-
23
- require 'simplecov'
24
- require 'coveralls'
25
- Coveralls.wear!
26
-
27
- SimpleCov.start do
28
- add_filter "/spec/"
1
+ # Loaded for every spec via `--require spec_helper` in .rspec.
2
+ # Keep this file lightweight; plugin-specific setup lives in the spec files.
3
+
4
+ # Local coverage report (no external service): COVERAGE=1 bundle exec rake spec
5
+ # The HTML report is written to coverage/index.html.
6
+ if ENV["COVERAGE"]
7
+ require "simplecov"
8
+ SimpleCov.start do
9
+ # SimpleCov 1.x renamed add_filter to skip; older releases (still
10
+ # resolved on Ruby < 3.3) only have add_filter.
11
+ respond_to?(:skip) ? skip("/spec/") : add_filter("/spec/")
12
+ enable_coverage :branch
13
+ end
29
14
  end
30
15
 
31
16
  RSpec.configure do |config|
32
- # rspec-expectations config goes here. You can use an alternate
33
- # assertion/expectation library such as wrong or the stdlib/minitest
34
- # assertions if you prefer.
35
17
  config.expect_with :rspec do |expectations|
36
- # This option will default to `true` in RSpec 4. It makes the `description`
37
- # and `failure_message` of custom matchers include text for helper methods
38
- # defined using `chain`, e.g.:
39
- # be_bigger_than(2).and_smaller_than(4).description
40
- # # => "be bigger than 2 and smaller than 4"
41
- # ...rather than:
42
- # # => "be bigger than 2"
43
18
  expectations.include_chain_clauses_in_custom_matcher_descriptions = true
44
19
  end
45
20
 
46
- # rspec-mocks config goes here. You can use an alternate test double
47
- # library (such as bogus or mocha) by changing the `mock_with` option here.
48
21
  config.mock_with :rspec do |mocks|
49
- # Prevents you from mocking or stubbing a method that does not exist on
50
- # a real object. This is generally recommended, and will default to
51
- # `true` in RSpec 4.
52
22
  mocks.verify_partial_doubles = true
53
23
  end
54
-
55
- # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
56
- # have no way to turn it off -- the option exists only for backwards
57
- # compatibility in RSpec 3). It causes shared context metadata to be
58
- # inherited by the metadata hash of host groups and examples, rather than
59
- # triggering implicit auto-inclusion in groups with matching metadata.
60
- config.shared_context_metadata_behavior = :apply_to_host_groups
61
-
62
- # The settings below are suggested to provide a good initial experience
63
- # with RSpec, but feel free to customize to your heart's content.
64
- =begin
65
- # This allows you to limit a spec run to individual examples or groups
66
- # you care about by tagging them with `:focus` metadata. When nothing
67
- # is tagged with `:focus`, all examples get run. RSpec also provides
68
- # aliases for `it`, `describe`, and `context` that include `:focus`
69
- # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
70
- config.filter_run_when_matching :focus
71
-
72
- # Allows RSpec to persist some state between runs in order to support
73
- # the `--only-failures` and `--next-failure` CLI options. We recommend
74
- # you configure your source control system to ignore this file.
75
- config.example_status_persistence_file_path = "spec/examples.txt"
76
-
77
- # Limits the available syntax to the non-monkey patched syntax that is
78
- # recommended. For more details, see:
79
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
80
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
81
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
82
- config.disable_monkey_patching!
83
-
84
- # This setting enables warnings. It's recommended, but in some cases may
85
- # be too noisy due to issues in dependencies.
86
- config.warnings = true
87
-
88
- # Many RSpec users commonly either run the entire suite or an individual
89
- # file, and it's useful to allow more verbose output when running an
90
- # individual spec file.
91
- if config.files_to_run.one?
92
- # Use the documentation formatter for detailed output,
93
- # unless a formatter has already been configured
94
- # (e.g. via a command-line flag).
95
- config.default_formatter = 'doc'
96
- end
97
-
98
- # Print the 10 slowest examples and example groups at the
99
- # end of the spec run, to help surface which specs are running
100
- # particularly slow.
101
- config.profile_examples = 10
102
-
103
- # Run specs in random order to surface order dependencies. If you find an
104
- # order dependency and want to debug it, you can fix the order by providing
105
- # the seed, which is printed after each run.
106
- # --seed 1234
107
- #config.order = :random
108
-
109
- # Seed global randomization in this process using the `--seed` CLI option.
110
- # Setting this allows you to use `--seed` to deterministically reproduce
111
- # test failures related to randomization by passing the same `--seed` value
112
- # as the one that triggered the failure.
113
- Kernel.srand config.seed
114
- =end
115
24
  end
116
-
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-parser_cef
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoyuki Sugimura
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2017-12-03 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: fluentd
@@ -34,30 +33,30 @@ dependencies:
34
33
  name: bundler
35
34
  requirement: !ruby/object:Gem::Requirement
36
35
  requirements:
37
- - - "~>"
36
+ - - ">="
38
37
  - !ruby/object:Gem::Version
39
- version: '1.3'
38
+ version: '0'
40
39
  type: :development
41
40
  prerelease: false
42
41
  version_requirements: !ruby/object:Gem::Requirement
43
42
  requirements:
44
- - - "~>"
43
+ - - ">="
45
44
  - !ruby/object:Gem::Version
46
- version: '1.3'
45
+ version: '0'
47
46
  - !ruby/object:Gem::Dependency
48
47
  name: rake
49
48
  requirement: !ruby/object:Gem::Requirement
50
49
  requirements:
51
50
  - - ">="
52
51
  - !ruby/object:Gem::Version
53
- version: '0'
52
+ version: '13.0'
54
53
  type: :development
55
54
  prerelease: false
56
55
  version_requirements: !ruby/object:Gem::Requirement
57
56
  requirements:
58
57
  - - ">="
59
58
  - !ruby/object:Gem::Version
60
- version: '0'
59
+ version: '13.0'
61
60
  - !ruby/object:Gem::Dependency
62
61
  name: rspec
63
62
  requirement: !ruby/object:Gem::Requirement
@@ -72,47 +71,36 @@ dependencies:
72
71
  - - "~>"
73
72
  - !ruby/object:Gem::Version
74
73
  version: '3.0'
75
- - !ruby/object:Gem::Dependency
76
- name: rspec-core
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
74
  - !ruby/object:Gem::Dependency
90
75
  name: test-unit
91
76
  requirement: !ruby/object:Gem::Requirement
92
77
  requirements:
93
- - - ">="
78
+ - - "~>"
94
79
  - !ruby/object:Gem::Version
95
- version: '0'
80
+ version: '3.0'
96
81
  type: :development
97
82
  prerelease: false
98
83
  version_requirements: !ruby/object:Gem::Requirement
99
84
  requirements:
100
- - - ">="
85
+ - - "~>"
101
86
  - !ruby/object:Gem::Version
102
- version: '0'
103
- description: common event format(CEF) parser plugin for fluentd
87
+ version: '3.0'
88
+ description: A Fluentd parser plugin that parses syslog messages carrying ArcSight
89
+ Common Event Format (CEF) into records, splitting the CEF header and extension fields.
104
90
  email:
105
- - tomoyuki.sugimura@gmail.com
91
+ - 12116691+lunardial@users.noreply.github.com
106
92
  executables: []
107
93
  extensions: []
108
94
  extra_rdoc_files: []
109
95
  files:
110
- - ".codeclimate.yml"
111
- - ".coveralls.yml"
96
+ - ".devcontainer/devcontainer.json"
97
+ - ".github/dependabot.yml"
98
+ - ".github/workflows/release.yml"
99
+ - ".github/workflows/test.yml"
112
100
  - ".gitignore"
113
101
  - ".rspec"
114
102
  - ".rubocop.yml"
115
- - ".travis.yml"
103
+ - CHANGELOG.md
116
104
  - Gemfile
117
105
  - LICENSE
118
106
  - README.md
@@ -127,28 +115,27 @@ files:
127
115
  homepage: https://github.com/lunardial/fluent-plugin-parser_cef
128
116
  licenses:
129
117
  - MIT
130
- metadata: {}
131
- post_install_message:
118
+ metadata:
119
+ source_code_uri: https://github.com/lunardial/fluent-plugin-parser_cef
120
+ bug_tracker_uri: https://github.com/lunardial/fluent-plugin-parser_cef/issues
121
+ rubygems_mfa_required: 'true'
132
122
  rdoc_options: []
133
123
  require_paths:
134
124
  - lib
135
125
  required_ruby_version: !ruby/object:Gem::Requirement
136
126
  requirements:
137
- - - "~>"
127
+ - - ">="
138
128
  - !ruby/object:Gem::Version
139
- version: '2.1'
129
+ version: '2.7'
140
130
  required_rubygems_version: !ruby/object:Gem::Requirement
141
131
  requirements:
142
132
  - - ">="
143
133
  - !ruby/object:Gem::Version
144
134
  version: '0'
145
135
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.6.13
148
- signing_key:
136
+ rubygems_version: 4.0.20
149
137
  specification_version: 4
150
- summary: common event format(CEF) parser plugin, currently only 'syslog' format is
151
- permitted
138
+ summary: Fluentd parser plugin for Common Event Format (CEF) messages
152
139
  test_files:
153
140
  - spec/fluent/plugin/parser_cef_spec.rb
154
141
  - spec/sample/fluentd.conf
data/.codeclimate.yml DELETED
@@ -1,29 +0,0 @@
1
- engines:
2
- duplication:
3
- enabled: true
4
- config:
5
- languages:
6
- - ruby
7
- - javascript
8
- - python
9
- - php
10
- fixme:
11
- enabled: true
12
- rubocop:
13
- enabled: true
14
- checks:
15
- Rubocop/Metrics/MethodLength:
16
- enabled: false
17
- Rubocop/Metrics/CyclomaticComplexity:
18
- enabled: false
19
- ratings:
20
- paths:
21
- - "**.inc"
22
- - "**.js"
23
- - "**.jsx"
24
- - "**.module"
25
- - "**.php"
26
- - "**.py"
27
- - "**.rb"
28
- exclude_paths:
29
- - spec/
data/.coveralls.yml DELETED
@@ -1 +0,0 @@
1
- service_name: travis-ci
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.0
4
- script: bundle exec rspec
5
- gemfile:
6
- - Gemfile