forked from lux4rd0/mqtt-logger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yaml
35 lines (35 loc) · 889 Bytes
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
server:
disable: false
http_listen_port: 0
grpc_listen_port: 0
log_level: error
positions:
filename: /opt/mqtt_promtail/positions.yaml
clients:
- url: ${MQTT_LOGGER_LOKI_CLIENT_URL}
tenant_id: ${MQTT_LOGGER_LOKI_TENANT_ID}
scrape_configs:
- job_name: mqtt_logger
pipeline_stages:
- json:
expressions:
mqtt_tst: tst
mqtt_topic: topic
mqtt_payload: payload
- regex:
expression: '(?P<mqtt_node>[^\/]*)'
source: mqtt_topic
- labels:
mqtt_topic: null
mqtt_node: null
- timestamp:
source: mqtt_tst
format: '2006-01-02T15:04:05.000000-0700'
- output:
source: mqtt_payload
static_configs:
- targets:
- localhost
labels:
job: mqtt_logger
host_hostname: ${MQTT_LOGGER_HOST_HOSTNAME}