多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
部署环境:centos 7 #### 软件框架 graphite-web:web接口 `graphite-web-0.9.16` carbon:相当于network interface `python-carbon-0.9.16` whisper:相当于rrdtool `python-whisper` Django (1.6.11.6) django-tagging (0.3.1) #### 安装 ``` yum install graphite-web python-carbon python-whisper ``` 修改配置文件 修改/etc/graphite-web/local_settings.py ~~~ SECRET_KEY = '123qwe‘ ALLOWED_HOSTS = [ '*' ] TIME_ZONE = 'Asia/Shanghai‘ DEBUG = True DATABASES = { 'default': { 'NAME': '/opt/graphite/storage/graphite.db', 'ENGINE': 'django.db.backends.sqlite3', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '' } } from graphite.app_settings import * ~~~ 初始化数据库 ~~~ mkdir -p /opt/graphite/storage django-admin syncdb --settings=local_settings --pythonpath=. chown -R apache.apache /opt/graphite/storage ~~~ 启动 ~~~ /etc/init.d/carbon-cache start /etc/init.d/httpd restart ~~~ 若在docker下安装,需要如下操作 为carbon-cache提供配置文件后才能启动 ~~~ cp -r /etc/carbon/carbon.conf /usr/conf/carbon.conf ~~~ 存储间隔和时间 ~~~ /etc/carbon/storage-schemas.conf [traffic] pattern = ^traffic.* retentions = 10s:6h,1min:5d,10min:50d ~~~