使用lightdb-em或Prometheus+grafana监控lightdb/PostgreSQL

发布时间 2023-06-24 13:36:34作者: lightdb

  lightdb提供了一体化的运维监控平台lightdb-em,支持集中式的监控所有的lightdb实例以及postgresql,包括单机、高可用、分布式。其架构如下:

   lightdb-em功能:

   

 

  详细的使用可以参考官方文档运维指南。安装包可从lightdb官网下载。

  如果不想使用lightdb-em,也可以使用开源方案如zabbix,promethous,它们的深度分析能力会相对弱一些。

  Prometheus(目前主要在用版本为2.0):核心监控平台,使用 Go(go作为工具、系统软件开发、大容量&并发是可以的,开发普通业务CRUD应用就算了)编写为主,告警使用单独的组件(prometheus/alertmanager),可从https://prometheus.io/download/下载,现代流行监控系统,跟之前的nagios以及zabbix类似(主要是嫌弃人家php写的,潮起潮落,应用开发界的悲哀),主要噱头为go编写以及云原生,exporter为被监控应用接入需要遵循的核心接口规范,一般也推荐使用go语言编写,使用HTTP协议。自带的展现较弱(和zipkin自带的ES自类似),一般使用grafana(提供了Prometheus数据源支持)做监控展现。

  grafana(主要版本为7.x):展现平台,主要和Prometheus一起使用为主,可从https://grafana.com/grafana/download?pg=get&plcmt=selfmanaged-box1-cta1下载。

  Prometheus监控postgresql,可参见https://help.aliyun.com/document_detail/161841.htmlhttps://github.com/prometheus-community/postgres_exporterhttps://github.com/percona/postgres_exporterhttps://blog.csdn.net/qq_40484416/article/details/104768012

  Prometheus监控mysql,可参见https://blog.csdn.net/allway2/article/details/106986309/

  针对springboot2应用的监控主要是SpringBoot Actuator应用,其底层是micrometer(号称监控界的SLF4J,支持接入多种数据库,包括prometheus)。参考:https://www.cnblogs.com/wwjj4811/p/14019820.html