前言
本文來自Prometheus官網手冊 和 Prometheus簡介
說明
Prometheus通過命令行和配置文件進行配置,命令行配置不能修改的系統參數(例如存儲位置,要保留在磁盤和內存中的數據量等),但配置文件定義了與抓取作業及其實例相關的所有內容,以及哪些規則文件的加載。
Prometheus可以在運行時重新加載其配置。 如果新配置格式不正確,則更改將不會應用。 通過向Prometheus進程發送SIGHUP或向/-/reload端點發送HTTP POST請求(啟用--web.enable-lifecycle)來觸發配置重載,這還將重新加載所有已配置的規則文件。
一、配置文件
使用--config.file參數指定要加載的配置文件。該文件以YAML格式編寫,由下面描述的方案定義。 括號表示參數是可選的。 對於非列表參數,該值設置為指定的默認值。
通用占位符定義如下:
<boolean>:一個可以取值為true或false的布爾值 <duration>:與正則表達式匹配的持續時間[0-9] +(ms | [smhdwy]) <labelname>:與正則表達式匹配的字符串[a-zA-Z _] [a-zA-Z0-9 _] * <labelvalue>:一串unicode字符 <filename>:當前工作目錄中的有效路徑 <host>:由主機名或IP后跟可選端口號組成的有效字符串 <path>:有效的URL路徑 <scheme>:一個可以取值http或https的字符串 <string>:常規字符串 <secret>:一個秘密的常規字符串,例如密碼 <tmpl_string>:在使用前進行模板擴展的字符串
其他占位符是單獨指定的。可以在此處找到有效的示例文件
全局配置指定在所有其他配置上下文中有效的參數。 它們還可用作其他配置節的默認值。
global: # 默認情況下抓取目標的頻率. [ scrape_interval: <duration> | default = 1m ] # 抓取超時時間. [ scrape_timeout: <duration> | default = 10s ] # 評估規則的頻率. [ evaluation_interval: <duration> | default = 1m ] # 與外部系統通信時添加到任何時間序列或警報的標簽(聯合,遠程存儲,Alertma# nager).即添加到拉取的數據並存到數據庫中 external_labels: [ <labelname>: <labelvalue> ... ] # 規則文件指定了一個globs列表. # 從所有匹配的文件中讀取規則和警報. rule_files: [ - <filepath_glob> ... ] # 抓取配置列表. scrape_configs: [ - <scrape_config> ... ] # 警報指定與Alertmanager相關的設置. alerting: alert_relabel_configs: [ - <relabel_config> ... ] alertmanagers: [ - <alertmanager_config> ... ] # 與遠程寫入功能相關的設置. remote_write: [ - <remote_write> ... ] # 與遠程讀取功能相關的設置. remote_read: [ - <remote_read> ... ]
1.1 <scrape_config>
<scrape_config>指定一組描述如何抓取的目標和參數。 一般一個scrape指定單個作業。目標可以通過<static_configs>參數靜態配置,也可以使用其中一種支持的服務發現機制動態發現。此外,<relabel_configs>允許在抓取之前對任何目標及其標簽進行高級修改。
# 默認分配給已抓取指標的job名稱。 job_name: <job_name> # 從job中抓取目標的頻率. [ scrape_interval: <duration> | default = <global_config.scrape_interval> ] # 抓取此job時,每次抓取超時時間. [ scrape_timeout: <duration> | default = <global_config.scrape_timeout> ] # 從目標獲取指標的HTTP資源路徑. [ metrics_path: <path> | default = /metrics ] # honor_labels控制Prometheus如何處理已經存在於已抓取數據中的標簽與Prometheus將附加服務器端的標簽之間的沖突("job"和"instance"標簽,手動配置的目標標簽以及服務發現實現生成的標簽)。 # 如果honor_labels設置為"true",則通過保留已抓取數據的標簽值並忽略沖突的服務器端標簽來解決標簽沖突。 # 如果honor_labels設置為"false",則通過將已抓取數據中的沖突標簽重命名為"exported_ <original-label>"(例如"exported_instance","exported_job")然后附加服務器端標簽來解決標簽沖突。 這對於聯合等用例很有用,其中應保留目標中指定的所有標簽。 # 請注意,任何全局配置的"external_labels"都不受此設置的影響。 在與外部系統通信時,它們始終僅在時間序列尚未具有給定標簽時應用,否則將被忽略。 [ honor_labels: <boolean> | default = false ] # 配置用於請求的協議方案. [ scheme: <scheme> | default = http ] # 可選的HTTP URL參數. params: [ <string>: [<string>, ...] ] # 使用配置的用戶名和密碼在每個scrape請求上設置`Authorization`標頭。 password和password_file是互斥的。 basic_auth: [ username: <string> ] [ password: <secret> ] [ password_file: <string> ] # 使用配置的承載令牌在每個scrape請求上設置`Authorization`標頭。 它`bearer_token_file`和是互斥的。 [ bearer_token: <secret> ] # 使用配置的承載令牌在每個scrape請求上設置`Authorization`標頭。 它`bearer_token`和是互斥的。 [ bearer_token_file: /path/to/bearer/token/file ] # 配置scrape請求的TLS設置. tls_config: [ <tls_config> ] # 可選的代理URL. [ proxy_url: <string> ] # Azure服務發現配置列表. azure_sd_configs: [ - <azure_sd_config> ... ] # Consul服務發現配置列表. consul_sd_configs: [ - <consul_sd_config> ... ] # DNS服務發現配置列表。 dns_sd_configs: [ - <dns_sd_config> ... ] # EC2服務發現配置列表。 ec2_sd_configs: [ - <ec2_sd_config> ... ] # OpenStack服務發現配置列表。 openstack_sd_configs: [ - <openstack_sd_config> ... ] # 文件服務發現配置列表。 file_sd_configs: [ - <file_sd_config> ... ] # GCE服務發現配置列表。 gce_sd_configs: [ - <gce_sd_config> ... ] # Kubernetes服務發現配置列表。 kubernetes_sd_configs: [ - <kubernetes_sd_config> ... ] # Marathon服務發現配置列表。 marathon_sd_configs: [ - <marathon_sd_config> ... ] # AirBnB的神經服務發現配置列表。 nerve_sd_configs: [ - <nerve_sd_config> ... ] # Zookeeper Serverset服務發現配置列表。 serverset_sd_configs: [ - <serverset_sd_config> ... ] # Triton服務發現配置列表。 triton_sd_configs: [ - <triton_sd_config> ... ] # 此job的標記靜態配置目標列表。 static_configs: [ - <static_config> ... ] # 目標重新標記配置列表。 relabel_configs: [ - <relabel_config> ... ] # 度量標准重新配置列表。 metric_relabel_configs: [ - <relabel_config> ... ] # 對每個將被接受的樣本數量的每次抓取限制。 # 如果在度量重新標記后存在超過此數量的樣本,則整個抓取將被視為失敗。 0表示沒有限制。 [ sample_limit: <int> | default = 0 ]
其中<job_name>在所有scrape配置中必須是唯一的。
1.2 <tls_config>
tls_config允許配置TLS連接。
# 用於驗證API服務器證書的CA證書。 [ ca_file: <filename> ] # 用於服務器的客戶端證書身份驗證的證書和密鑰文件。 [ cert_file: <filename> ] [ key_file: <filename> ] # ServerName擴展名,用於指示服務器的名稱。 # https://tools.ietf.org/html/rfc4366#section-3.1 [ server_name: <string> ] # 禁用服務器證書的驗證。 [ insecure_skip_verify: <boolean> ]
1.3 <azure_sd_config>
1.4 <consul_sd_config>
配置允許從Consul的Catalog API檢索抓取目標(自動獲取),重新標記期間,以下meta標簽可用於目標:
- __meta_consul_address:目標地址
- __meta_consul_dc:目標的數據中心名稱
- __meta_consul_tagged_address_ <key>:每個節點標記的目標地址的鍵值
- __meta_consul_metadata_ <key>:目標的每個節點元數據鍵值
- __meta_consul_node:為目標定義的節點名稱
- __meta_consul_service_address:目標服務器的服務地址
- __meta_consul_service_id:目標的服務ID
- __meta_consul_service_metadata_ <key>:目標的每個服務元數據鍵值
- __meta_consul_service_port:目標服務器的服務端口
- __meta_consul_service:目標所屬的服務的名稱
- __meta_consul_tags:由標簽分隔符連接的目標的標簽列表
# 根據文檔要求定義consul api信息 [ server: <host> | default = "localhost:8500" ] [ token: <secret> ] [ datacenter: <string> ] [ scheme: <string> | default = "http" ] [ username: <string> ] [ password: <secret> ] tls_config: [ <tls_config> ] # 檢索目標的服務列表,默認所有服務器 services: [ - <string> ] # See https://www.consul.io/api/catalog.html#list-nodes-for-service to know more about the possible filters that can be used. #標簽的可選列表,用於過濾給定服務的節點。 服務必須包含列表中的所有標簽。 tags: [ - <string> ] # 節點元數據,用於過濾給定服務的節點。 [ node_meta: [ <name>: <value> ... ] ] # Consul標簽通過其連接到標簽標簽中的字符串 [ tag_separator: <string> | default = , ] # Allow stale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul. [ allow_stale: <bool> ] # 刷新提供的名稱之后的時間,在大型設置中,增加此值可能是個好主意,因為目錄會一直更改。 [ refresh_interval: <duration> | default = 30s ]
注意:用於抓取目標的IP地址和端口被組裝為<__ meta_consul_address>:<__ meta_consul_service_port>。 但是,在某些Consul設置中,相關地址在__meta_consul_service_address中。 在這種情況下,您可以使用重新標記功能來替換特殊的__address__標簽。
重新標記階段是基於任意標簽為服務篩選服務或節點的首選且功能更強大的方法。 對於擁有數千項服務的用戶,直接使用Consul API可能會更高效,該API具有基本的過濾節點支持(當前通過節點元數據和單個標簽)。
1.5 <dns_sd_config>
基於DNS的服務發現配置允許指定一組DNS域名,這些域名會定期查詢以發現目標列表。 要聯系的DNS服務器從/etc/resolv.conf中讀取。
此服務發現方法僅支持基本的DNS A,AAAA和SRV記錄查詢,但不支持RFC6763中指定的高級DNS-SD方法。在重新標記階段,元標簽__meta_dns_name在每個目標上可用,並設置為生成已發現目標的記錄名稱。
# 要查詢的DNS域名列表。 names: [ - <domain_name> ] # 要執行的DNS查詢的類型。 [ type: <query_type> | default = 'SRV' ] # 查詢類型不是SRV時使用的端口號。 [ port: <number>] # 提供名稱后刷新的時間。 [ refresh_interval: <duration> | default = 30s ]
其中<domain_name>是有效的DNS域名。 其中<query_type>是SRV,A或AAAA。
1.6 <openstack_sd_config>
1.7 <file_sd_config>
1.8 <dns_sd_config>
1.9 <gce_sd_config>
2.0 <kubernetes_sd_config>
2.1 <marathon_sd_config>
2.2 <nerve_sd_config>
2.3 <serverset_sd_config>
2.4 <triton_sd_config>
2.5 <static_config>
static_config允許指定目標列表和它們的公共標簽集,這是在scrape配置中指定靜態目標的規范方法。
# 靜態配置指定的目標。 targets: [ - '<host>' ] # 分配給從目標中已抓取的所有指標的標簽。 labels: [ <labelname>: <labelvalue> ... ]
2.6 <relabel_config>
重新標記是一種強大的工具,可以在抓取目標之前動態重寫目標的標簽集。 每個抓取配置可以配置多個重新標記步驟。 它們按照它們在配置文件中的出現順序應用於每個目標的標簽集。
最初,除了配置的每目標標簽之外,目標的作業標簽設置為相應的scrape配置的job_name值。 __address__標簽設置為目標的<host>:<port>地址。 重新標記后,如果在重新標記期間未設置實例標簽,則實例標簽默認設置為__address__的值。 __scheme__和__metrics_path__標簽分別設置為目標的方案和度量標准路徑。 __param_ <name>標簽設置為名為<name>的第一個傳遞的URL參數的值。
在重新標記階段,可以使用帶有__meta_前綴的附加標簽。 它們由提供目標的服務發現機制設置,並在不同機制之間變化。
在目標重新標記完成后,將從標簽集中刪除以__開頭的標簽。如果重新標記步驟僅需臨時存儲標簽值(作為后續重新標記步驟的輸入),請使用__tmp標簽名稱前綴。 保證Prometheus本身不會使用此前綴。
# 源標簽從現有標簽中選擇值。 它們的內容使用已配置的分隔符進行連接,並與已配置的正則表達式進行匹配,以進行替換,保留和刪除操作。 [ source_labels: '[' <labelname> [, ...] ']' ] # 分隔符放置在連接的源標簽值之間。 [ separator: <string> | default = ; ] # 在替換操作中將結果值寫入的標簽。 # 替換操作是強制性的。 正則表達式捕獲組可用。 [ target_label: <labelname> ] # 與提取的值匹配的正則表達式。 [ regex: <regex> | default = (.*) ] # 采用源標簽值的散列的模數。 [ modulus: <uint64> ] # 如果正則表達式匹配,則執行正則表達式替換的替換值。 正則表達式捕獲組可用。 [ replacement: <string> | default = $1 ] # 基於正則表達式匹配執行的操作。 [ action: <relabel_action> | default = replace ]
<regex>是任何有效的RE2正則表達式。 它是replace,keep,drop,labelmap,labeldrop和labelkeep操作所必需的。 正則表達式固定在兩端。 要取消錨定正則表達式,請使用。* <regex>.*。
<relabel_action>確定要采取的重新簽名行動:
replace:將regex與連接的source_labels匹配。 然后,將target_label設置為replacement,將匹配組引用(${1},${2},...)替換為其值。 如果正則表達式不匹配,則不進行替換。keep:刪除regex與連接的source_labels不匹配的目標。drop:刪除regex與連接的source_labels匹配的目標。hashmod:將target_label設置為連接的source_labels的哈希模數。labelmap:將regex與所有標簽名稱匹配。 然后將匹配標簽的值復制到替換時給出的標簽名稱,替換為匹配組引用(${1},{2},...)替換為其值。labeldrop:將regex與所有標簽名稱匹配。匹配的任何標簽都將從標簽集中刪除。labelkeep:將regex與所有標簽名稱匹配。任何不匹配的標簽都將從標簽集中刪除。
必須小心使用labeldrop和labelkeep,以確保在刪除標簽后仍然對指標進行唯一標記。
2.7 <metric_relabel_configs>
度量重新標記應用於樣本,作為攝取前的最后一步。 它具有與目標重新標記相同的配置格式和操作。 度量標准重新標記不適用於自動生成的時間序列,例如up。
一個用途是將黑名單時間序列列入黑名單,這些時間序列太昂貴而無法攝取。
2.8 <alert_relabel_configs>
警報重新標記在發送到Alertmanager之前應用於警報。 它具有與目標重新標記相同的配置格式和操作。 外部標簽后應用警報重新標記。這樣做的一個用途是確保具有不同外部標簽的HA對Prometheus服務器發送相同的警報。
2.9 <alertmanager_config>
alertmanager_config部分指定Prometheus服務器向其發送警報的Alertmanager實例。 它還提供參數以配置如何與這些Alertmanagers進行通信。
Alertmanagers可以通過static_configs參數靜態配置,也可以使用其中一種支持的服務發現機制動態發現。此外,relabel_configs允許從發現的實體中選擇Alertmanagers,並對使用的API路徑提供高級修改,該路徑通過__alerts_path__標簽公開。
# 推送警報時按目標Alertmanager超時。 [ timeout: <duration> | default = 10s ] # 將推送HTTP路徑警報的前綴。 [ path_prefix: <path> | default = / ] # 配置用於請求的協議方案。 [ scheme: <scheme> | default = http ] # 使用配置的用戶名和密碼在每個請求上設置`Authorization`標頭。 password和password_file是互斥的。 basic_auth: [ username: <string> ] [ password: <string> ] [ password_file: <string> ] # 使用配置的承載令牌在每個請求上設置“Authorization”標頭。 它與`bearer_token_file`互斥。 [ bearer_token: <string> ] # 使用配置的承載令牌在每個請求上設置“Authorization”標頭。 它與`bearer_token`互斥。 [ bearer_token_file: /path/to/bearer/token/file ] # 配置scrape請求的TLS設置。 tls_config: [ <tls_config> ] # 可選的代理URL。 [ proxy_url: <string> ] # Azure服務發現配置列表。 azure_sd_configs: [ - <azure_sd_config> ... ] # Consul服務發現配置列表。 consul_sd_configs: [ - <consul_sd_config> ... ] # DNS服務發現配置列表。 dns_sd_configs: [ - <dns_sd_config> ... ] # ECS服務發現配置列表。 ec2_sd_configs: [ - <ec2_sd_config> ... ] # 文件服務發現配置列表。 file_sd_configs: [ - <file_sd_config> ... ] # GCE服務發現配置列表。 gce_sd_configs: [ - <gce_sd_config> ... ] # K8S服務發現配置列表。 kubernetes_sd_configs: [ - <kubernetes_sd_config> ... ] # Marathon服務發現配置列表。 marathon_sd_configs: [ - <marathon_sd_config> ... ] # AirBnB's Nerve 服務發現配置列表。 nerve_sd_configs: [ - <nerve_sd_config> ... ] # Zookepper服務發現配置列表。 serverset_sd_configs: [ - <serverset_sd_config> ... ] # Triton服務發現配置列表。 triton_sd_configs: [ - <triton_sd_config> ... ] # 標記為靜態配置的Alertmanagers列表。 static_configs: [ - <static_config> ... ] # Alertmanager重新配置列表。 relabel_configs: [ - <relabel_config> ... ]
3.0 <remote_write>
write_relabel_configs是在將樣本發送到遠程端點之前應用於樣本的重新標記。 在外部標簽之后應用寫入重新標記。 這可用於限制發送的樣本。
# 要發送樣本的端點的URL. url: <string> # 對遠程寫端點的請求超時。 [ remote_timeout: <duration> | default = 30s ] # 遠程寫入重新標記配置列表。 write_relabel_configs: [ - <relabel_config> ... ] # 使用配置的用戶名和密碼在每個遠程寫請求上設置`Authorization`標頭.password和password_file是互斥的。 basic_auth: [ username: <string> ] [ password: <string> ] [ password_file: <string> ] # 使用配置的承載令牌在每個遠程寫請求上設置`Authorization`頭。 它與`bearer_token_file`互斥。 [ bearer_token: <string> ] # 使用配置的承載令牌在每個遠程寫請求上設置`Authorization`頭。 它與`bearer_token`互斥。 [ bearer_token_file: /path/to/bearer/token/file ] # 配置遠程寫入請求的TLS設置。 tls_config: [ <tls_config> ] # 可選的代理URL。 [ proxy_url: <string> ] # 配置用於寫入遠程存儲的隊列。 queue_config: # 在我們開始刪除之前每個分片緩沖的樣本數。 [ capacity: <int> | default = 10000 ] # 最大分片數,即並發數。 [ max_shards: <int> | default = 1000 ] # 最小分片數,即並發數。 [ min_shards: <int> | default = 1 ] # 每次發送的最大樣本數。 [ max_samples_per_send: <int> | default = 100] # 樣本在緩沖區中等待的最長時間。 [ batch_send_deadline: <duration> | default = 5s ] # 在可恢復錯誤上重試批處理的最大次數。 [ max_retries: <int> | default = 3 ] # 初始重試延遲。 每次重試都會加倍。 [ min_backoff: <duration> | default = 30ms ] # 最大重試延遲。 [ max_backoff: <duration> | default = 100ms ]
有一個與此功能集成的列表。
3.1 <remote_read>
# 要發送樣本的端點的URL. url: <string> # 可選的匹配器列表,必須存在於選擇器中以查詢遠程讀取端點。 required_matchers: [ <labelname>: <labelvalue> ... ] # 對遠程讀取端點的請求超時。 [ remote_timeout: <duration> | default = 1m ] # 本地存儲應該有完整的數據。 [ read_recent: <boolean> | default = false ] # 使用配置的用戶名和密碼在每個遠程寫請求上設置`Authorization`標頭.password和password_file是互斥的。 basic_auth: [ username: <string> ] [ password: <string> ] [ password_file: <string> ] # 使用配置的承載令牌在每個遠程寫請求上設置`Authorization`頭。 它與`bearer_toke_filen`互斥。 [ bearer_token: <string> ] # 使用配置的承載令牌在每個遠程寫請求上設置`Authorization`頭。 它與`bearer_token`互斥。 [ bearer_token_file: /path/to/bearer/token/file ] # 配置遠程寫入請求的TLS設置。 tls_config: [ <tls_config> ] # 可選的代理URL。 [ proxy_url: <string> ]
有一個與此功能集成的列表。
二、配置模板
# my global config global: scrape_interval: 15s evaluation_interval: 30s # scrape_timeout is set to the global default (10s). external_labels: monitor: codelab foo: bar rule_files: - "first.rules" - "my/*.rules" remote_write: - url: http://remote1/push write_relabel_configs: - source_labels: [__name__] regex: expensive.* action: drop - url: http://remote2/push remote_read: - url: http://remote1/read read_recent: true - url: http://remote3/read read_recent: false required_matchers: job: special scrape_configs: - job_name: prometheus honor_labels: true # scrape_interval is defined by the configured global (15s). # scrape_timeout is defined by the global default (10s). # metrics_path defaults to '/metrics' # scheme defaults to 'http'. file_sd_configs: - files: - foo/*.slow.json - foo/*.slow.yml - single/file.yml refresh_interval: 10m - files: - bar/*.yaml static_configs: - targets: ['localhost:9090', 'localhost:9191'] labels: my: label your: label relabel_configs: - source_labels: [job, __meta_dns_name] regex: (.*)some-[regex] target_label: job replacement: foo-${1} # action defaults to 'replace' - source_labels: [abc] target_label: cde - replacement: static target_label: abc - regex: replacement: static target_label: abc bearer_token_file: valid_token_file - job_name: service-x basic_auth: username: admin_name password: "multiline\nmysecret\ntest" scrape_interval: 50s scrape_timeout: 5s sample_limit: 1000 metrics_path: /my_path scheme: https dns_sd_configs: - refresh_interval: 15s names: - first.dns.address.domain.com - second.dns.address.domain.com - names: - first.dns.address.domain.com # refresh_interval defaults to 30s. relabel_configs: - source_labels: [job] regex: (.*)some-[regex] action: drop - source_labels: [__address__] modulus: 8 target_label: __tmp_hash action: hashmod - source_labels: [__tmp_hash] regex: 1 action: keep - action: labelmap regex: 1 - action: labeldrop regex: d - action: labelkeep regex: k metric_relabel_configs: - source_labels: [__name__] regex: expensive_metric.* action: drop - job_name: service-y consul_sd_configs: - server: 'localhost:1234' token: mysecret services: ['nginx', 'cache', 'mysql'] tag: "canary" node_meta: rack: "123" allow_stale: true scheme: https tls_config: ca_file: valid_ca_file cert_file: valid_cert_file key_file: valid_key_file insecure_skip_verify: false relabel_configs: - source_labels: [__meta_sd_consul_tags] separator: ',' regex: label:([^=]+)=([^,]+) target_label: ${1} replacement: ${2} - job_name: service-z tls_config: cert_file: valid_cert_file key_file: valid_key_file bearer_token: mysecret - job_name: service-kubernetes kubernetes_sd_configs: - role: endpoints api_server: 'https://localhost:1234' basic_auth: username: 'myusername' password: 'mysecret' - job_name: service-kubernetes-namespaces kubernetes_sd_configs: - role: endpoints api_server: 'https://localhost:1234' namespaces: names: - default - job_name: service-marathon marathon_sd_configs: - servers: - 'https://marathon.example.com:443' auth_token: "mysecret" tls_config: cert_file: valid_cert_file key_file: valid_key_file - job_name: service-ec2 ec2_sd_configs: - region: us-east-1 access_key: access secret_key: mysecret profile: profile filters: - name: tag:environment values: - prod - name: tag:service values: - web - db - job_name: service-azure azure_sd_configs: - environment: AzurePublicCloud authentication_method: OAuth subscription_id: 11AAAA11-A11A-111A-A111-1111A1111A11 tenant_id: BBBB222B-B2B2-2B22-B222-2BB2222BB2B2 client_id: 333333CC-3C33-3333-CCC3-33C3CCCCC33C client_secret: mysecret port: 9100 - job_name: service-nerve nerve_sd_configs: - servers: - localhost paths: - /monitoring - job_name: 0123service-xxx metrics_path: /metrics static_configs: - targets: - localhost:9090 - job_name: 測試 metrics_path: /metrics static_configs: - targets: - localhost:9090 - job_name: service-triton triton_sd_configs: - account: 'testAccount' dns_suffix: 'triton.example.com' endpoint: 'triton.example.com' port: 9163 refresh_interval: 1m version: 1 tls_config: cert_file: testdata/valid_cert_file key_file: testdata/valid_key_file - job_name: service-openstack openstack_sd_configs: - role: instance region: RegionOne port: 80 refresh_interval: 1m tls_config: ca_file: valid_ca_file cert_file: valid_cert_file key_file: valid_key_file alerting: alertmanagers: - scheme: https static_configs: - targets: - "1.2.3.4:9093" - "1.2.3.5:9093" - "1.2.3.6:9093"
