docs:https://graphite.readthedocs.io/en/latest/
https://amosannn.github.io/2018/11/29/install-graphite/
一、系统与重点步骤
- 系统:
CentOS 7.2 + Python 2.7.5
WSGI server and web server,选用:gunicorn + nginx - git下载graphite相关源码下载、安装:
$ cd /opt //下载源码:
$ git clone https://github.com/graphite-project/graphite-web.git
$ git clone https://github.com/graphite-project/carbon.git
$ git clone https://github.com/graphite-project/whisper.git
然后通过python setup.py install安装:
$ cd graphite-web
$ python setup.py install
这时在/opt下多了一个graphite目录
- 检查依赖:
$ cd /opt/graphite-web
$ python check-dependencies.py
$ yum install python-devel cairo-devel openssl-devel
$ yum install gcc libffi-devel
- 一些配置可能需要
$ ./configure
$ make
$ make install
$ cd /opt/graphite/conf/
通过 cp 去掉 .example 后缀
常用操作
- 向 Graphite 写入数据
https://amosannn.github.io/2018/12/17/data-alert-by-graphite-and-grafana/
https://www.jianshu.com/p/3d98196c4290
https://blog.csdn.net/liuxiao723846/article/details/82735147
export PYTHONPATH="/opt/graphite/lib/:/opt/graphite/webapp/"
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