惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
小众软件
小众软件
有赞技术团队
有赞技术团队
MyScale Blog
MyScale Blog
A
About on SuperTechFans
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
Vercel News
Vercel News
博客园_首页
T
Troy Hunt's Blog
I
InfoQ
M
MIT News - Artificial intelligence
aimingoo的专栏
aimingoo的专栏
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
博客园 - 司徒正美
Cloudbric
Cloudbric
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Forbes - Security
Forbes - Security
D
Docker
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
博客园 - 聂微东
S
Security Affairs
Security Archives - TechRepublic
Security Archives - TechRepublic
WordPress大学
WordPress大学
N
News and Events Feed by Topic
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Heimdal Security Blog
大猫的无限游戏
大猫的无限游戏
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Threat Research - Cisco Blogs
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
J
Java Code Geeks
F
Full Disclosure
L
Lohrmann on Cybersecurity
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Project Zero
Project Zero
GbyAI
GbyAI
B
Blog
爱范儿
爱范儿

ike‘s blog

mac软件推荐 用Siri来控制Windows电脑开机关机吧 clickhouse的一些优化建议和工具 2023sumppary 记录一下我的第一个网页游戏Mazeball 如何使用Clickhouse的索引 如何从zookeeper切换为clickhouse—keeper cloki分布式查询和clickhouse副本存储 使用ilogtail+cloki+clickhouse来做日志系统吧 clickhouse集群部署指南 快速安装部署clickhouse和cloki 快速部署thanos架构 如何使用go的jwt 如何修改git commit记录 业务容器化需要注意的一些地方 游戏企划 Prometheus Metrics精简优化2 来在线听音乐吧 Chatgpt的API入门 简单搭建国内也可以使用的chatgpt Kubernetes的探针机制 本地部署chatAI【chatglm】 AI绘画工具webui简单入门 之 高清化 写在地下城邂逅Ⅳ·灾厄篇·完结之后 如何部署gitalk作为评论系统 AI绘画工具webui简单入门 之 工具安装 grafanadb迁移到mysql kubectl常用命令 开始写博客啦 隐私政策URL Markdown Example Include Video in the Posts Markdown Extended Features Simple Guides for Fuwari Golang net/http & HTTP Serve 源码分析
Prometheus Metrics精简优化
ike · 2023-04-04 · via ike‘s blog

PrometheusTSDB Status里可以查看TOP10的指标:Top 10 series count by metric names,参考这个来优化指标吧!

筛选#

推荐使用metric_relabel_configs

#保留
  metric_relabel_configs: 
  - source_labels: [__name__]
    regex: etcd_disk_backend_commit_duration_seconds_bucket|up
    action: keep   
#去除
  metric_relabel_configs:
  - source_labels: [__name__]
    regex: nginx_filter_.*
    action: drop 

或者使用whitelist_regex或者blacklist_regex 举例:

# 只监控以http开头的指标
whitelist_regex: ^http.*

# 不监控以http开头的指标
blacklist_regex: ^http.*

合并#

kube-apiserverapiserver_request_duration_seconds_bucket指标数量太多尝试进行合并:

将0.1、0.2、0.5、1、2、5、10、30和+Inf的桶(bucket)合并为0.1的桶(bucket),将0.3、0.6、1.5、3、6、15、30、60、120、300、600、1800、3600和+Inf的桶(bucket)合并为0.3的桶(bucket),以此类推。

    relabel_configs:													
      - source_labels: [le]
        regex: "0\\.1|0\\.2|0\\.5|1|2|5|10|30|\\+Inf"
        action: replace
        target_label: le
        replacement: "0.1"
      - source_labels: [le]
        regex: "0\\.3|0\\.6|1\\.5|3|6|15|30|60|120|300|600|1800|3600|\\+Inf"
        action: replace
        target_label: le
        replacement: "0.3"
      - source_labels: [le]
        regex: "0\\.4|0\\.7|2\\.5|4|7|25|50|100|250|500|1000|1800|3600|\\+Inf"
        action: replace
        target_label: le
        replacement: "0.4"
      - source_labels: [le]
        regex: "1\\.5|5|15|30|60|300|1800|3600|\\+Inf"
        action: replace
        target_label: le
        replacement: "1.5"