监控系统各个模块部署
1. graphite
graphite 是一个 指标数据收集系统,一般作为监控系统中 「监控数据收集存储」使用,它有3个组件 Carbon Whisper 和 Graphite-web
Carbon 用于数据采集
whisper 用于数据存储
Graphite-web 用于数据展示(一般会用其他如grafana代替其作为数据展示)
安装graphite官网介绍有四种方式,这里用pip安装
pip install --no-binary=:all: https://github.com/graphite-project/whisper/tarball/master
pip install --no-binary=:all: https://github.com/graphite-project/carbon/tarball/master
pip install --no-binary=:all: https://github.com/graphite-project/graphite-web/tarball/master
carbon-cache启动:/usr/bin/python2 /opt/graphite/bin/carbon-cache.py start
carbon-relay 启动:/usr/bin/python2 /opt/graphite/bin/carbon-relay.py start
2. graphite-api
底层:graphite_api
启动: /usr/bin/python /usr/bin/gunicorn -k gevent -w 2 graphite_api.app:app -b 0.0.0.0:8888
启动如果出错,可能是一些依赖包没装,如gunicorn gevent pytz flask structlog tzlocal pyparsing scandir cairocffi等,再pip install就ok了
配置:/etc/graphite-api.yaml
3. grafana
前端:yarn start
后端:go run build.go build ------>生成grafana-server
./bin/linux-amd64/grafana-server --config=/home/q/grafana-server/conf/defaults.ini