poorX

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  117 随笔 :: 0 文章 :: 11 评论 :: 16万 阅读
参考

https://www.cnblogs.com/xiangsikai/p/11288801.html

https://www.cnblogs.com/xiaobaozi-95/p/10639076.html

配置
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: 'mysql'
    - targets: ['localhost:3306']
热加载配置
# 修改 prometheus.yml 后可通过 reload 接口刷新配置
# 注意用 POST
curl -X POST http://localhost:9090/-/reload
实现prometheus exporter

https://www.jianshu.com/p/5db23a280e1d

prometheus label

https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels,-not-static-scraped-labels
https://prometheus.io/docs/practices/instrumentation/#things-to-watch-out-for

posted on   poorX  阅读(24)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
历史上的今天:
2019-04-23 【perl】simpleHTTP
点击右上角即可分享
微信分享提示