
可观测性
文章平均质量分 61
咸鱼还是要有梦想的
这个作者很懒,什么都没留下…
展开
-
Prometheus 四种指标类型
prometheus 包含四种核心的指标类型:Countercounter 是一个累积计数的指标,仅支持增加或者重置为0(只增不减 )。例如:可以用来统计服务请求的数量,任务完成数量,或者出错的数量。Java的使用如下:import io.prometheus.client.Counter;class YourClass { static final Counter requests = Counter.build() .name("requests_total").hel原创 2021-01-12 19:51:46 · 5418 阅读 · 0 评论 -
Prometheus 告警配置以及抑制规则inhibit_rules 说明
1.在prometheus.yml配置文件中进行告警规则文件的配置:global:# Rule files specifies a list of globs. Rules and alerts are read from# all matching files.rule_files: [ - <filepath_glob> ... ]例如: - rules/br_alerts.yml rules为相对路径2.在告警的规则文件中进行具体的告警规则配置## Ale原创 2021-01-12 17:53:59 · 7033 阅读 · 0 评论 -
Prometheus配置详解
prometheus配置文件说明 ,官网地址:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config全局整体分为六个部分,具体配置如下:global: # How frequently to scrape targets by default. [ scrape_interval: <duration> | default = 1m ] # How ..原创 2020-12-07 11:04:04 · 1591 阅读 · 0 评论 -
Prometheus 重新加载配置
在生产环境中,prometheus经常会存在修改配置的情况,那么就需要在不停止服务的前提下进行重新加载配置,有如下两种解决方式:添加--web.enable-lifecycle参数,启动服务 kill -1 PID # 重载配置或者访问 /-/reload 接口...原创 2020-12-06 16:59:13 · 4168 阅读 · 0 评论 -
Prometheus 修改targets端口
修改目的:打开prometheus,选择targets可以看到下面的页面,目的就是修改红框中的端口。 修改方式:修改prometheus.yml 配置文件,增加如下配置: 配置详细解释:relabel_configs 重新标记配置 - source_labels 源标签 regex 根据此正则表达式取源标签的内容 target_label 目的标签 replacement 操作...原创 2020-10-10 18:45:53 · 2207 阅读 · 1 评论