promtail: Add level metadata field for systemd-journal

This commit is contained in:
Julian Rother 2024-11-19 04:06:33 +01:00
parent c236bb61a4
commit 71c00d0cce
No known key found for this signature in database
GPG key ID: 8F9B6AE9BAAE4899

View file

@ -28,6 +28,11 @@ scrape_configs:
relabel_configs: relabel_configs:
- source_labels: ['__journal__systemd_unit'] - source_labels: ['__journal__systemd_unit']
target_label: 'unit' target_label: 'unit'
- source_labels: ['__journal_priority_keyword']
target_label: 'level'
pipeline_stages:
- structured_metadata:
level:
- job_name: nginx - job_name: nginx
static_configs: static_configs:
- targets: - targets: