当前位置: 首页>后端>正文

日志监控工具 Graphite 0.9.15

docs:https://graphite.readthedocs.io/en/latest/
https://amosannn.github.io/2018/11/29/install-graphite/

一、系统与重点步骤

  1. 系统:
    CentOS 7.2 + Python 2.7.5
    WSGI server and web server,选用:gunicorn + nginx
  2. 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目录

  1. 检查依赖:
$ cd /opt/graphite-web
$ python check-dependencies.py
$ yum install python-devel cairo-devel openssl-devel
$ yum install gcc libffi-devel 
  1. 一些配置可能需要
$ ./configure
$ make
$ make install 
$ cd /opt/graphite/conf/

通过 cp 去掉 .example 后缀

常用操作

  1. 向 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/"

  1. pip install --no-binary=:all: https://github.com/graphite-project/whisper/tarball/master

  2. pip install --no-binary=:all: https://github.com/graphite-project/carbon/tarball/master

  3. pip install --no-binary=:all: https://github.com/graphite-project/graphite-web/tarball/master


https://www.xamrdz.com/backend/3fc1917418.html

相关文章: