promtail: Move hard-coded config to prometheus_agent.agents.promtail.config inventory key
This commit is contained in:
parent
71c00d0cce
commit
7d0415ecf6
2 changed files with 48 additions and 46 deletions
|
|
@ -43,6 +43,49 @@ prometheus_agent:
|
|||
jobs: {}
|
||||
promtail:
|
||||
enable: False
|
||||
config:
|
||||
server:
|
||||
disable: true
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
positions:
|
||||
filename: /var/lib/promtail/positions.yaml
|
||||
# clients is generated based on prometheus_agent.scrapers
|
||||
scrape_configs:
|
||||
- job_name: system
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
__path__: /var/log/*log
|
||||
- job_name: journal
|
||||
journal:
|
||||
max_age: 12h
|
||||
labels:
|
||||
job: systemd-journal
|
||||
relabel_configs:
|
||||
- source_labels: ['__journal__systemd_unit']
|
||||
target_label: 'unit'
|
||||
- source_labels: ['__journal_priority_keyword']
|
||||
target_label: 'level'
|
||||
pipeline_stages:
|
||||
- structured_metadata:
|
||||
level:
|
||||
- job_name: nginx
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: nginx
|
||||
__path__: /var/log/nginx/access-promtail.log
|
||||
- job_name: postfix-bounces
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: postfix-bounces
|
||||
__path__: /var/log/mailman3/bounce.log
|
||||
snmp:
|
||||
enable: False
|
||||
mib_path: /usr/share/snmp/mibs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue