引言
1 | 如何保证系统或api在出问题的时候及时发现并解决呢?这就需要用到监控系统,监控系统可以是实时监控,也可以是 |
安装
1 | # cd /usr/local/Diamond |
配置
diamond配置(./conf/diamond.conf)
1 | [server] |
数据库支持(mysql)
1 | create database diamond |
增加MemoryCollector(当然按照上边的配置还能加其他的)
1 | 在目录/xx/Diamond/share/diamond/collectors/中添加一个py文件 |
增加自己的Collector
添加ExampleCollector.conf
1 | 在/xx/Diamond/conf/collectors/添加一个ExampleCollector.conf |
添加ExampleCollector.py
1 | 在/xx/Diamond/share/diamond/collectors/中添加ExampleCollector.py |
启动
1 | # cd /usr/local/Diamond |
查看结果
1 | 可以到已经搭建好的graphite(待我整理完会补充,也可以到网上搜一下) |
More info: Diamond