vm-hosts: Scrape libvirt logs with Promtail
Collecting logs from VM serial consoles and QEMU monitor.
This commit is contained in:
@@ -264,3 +264,29 @@ vm_autostart:
|
||||
- delay 10s
|
||||
- pxe0
|
||||
- unifi3
|
||||
|
||||
promtail_dac_read_search: true
|
||||
promtail_scrape_configs:
|
||||
- '{{ promtail_default_scrape.journal }}'
|
||||
- job_name: vm-console
|
||||
static_configs:
|
||||
- labels:
|
||||
__path__: /var/log/libvirt/console/*.log
|
||||
job: vm-console
|
||||
pipeline_stages:
|
||||
- regex:
|
||||
source: __path__
|
||||
expression: '/var/log/libvirt/console/(?P<domain>.*)\.log$'
|
||||
- labels:
|
||||
domain:
|
||||
- job_name: qemu
|
||||
static_configs:
|
||||
- labels:
|
||||
__path__: /var/log/libvirt/qemu/*.log
|
||||
job: qemu
|
||||
pipeline_stages:
|
||||
- regex:
|
||||
source: __path__
|
||||
expression: '.*/(?P<domain>.*)\.log$'
|
||||
- labels:
|
||||
domain:
|
||||
|
||||
Reference in New Issue
Block a user