1 Star 0 Fork 3

x5y22r / druid-prometheus-monitor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Druid Monitor (for Prometheus)

如果你使用 Druid 作为数据库连接池时希望通过 Prometheus 对 Druid 进行监控,那么 druid-prometheus-monitor 可以解决这个问题,

druid-prometheus-monitor 会将 Druid 的大部分指标通过 micrometer-registry-prometheus 注册到端点,

默认通过端点 /actuator/prometheus 提供服务,详情请参考 spring-boot-starter-actuator 和 micrometer-registry-prometheus

项目依赖

  • Java 1.8+
  • Druid 1.1.x
  • Spring Boot 2.3.x

由于在项目中使用了 Steam api 和 lambda 表达式,项目使用 Java 1.8 进行构建 项目基于 spring-boot-starter-actuator 和 micrometer-registry-prometheus ,但项目本身并不包含这些依赖,需要根据需求添加

配置

即插即用,加入依赖就可以启用监控

如需要关闭 SQL 监控 URI 监控可安如下配置:

  • 关闭 SQL 监控

    management.metrics.enable.druid-sql=false

  • 关闭 URI 监控

    management.metrics.enable.druid-uri=false

MIT License Copyright (c) 2019 Brent Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

如果你使用 Druid 作为数据库连接池时希望通过 Prometheus 对 Druid 进行监控,那么这个项目可以解决这个问题 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/x5y22r/druid-prometheus-monitor.git
git@gitee.com:x5y22r/druid-prometheus-monitor.git
x5y22r
druid-prometheus-monitor
druid-prometheus-monitor
master

搜索帮助