Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
nightingale
提交
9edf05c1
N
nightingale
项目概览
DiDi
/
nightingale
9 个月 前同步成功
通知
46
Star
7053
Fork
1161
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nightingale
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9edf05c1
编写于
6月 15, 2023
作者:
N
ning
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of
ssh://github.com/ccfos/nightingale
上级
6a6b4a22
0473bb39
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
2426 addition
and
0 deletion
+2426
-0
integrations/springboot/alerts/alerts.json
integrations/springboot/alerts/alerts.json
+332
-0
integrations/springboot/dashboards/JVM(Actuator)withapplicationname
...ns/springboot/dashboards/JVM(Actuator)withapplicationname
+2073
-0
integrations/springboot/icon/img.png
integrations/springboot/icon/img.png
+0
-0
integrations/springboot/markdown/README.md
integrations/springboot/markdown/README.md
+21
-0
integrations/springboot/markdown/actuator.jpeg
integrations/springboot/markdown/actuator.jpeg
+0
-0
未找到文件。
integrations/springboot/alerts/alerts.json
0 → 100644
浏览文件 @
9edf05c1
[
{
"cate"
:
"prometheus"
,
"datasource_ids"
:
[
0
],
"name"
:
"springboot HEAP内存使用率大于20%"
,
"note"
:
""
,
"prod"
:
"metric"
,
"algorithm"
:
""
,
"algo_params"
:
null
,
"delay"
:
0
,
"severity"
:
0
,
"severities"
:
[
2
],
"disabled"
:
0
,
"prom_for_duration"
:
60
,
"prom_ql"
:
""
,
"rule_config"
:
{
"queries"
:
[
{
"prom_ql"
:
"sum(jvm_memory_used_bytes{instance=~
\"
.+
\"
, area=
\"
heap
\"
})*100/sum(jvm_memory_max_bytes{instance=~
\"
.+
\"
, area=
\"
heap
\"
}) >20"
,
"severity"
:
2
}
]
},
"prom_eval_interval"
:
30
,
"enable_stime"
:
"00:00"
,
"enable_stimes"
:
[
"00:00"
],
"enable_etime"
:
"23:59"
,
"enable_etimes"
:
[
"23:59"
],
"enable_days_of_week"
:
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
],
"enable_days_of_weeks"
:
[
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
]
],
"enable_in_bg"
:
0
,
"notify_recovered"
:
1
,
"notify_channels"
:
[],
"notify_repeat_step"
:
60
,
"notify_max_number"
:
0
,
"recover_duration"
:
0
,
"callbacks"
:
[],
"runbook_url"
:
""
,
"append_tags"
:
[],
"annotations"
:
{}
},
{
"cate"
:
"prometheus"
,
"datasource_ids"
:
[
0
],
"name"
:
"springboot HTTP请求延迟大于10s"
,
"note"
:
""
,
"prod"
:
"metric"
,
"algorithm"
:
""
,
"algo_params"
:
null
,
"delay"
:
0
,
"severity"
:
0
,
"severities"
:
[
2
],
"disabled"
:
0
,
"prom_for_duration"
:
60
,
"prom_ql"
:
""
,
"rule_config"
:
{
"queries"
:
[
{
"prom_ql"
:
"max(http_server_requests_seconds_max{instance=~
\"
.+
\"
, status!~
\"
5..
\"
}) > 10"
,
"severity"
:
2
}
]
},
"prom_eval_interval"
:
30
,
"enable_stime"
:
"00:00"
,
"enable_stimes"
:
[
"00:00"
],
"enable_etime"
:
"23:59"
,
"enable_etimes"
:
[
"23:59"
],
"enable_days_of_week"
:
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
],
"enable_days_of_weeks"
:
[
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
]
],
"enable_in_bg"
:
0
,
"notify_recovered"
:
1
,
"notify_channels"
:
[],
"notify_repeat_step"
:
60
,
"notify_max_number"
:
0
,
"recover_duration"
:
0
,
"callbacks"
:
[],
"runbook_url"
:
""
,
"append_tags"
:
[],
"annotations"
:
{}
},
{
"cate"
:
"prometheus"
,
"datasource_ids"
:
[
0
],
"name"
:
"springboot HTTP错误数"
,
"note"
:
""
,
"prod"
:
"metric"
,
"algorithm"
:
""
,
"algo_params"
:
null
,
"delay"
:
0
,
"severity"
:
0
,
"severities"
:
[
2
],
"disabled"
:
0
,
"prom_for_duration"
:
60
,
"prom_ql"
:
""
,
"rule_config"
:
{
"queries"
:
[
{
"prom_ql"
:
"sum(rate(http_server_requests_seconds_count{instance=~
\"
.+
\"
, status=~
\"
5.+
\"
}[1m])) != 0"
,
"severity"
:
2
}
]
},
"prom_eval_interval"
:
30
,
"enable_stime"
:
"00:00"
,
"enable_stimes"
:
[
"00:00"
],
"enable_etime"
:
"23:59"
,
"enable_etimes"
:
[
"23:59"
],
"enable_days_of_week"
:
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
],
"enable_days_of_weeks"
:
[
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
]
],
"enable_in_bg"
:
0
,
"notify_recovered"
:
1
,
"notify_channels"
:
[],
"notify_repeat_step"
:
60
,
"notify_max_number"
:
0
,
"recover_duration"
:
0
,
"callbacks"
:
[],
"runbook_url"
:
""
,
"append_tags"
:
[],
"annotations"
:
{}
},
{
"cate"
:
"prometheus"
,
"datasource_ids"
:
[
0
],
"name"
:
"springboot NOHEAP内存使用率大于30%"
,
"note"
:
""
,
"prod"
:
"metric"
,
"algorithm"
:
""
,
"algo_params"
:
null
,
"delay"
:
0
,
"severity"
:
0
,
"severities"
:
[
2
],
"disabled"
:
0
,
"prom_for_duration"
:
60
,
"prom_ql"
:
""
,
"rule_config"
:
{
"queries"
:
[
{
"prom_ql"
:
"sum(jvm_memory_used_bytes{instance=~
\"
.+
\"
, area=
\"
nonheap
\"
})*100/sum(jvm_memory_max_bytes{instance=~
\"
.+
\"
, area=
\"
nonheap
\"
}) > 30"
,
"severity"
:
2
}
]
},
"prom_eval_interval"
:
30
,
"enable_stime"
:
"00:00"
,
"enable_stimes"
:
[
"00:00"
],
"enable_etime"
:
"23:59"
,
"enable_etimes"
:
[
"23:59"
],
"enable_days_of_week"
:
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
],
"enable_days_of_weeks"
:
[
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
]
],
"enable_in_bg"
:
0
,
"notify_recovered"
:
1
,
"notify_channels"
:
[],
"notify_repeat_step"
:
60
,
"notify_max_number"
:
0
,
"recover_duration"
:
0
,
"callbacks"
:
[],
"runbook_url"
:
""
,
"append_tags"
:
[],
"annotations"
:
{}
},
{
"cate"
:
"prometheus"
,
"datasource_ids"
:
[
0
],
"name"
:
"springboot 事件错误数"
,
"note"
:
""
,
"prod"
:
"metric"
,
"algorithm"
:
""
,
"algo_params"
:
null
,
"delay"
:
0
,
"severity"
:
0
,
"severities"
:
[
2
],
"disabled"
:
0
,
"prom_for_duration"
:
60
,
"prom_ql"
:
""
,
"rule_config"
:
{
"queries"
:
[
{
"prom_ql"
:
"increase(logback_events_total{instance=
\"
$instance
\"
}[1m]) > 0"
,
"severity"
:
2
}
]
},
"prom_eval_interval"
:
30
,
"enable_stime"
:
"00:00"
,
"enable_stimes"
:
[
"00:00"
],
"enable_etime"
:
"23:59"
,
"enable_etimes"
:
[
"23:59"
],
"enable_days_of_week"
:
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
],
"enable_days_of_weeks"
:
[
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
]
],
"enable_in_bg"
:
0
,
"notify_recovered"
:
1
,
"notify_channels"
:
[],
"notify_repeat_step"
:
60
,
"notify_max_number"
:
0
,
"recover_duration"
:
0
,
"callbacks"
:
[],
"runbook_url"
:
""
,
"append_tags"
:
[],
"annotations"
:
{}
}
]
\ No newline at end of file
integrations/springboot/dashboards/JVM(Actuator)withapplicationname
0 → 100644
浏览文件 @
9edf05c1
此差异已折叠。
点击以展开。
integrations/springboot/icon/img.png
0 → 100644
浏览文件 @
9edf05c1
6.5 KB
integrations/springboot/markdown/README.md
0 → 100644
浏览文件 @
9edf05c1
### SpringBoot生态使用自带的Actuator暴露指标
下载验证:
1.
在start.spring.io网站,在右侧将Spring Web、SpringBoot Actuator及Prometheus依赖加进去,直接就可以生成一个demo项目。
2.
点击下方的GENERATE下载到本地。
3.
修改
`application.properties`
文件,将
`server.tomcat.mbeanregistry.enabled=true`
添加进去。
4.
简单写个Controller后运行该项目。
5.
访问
`http://localhost:8080/actuator`
即可获取到所有的参数以及指标;
### 采集配置
在categraf中的prometheus插件中加入采集配置
```
yaml
cat /opt/categraf/conf/input.prometheus/prometheus.toml
[[
instances
]]
urls = [
"http://192.168.11.177:8080/actuator/prometheus"
]
url_label_key = "instance"
url_label_value = "{{.Host}}"
```
效果图:!
[
actuator
](
./actuator.jpeg
)
\ No newline at end of file
integrations/springboot/markdown/actuator.jpeg
0 → 100644
浏览文件 @
9edf05c1
750.8 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录