Delete `/etc/promtail/prometheus.yaml`.
This commit is contained in:
parent
e7e720a04a
commit
b21253be8c
|
@ -1,5 +1,5 @@
|
|||
# Deploy `systemd` config for `Alert Manager Webhook Logger`
|
||||
remote_file '/etc/systemd/system.d/webhook.conf' do
|
||||
remote_file '/etc/systemd/system/webhook.service' do
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '644'
|
||||
|
|
|
@ -1,110 +0,0 @@
|
|||
server:
|
||||
disable: true
|
||||
|
||||
positions:
|
||||
filename: /var/opt/promtail/promtail_prometheus_position.yaml
|
||||
|
||||
clients:
|
||||
- url: http://<%= @LOKIENDPOINT %>/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: prometheus
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: prometheus
|
||||
hostname: <%= @HOSTNAME %>
|
||||
__path__: /var/log/supervisor/prometheus.log
|
||||
|
||||
pipeline_stages:
|
||||
- match:
|
||||
selector: '{job="prometheus"}'
|
||||
stages:
|
||||
- drop:
|
||||
expression: "^[^l]"
|
||||
|
||||
- regex:
|
||||
expression: '^level=(?P<level>[^ ]+) ts=(?P<timestamp>[^ ]+) (?P<message>.+)$'
|
||||
|
||||
- timestamp:
|
||||
source: timestamp
|
||||
format: 2006-01-02T15:04:05.999Z
|
||||
location: Etc/UTC
|
||||
|
||||
- labels:
|
||||
level:
|
||||
|
||||
- output:
|
||||
source: message
|
||||
|
||||
- job_name: alertmanager
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: prometheus
|
||||
hostname: <%= @HOSTNAME %>
|
||||
__path__: /var/log/supervisor/alertmanager.log
|
||||
|
||||
pipeline_stages:
|
||||
- match:
|
||||
selector: '{job="prometheus"}'
|
||||
stages:
|
||||
- drop:
|
||||
expression: "^[^l]"
|
||||
|
||||
- regex:
|
||||
expression: '^level=(?P<level>[^ ]+) ts=(?P<timestamp>[^ ]+) (?P<message>.+)$'
|
||||
|
||||
- timestamp:
|
||||
source: timestamp
|
||||
format: 2006-01-02T15:04:05.999Z
|
||||
location: Etc/UTC
|
||||
|
||||
- labels:
|
||||
level:
|
||||
|
||||
- output:
|
||||
source: message
|
||||
|
||||
- job_name: alertmanager-webhook-logger
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: prometheus
|
||||
hostname: <%= @HOSTNAME %>
|
||||
__path__: /var/log/supervisor/alertmanager-webhook-logger.log
|
||||
|
||||
pipeline_stages:
|
||||
- match:
|
||||
selector: '{job="prometheus"}'
|
||||
stages:
|
||||
- drop:
|
||||
expression: "^[0-9]+"
|
||||
|
||||
- json:
|
||||
expressions:
|
||||
timestamp: timestamp
|
||||
message: description
|
||||
level: status
|
||||
|
||||
- timestamp:
|
||||
source: timestamp
|
||||
format: 2006-01-02T15:04:05.999999999Z
|
||||
location: Etc/UTC
|
||||
|
||||
- template:
|
||||
source: level
|
||||
template: '{{ regexReplaceAllLiteral "firing" .Value "error" }}'
|
||||
|
||||
- template:
|
||||
source: level
|
||||
template: '{{ regexReplaceAllLiteral "resolved" .Value "notice" }}'
|
||||
|
||||
- labels:
|
||||
level:
|
||||
|
||||
- output:
|
||||
source: message
|
Loading…
Reference in New Issue