promtail: Move scrape_configs into prometheus_agent.agents.promtail.scrape_jobs dict
This commit is contained in:
parent
7d0415ecf6
commit
ba32c8ee83
2 changed files with 31 additions and 13 deletions
|
|
@ -51,15 +51,20 @@ prometheus_agent:
|
|||
positions:
|
||||
filename: /var/lib/promtail/positions.yaml
|
||||
# clients is generated based on prometheus_agent.scrapers
|
||||
scrape_configs:
|
||||
- job_name: system
|
||||
# scrape_configs is generated based on prometheus_agent.agents.promtail.scrape_jobs
|
||||
# "scrape_jobs" items have the same format as the "scrape_jobs" promtail
|
||||
# config key. However, using a dictionary simplifies extending or changing
|
||||
# the default scrape configs. Items with an empty value are ignored.
|
||||
# The "job_name" field defaults to the item key.
|
||||
scrape_jobs:
|
||||
system:
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
__path__: /var/log/*log
|
||||
- job_name: journal
|
||||
journal:
|
||||
journal:
|
||||
max_age: 12h
|
||||
labels:
|
||||
|
|
@ -72,14 +77,14 @@ prometheus_agent:
|
|||
pipeline_stages:
|
||||
- structured_metadata:
|
||||
level:
|
||||
- job_name: nginx
|
||||
nginx:
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: nginx
|
||||
__path__: /var/log/nginx/access-promtail.log
|
||||
- job_name: postfix-bounces
|
||||
postfix-bounces:
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue