Remove parsing sf-notifier logs file
Docker is responsible for sf-notifier logs
Change-Id: I80ba0e1d0d96c2ffb5980238316390145052c5bc
Related-bug: PROD-27026 (PROD:27026)
diff --git a/metadata/service/sf_notifier/container.yml b/metadata/service/sf_notifier/container.yml
index 73223e3..724704c 100644
--- a/metadata/service/sf_notifier/container.yml
+++ b/metadata/service/sf_notifier/container.yml
@@ -4,7 +4,5 @@
prometheus:
sf_notifier:
enabled: true
- dir:
- logs: /srv/volumes/local/sf_notifier/logs
uwsgi:
bind_port: 5000
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index bbbbf18..e4d3cb4 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -7,5 +7,3 @@
enabled: true
telegraf:
enabled: true
- fluentd:
- enabled: true
diff --git a/prometheus/meta/fluentd.yml b/prometheus/meta/fluentd.yml
deleted file mode 100644
index 3720b65..0000000
--- a/prometheus/meta/fluentd.yml
+++ /dev/null
@@ -1,46 +0,0 @@
-{%- if pillar.get('fluentd', {}).get('agent', {}).get('enabled', False) %}
-{% from "prometheus/map.jinja" import sf_notifier with context %}
-{%- if sf_notifier.get('enabled', False) %}
-agent:
- config:
- label:
- sfnotifier:
- input:
- tail_sfnotifier:
- type: tail
- tag: sfnotifier.log
- path: {{ sf_notifier.dir.logs }}/sf-notifier.log
- pos_file: {{ pillar.fluentd.agent.dir.positiondb }}/sfnotifier.pos
- parser:
- type: multi_format
- patterns:
- # sfnotifier log format: https://regex101.com/r/JsYcJU/1
- - type: regexp
- time_key: Timestamp
- time_format: '%F %H:%M:%S'
- keep_time_key: false
- format: '/^\[(?<Timestamp>.*)\] (?<Severity>.*?) in (?<Module>.*?)\: (?<Payload>.+)$/'
- # http log format: https://regex101.com/r/8i6u1v/2
- - type: regexp
- time_key: Timestamp
- time_format: '%d/%b/%Y %H:%M:%S'
- keep_time_key: false
- format: '/^(?<http_client_ip_address>[^ ]*) - - \[(?<Timestamp>.*)\] "(?<http_method>\S+) (?<http_url>[^ ]*) \S*" (?<http_status>[^ ]*) -$/'
- filter:
- sfnotifier_record:
- type: record_transformer
- tag: sfnotifier.log
- enable_ruby: true
- remove_keys: priority
- record:
- - name: service
- value: sfnotifier
- - name: severity_label
- value: '${ {"TRACE"=>8,"DEBUG"=>7,"INFO"=>6,"NOTICE"=>5,"WARNING"=>4,"ERROR"=>3,"CRITICAL"=>2,"ALERT"=>1,"EMERGENCY"=>0}.fetch(record["Severity"].to_i, 6) }'
- match:
- push_to_default:
- tag: sfnotifier.**
- type: relabel
- label: default_output
-{%- endif %}
-{%- endif %}
diff --git a/prometheus/sf_notifier.sls b/prometheus/sf_notifier.sls
deleted file mode 100644
index e2f8d36..0000000
--- a/prometheus/sf_notifier.sls
+++ /dev/null
@@ -1,12 +0,0 @@
-{% from "prometheus/map.jinja" import sf_notifier with context %}
-{%- if sf_notifier.enabled %}
-
-{%- if pillar.docker is defined and pillar.docker.host is defined %}
-
-{{sf_notifier.dir.logs}}:
- file.directory:
- - makedirs: True
- - mode: 755
-
-{%- endif %}
-{%- endif %}
\ No newline at end of file