日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

promethues集成nomad

發(fā)布時(shí)間:2025/3/21 编程问答 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 promethues集成nomad 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

? ? ? ?在上一篇文章《prometheus獲取Consul上注冊(cè)的服務(wù)》里,已說(shuō)明了如何將promethues集成consul,而nomad也可以集成到promethues中去,不廢話,直接上配置文件prometheus.yml內(nèi)容:

# my global config global:scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.# scrape_timeout is set to the global default (10s).# Alertmanager configuration alerting:alertmanagers:- static_configs:- targets:- 10.110.200.68:9093# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. rule_files:# - "first_rules.yml"# - "second_rules.yml"# A scrape configuration containing exactly one endpoint to scrape: # Here it's Prometheus itself. scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.- job_name: 'prometheus'# metrics_path defaults to '/metrics'# scheme defaults to 'http'.static_configs:- targets: ['localhost:9090']- job_name: 'nomad-client'metrics_path: /v1/metricsparams: format: - prometheusconsul_sd_configs:- server: '10.110.200.184:8500'services: - nomad-client- job_name: consulconsul_sd_configs:- server: '10.110.200.40:8500'relabel_configs:- source_labels: [__meta_consul_tags]regex: .*,prometheus,.*action: keep- source_labels: [__meta_consul_service]target_label: job- source_labels: [__meta_consul_tags] regex: .*,smartms,.*target_label: __metrics_path__ replacement: '/actuator/prometheus'- source_labels: [__meta_consul_tags] regex: .*,type=([^,]+),.*target_label: type replacement: ${1}- source_labels: [__meta_consul_tags] regex: .*,env=([^,]+),.*target_label: env replacement: ${1}- source_labels: [__meta_consul_tags] regex: .*,app_id=([^,]+),.*target_label: app_id replacement: ${1}

可以在targets界面看到nomad-client的情況

在metrics就能選到nomad的相關(guān)指標(biāo)了

總結(jié)

以上是生活随笔為你收集整理的promethues集成nomad的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。