fluent-plugin-lm-logs-gcp 1.0.2 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83368f705d0f9f3655f512d02196ccb63a9c4035afd114e55751a304eacc1f4d
4
- data.tar.gz: 8e5184a94b67354aeeebb8c37294296f7e138c41a74255511555a6e68e362571
3
+ metadata.gz: 8fa80af2c5d4c94e6997fd770c42c45160b7ea2348ef39d30d7cbff31d774eb4
4
+ data.tar.gz: bdecae119e5d62ec47aa95486757e55bab5a5fac4f2d11abff003488c717d8cb
5
5
  SHA512:
6
- metadata.gz: 375ab329bf7d30d66f26c362c7460e857e290cafdd9714bf6bf7a1ee9539a4286e3d1ddb5fd929ab43d219ead62b1c29e00828ce1cd708baec58b6426c362280
7
- data.tar.gz: 811764602d57f8e7c3c20a9e73e451e17e775a1a3adccdf79a58b747e00e4ce5bca46792a7ed1f475af363eb7838013d2ebb5e40641d25dd84da582b3f9f8363
6
+ metadata.gz: a87ab7ea7267c820609f9710b10ea1b0f812cb7e7c39aa4a75ee4e4b8b0a75bf36a58745d6f9be02f699f96956328bae19fa9e70e873a5ffea28d44a4ea3cb36
7
+ data.tar.gz: ba57fd1f6ea7f7b64d0525a39f826c5d1f8a5ca8fb44289dede47fc292906b3fb7a5912ff51792edc3647c0245f3ab4c87849741b162eb8355fd109e7e063aee
data/README.md CHANGED
@@ -4,4 +4,6 @@ This filter plugin is provided for mapping the logs coming from GCP pubsub to '_
4
4
  * Google Cloud Functions
5
5
  * Google Cloud SQL
6
6
  * Google Audit Logs
7
+ * Google Cloud Composer
8
+ * Google Cloud Run
7
9
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "fluent-plugin-lm-logs-gcp"
8
- spec.version = '1.0.2'
8
+ spec.version = '1.0.4'
9
9
  spec.authors = ["LogicMonitor"]
10
10
  spec.email = "rubygems@logicmonitor.com"
11
11
  spec.summary = "LogicMonitor with GCP logs fluentd filter plugin"
@@ -62,12 +62,16 @@ module Fluent::Plugin
62
62
  resourceMap = {"system.gcp.resourceid" => record.dig("resource", "labels", "database_id"), "system.cloud.category" => 'GCP/CloudSQL'}
63
63
  when 'cloud_run_revision'
64
64
  resourceMap = {"system.gcp.resourcename" => record.dig("resource", "labels", "service_name"), "system.cloud.category" => 'GCP/CloudRun'}
65
+ when 'cloud_composer_environment'
66
+ resourceMap = {"system.gcp.resourcename" => "projects/" + project_id + "/locations/" + record.dig("resource", "labels", "location") + "/environments/" + record.dig("resource", "labels", "environment_name"), "system.cloud.category" => 'GCP/CloudComposer'}
65
67
  end
66
68
 
67
69
  if(record.key?("protoPayload") && record.dig('protoPayload', '@type') == "type.googleapis.com/google.cloud.audit.AuditLog")
68
- resourceMap = {"system.gcp.projectId" => project_id, "system.cloud.category" => 'GCP/LMAccount'}
70
+ resourceMap = {"system.cloud.category" => 'GCP/LMAccount'}
69
71
  end
70
72
 
73
+
74
+ resourceMap['system.gcp.projectId'] = project_id if !resourceMap.empty?
71
75
  # Creating a new record which is further sent to LM
72
76
  filteredRecord['message'] = message
73
77
  filteredRecord['_lm.resourceId'] = resourceMap
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-lm-logs-gcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - LogicMonitor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-10 00:00:00.000000000 Z
11
+ date: 2022-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -65,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubygems_version: 3.2.15
68
+ rubygems_version: 3.3.26
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: LogicMonitor with GCP logs fluentd filter plugin