Prometheus Configuration Acquisition Target

Keywords: PHP DNS

Prometheus Configuration Acquisition Target

1. Scraping periodically at http/s (scrape/pull) according to the configuration task (job)
2. The metric on the target. Target
3. It can be specified statically or automatically. Prometheus saves scrape metric s on local or remote storage.

Define the acquisition target using scrape_configs
Configure a series of targets and how to grab their parameters. In general, each scrape_config corresponds to a single Job.
Targets can be statically configured in scrape_config or dynamically discovered using a service discovery mechanism.

# Task name, which automatically acts as a label for captured metrics
job_name: <job_name>
 
# fetch cycle
[ scrape_interval: <duration> | default = <global_config.scrape_interval> ]
# Overtime of each grab [ scrape_timeout: <duration> | default = <global_config.scrape_timeout> ]
# Grasping Indicators from Objectives URL Route [ metrics_path: <path> | default = /metrics ]
# Whether to keep the original label uncovered when adding label to find that the index already has the same name label [ honor_labels: <boolean> | default = false ]
# Grab protocol [ scheme: <scheme> | default = http ]
# HTTP Request parameters params: [ <string>: [<string>, ...] ] # Authentication information basic_auth: [ username: <string> ] [ password: <secret> ] [ password_file: <string> ]
# Authorization Request Header Value [ bearer_token: <secret> ]
# Read from a file Authorization Request header [ bearer_token_file: /path/to/bearer/token/file ] # TLS To configure tls_config: [ <tls_config> ] # Agent configuration [ proxy_url: <string> ] # DNS Service Discovery Configuration dns_sd_configs: [ - <dns_sd_config> ... ]
# File Service Discovery Configuration file_sd_configs: [ - <file_sd_config> ... ]
# K8S Service Discovery Configuration kubernetes_sd_configs: [ - <kubernetes_sd_config> ... ] # this Job Target list for static configuration static_configs: [ - <static_config> ... ] # Target Relabeling Configuration relabel_configs: [ - <relabel_config> ... ]
# Target Re-labeling Configuration metric_relabel_configs: [ - <relabel_config> ... ] # The maximum number of samples allowed for each grab, if the number of samples still exceeds the limit after the index is re-labeled, the whole grab is considered to fail. # 0 Express no limitation [ sample_limit: <int> | default = 0

Posted by mwaw on Fri, 11 Oct 2019 14:21:54 -0700