Skip to content

Commit

Permalink
Merge pull request #79 from observIQ/preserve_to
Browse files Browse the repository at this point in the history
Convert plugins to use preserve_to
  • Loading branch information
camdencheek authored Nov 10, 2020
2 parents 4246bf1 + 8055755 commit 075f5c6
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions plugins/aerospike.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pipeline:
layout: '%b %d %Y %H:%M:%S %Z'
severity:
parse_from: aerospike_severity
preserve: true
preserve_to: aerospike_severity
mapping:
info: detail
output: {{.output}}
Expand All @@ -93,7 +93,7 @@ pipeline:
layout: '%m-%d %H:%M:%S'
severity:
parse_from: aerospike_severity
preserve: true
preserve_to: aerospike_severity
mapping:
info: detail
output: {{.output}}
Expand Down
2 changes: 1 addition & 1 deletion plugins/amazon_eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pipeline:
regex: '^(?P<pod_name>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P<namespace>[^_]+)_(?P<container_name>.+)-(?P<container_id>[a-z0-9]{64})\.log$'
severity:
parse_from: stream
preserve: true
preserve_to: stream
mapping:
error: stderr
info: stdout
Expand Down
6 changes: 3 additions & 3 deletions plugins/apache_http.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pipeline:
severity:
parse_from: code
preset: none
preserve: true
preserve_to: code
mapping:
info: 2xx
notice: 3xx
Expand All @@ -85,8 +85,8 @@ pipeline:
- id: access_agent_parser
type: regex_parser
regex: '^(?P<client>[^/]*)/(?P<client_version>[^ ]*) (\((?P<system>[^;]*);([^\)]*)\))?(.*)?'
parse_from: $record.agent
preserve: true
parse_from: agent
preserve_to: agent
output: {{ .output }}
#{{ end }}

Expand Down
2 changes: 1 addition & 1 deletion plugins/azure_aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pipeline:
regex: '^(?P<pod_name>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P<namespace>[^_]+)_(?P<container_name>.+)-(?P<container_id>[a-z0-9]{64})\.log$'
severity:
parse_from: stream
preserve: true
preserve_to: stream
mapping:
error: stderr
info: stdout
Expand Down
10 changes: 5 additions & 5 deletions plugins/couchbase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%L%j'
severity:
parse_from: couchbase_severity
preserve: true
preserve_to: couchbase_severity
output: {{.output}}
{{ end }}

Expand All @@ -168,7 +168,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%L%j'
severity:
parse_from: couchbase_severity
preserve: true
preserve_to: couchbase_severity
mapping:
warning: warn
output: {{.output}}
Expand All @@ -195,7 +195,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%L%j'
severity:
parse_from: couchbase_severity
preserve: true
preserve_to: couchbase_severity
mapping:
warning: warn
output: {{.output}}
Expand Down Expand Up @@ -262,7 +262,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%L%j'
severity:
parse_from: couchbase_severity
preserve: true
preserve_to: couchbase_severity
output: {{.output}}
{{ end }}

