Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doodoocoder
prometheus
提交
ee1427fa
P
prometheus
项目概览
doodoocoder
/
prometheus
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
prometheus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ee1427fa
编写于
5月 09, 2018
作者:
T
Tom Wilkie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Prometheus monitoring mixin for Prometheus itself.
Signed-off-by:
N
Tom Wilkie
<
tom.wilkie@gmail.com
>
上级
11b336e3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
101 addition
and
0 deletion
+101
-0
documentation/prometheus-mixin/alerts.libsonnet
documentation/prometheus-mixin/alerts.libsonnet
+92
-0
documentation/prometheus-mixin/config.libsonnet
documentation/prometheus-mixin/config.libsonnet
+7
-0
documentation/prometheus-mixin/mixin.libsonnet
documentation/prometheus-mixin/mixin.libsonnet
+2
-0
未找到文件。
documentation/prometheus-mixin/alerts.libsonnet
0 → 100644
浏览文件 @
ee1427fa
{
prometheusAlerts
+::
{
groups
+:
[
{
name
:
'prometheus'
,
rules
:
[
{
alert
:
'PromScrapeFailed'
,
expr
:
|||
up != 1
|||
,
'for'
:
'15m'
,
labels
:
{
severity
:
'warning'
,
},
annotations
:
{
message
:
'Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}'
,
},
},
{
alert
:
'PromBadConfig'
,
expr
:
|||
prometheus_config_last_reload_successful{%(prometheusSelector)s} == 0
|||
%
$
.
_config
,
'for'
:
'15m'
,
labels
:
{
severity
:
'critical'
,
},
annotations
:
{
mesage
:
'Prometheus failed to reload config, see container logs'
,
},
},
{
alert
:
'PromAlertmanagerBadConfig'
,
expr
:
|||
alertmanager_config_last_reload_successful{%(alertmanagerSelector)s} == 0
|||
%
$
.
_config
,
'for'
:
'10m'
,
labels
:
{
severity
:
'critical'
,
},
annotations
:
{
message
:
'Alertmanager failed to reload config, see container logs'
,
},
},
{
alert
:
'PromAlertsFailed'
,
expr
:
|||
sum(increase(alertmanager_notifications_failed_total{%(alertmanagerSelector)s}[5m])) by (namespace) > 0
|||
%
$
.
_config
,
'for'
:
'5m'
,
labels
:
{
severity
:
'critical'
,
},
annotations
:
{
message
:
'Alertmanager failed to send an alert.'
,
},
},
{
alert
:
'PromRemoteStorageFailures'
,
expr
:
|||
(rate(prometheus_remote_storage_failed_samples_total{%(prometheusSelector)s}[1m]) * 100)
/
(rate(prometheus_remote_storage_failed_samples_total{%(prometheusSelector)s}[1m]) + rate(prometheus_remote_storage_succeeded_samples_total{%(prometheusSelector)s}[1m]))
> 1
|||
%
$
.
_config
,
'for'
:
'15m'
,
labels
:
{
severity
:
'critical'
,
},
annotations
:
{
message
:
'Prometheus failed to send {{ printf "%.1f" $value }}% samples'
,
},
},
{
alert
:
'PromRuleFailures'
,
'for'
:
'15m'
,
expr
:
|||
rate(prometheus_rule_evaluation_failures_total{%(prometheusSelector)s}[1m]) > 0
|||
%
$
.
_config
,
labels
:
{
severity
:
'critical'
,
},
annotations
:
{
message
:
'Prometheus failed to evaluate {{ printf "%.1f" $value }} rules / s'
,
},
},
],
},
],
},
}
documentation/prometheus-mixin/config.libsonnet
0 → 100644
浏览文件 @
ee1427fa
{
_config
+::
{
// Selectors are inserted between {} in Prometheus queries.
prometheusSelector
:
'job="prometheus"'
,
alertmanagerSelector
:
'job="alertmanager"'
,
},
}
documentation/prometheus-mixin/mixin.libsonnet
0 → 100644
浏览文件 @
ee1427fa
(
import
'config.libsonnet'
)
+
(
import
'alerts.libsonnet'
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录