Expand All @@ -285,6 +285,6 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%L%j'
severity:
parse_from: couchbase_severity
preserve: true
preserve_to: couchbase_severity
output: {{.output}}
{{ end }}
2 changes: 1 addition & 1 deletion plugins/couchdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%sZ'
severity:
parse_from: couchdb_severity
preserve: true
preserve_to: couchdb_severity
mapping:
warning: warn
error: err
Expand Down
4 changes: 2 additions & 2 deletions plugins/docker_swarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pipeline:
regex: '^time="(?P<timestamp>[^"]*)" level=(?P<dockerd_severity>[^ ]*) msg=(?P<message>.*)'
severity:
parse_from: dockerd_severity
preserve: true
preserve_to: dockerd_severity
mapping:
warning: warn
timestamp:
Expand All @@ -80,7 +80,7 @@ pipeline:
regex: '^time="(?P<timestamp>[^"]*)" level=(?P<dockerd_severity>[^ ]*) msg=(?P<message>.*)'
severity:
parse_from: dockerd_severity
preserve: true
preserve_to: dockerd_severity
mapping:
warning: warn
timestamp:
Expand Down
4 changes: 2 additions & 2 deletions plugins/elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S'
severity:
parse_from: elasticsearch_severity
preserve: true
preserve_to: elasticsearch_severity
mapping:
warning: warn
output: {{.output}}
Expand All @@ -106,7 +106,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S'
severity:
parse_from: elasticsearch_severity
preserve: true
preserve_to: elasticsearch_severity
mapping:
warning: warn
output: {{.output}}
Expand Down
6 changes: 3 additions & 3 deletions plugins/gitlab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
severity:
parse_from: severity
preserve: true
preserve_to: severity
mapping:
emergency: emerg
error: err
Expand All @@ -176,7 +176,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S.%sZ'
severity:
parse_from: severity
preserve: true
preserve_to: severity
mapping:
emergency: emerg
error: err
Expand All @@ -203,7 +203,7 @@ pipeline:
layout: '%Y-%m-%dT%H:%M:%S%j'
severity:
parse_from: level
preserve: true
preserve_to: level
mapping:
error: err
warning: warn
Expand Down
12 changes: 6 additions & 6 deletions plugins/hadoop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hadoop_severity
preserve: true
preserve_to: hadoop_severity
mapping:
warning: warn
critical: fatal
Expand All @@ -136,7 +136,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hadoop_severity
preserve: true
preserve_to: hadoop_severity
mapping:
warning: warn
critical: fatal
Expand Down Expand Up @@ -164,7 +164,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hadoop_severity
preserve: true
preserve_to: hadoop_severity
mapping:
warning: warn
critical: fatal
Expand All @@ -190,7 +190,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hadoop_severity
preserve: true
preserve_to: hadoop_severity
mapping:
warning: warn
critical: fatal
Expand Down Expand Up @@ -218,7 +218,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hadoop_severity
preserve: true
preserve_to: hadoop_severity
mapping:
warning: warn
critical: fatal
Expand All @@ -244,7 +244,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hadoop_severity
preserve: true
preserve_to: hadoop_severity
mapping:
warning: warn
critical: fatal
Expand Down
6 changes: 3 additions & 3 deletions plugins/hbase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hbase_severity
preserve: true
preserve_to: hbase_severity
mapping:
warning: warn
emergency: fatal
Expand Down Expand Up @@ -111,7 +111,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hbase_severity
preserve: true
preserve_to: hbase_severity
mapping:
warning: warn
emergency: fatal
Expand Down Expand Up @@ -139,7 +139,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: hbase_severity
preserve: true
preserve_to: hbase_severity
mapping:
warning: warn
emergency: fatal
Expand Down
2 changes: 1 addition & 1 deletion plugins/jboss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S'
severity:
parse_from: jboss_severity
preserve: true
preserve_to: jboss_severity
mapping:
emergency: fatal
warning: warn
Expand Down
2 changes: 1 addition & 1 deletion plugins/kubernetes_cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pipeline:
regex: '^(?P<pod_name>[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*)_(?P<namespace>[^_]+)_(?P<container_name>.+)-(?P<container_id>[a-z0-9]{64})\.log$'
severity:
parse_from: stream
preserve: true
preserve_to: stream
mapping:
error: stderr
info: stdout
Expand Down
4 changes: 2 additions & 2 deletions plugins/kubernetes_events.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ pipeline:

- type: severity_parser
preset: none
parse_from: $record.reason
preserve: true
parse_from: reason
preserve_to: reason
mapping:
info:
- Created
Expand Down
2 changes: 1 addition & 1 deletion plugins/pgbouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S.%L %Z'
severity:
parse_from: pgbouncer_severity
preserve: true
preserve_to: pgbouncer_severity
mapping:
critical: fatal
info: log
Expand Down
2 changes: 1 addition & 1 deletion plugins/rabbitmq.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S.%s'
severity:
parse_from: rabbitmq_severity
preserve: true
preserve_to: rabbitmq_severity
output: {{.output}}
2 changes: 1 addition & 1 deletion plugins/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pipeline:
layout: '%d %b %H:%M:%S.%s'
severity:
parse_from: redis_severity
preserve: true
preserve_to: redis_severity
mapping:
warning: ' # '
info: ' - '
Expand Down
2 changes: 1 addition & 1 deletion plugins/sap_hana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pipeline:
layout: '%Y-%m-%d %H:%M:%S.%s'
severity:
parse_from: sap_severity
preserve: true
preserve_to: sap_severity
mapping:
debug: d
info: i
Expand Down

0 comments on commit 075f5c6

Please sign in to comment.