标签:UI nts autoconf sts conf zab str pen notice
摘要: Grafana接入zabbix部署 阿里云ECS部署Grafana接入zabbix Grafana 是 Graphite 和 InfluxDB 仪表盘和图形编辑器。Grafana 是开源的,功能齐全的度量仪表盘和图形编辑器,支持 Graphite,InfluxDB 和 OpenTSDB。
阿里云ECS部署Grafana接入zabbix
Grafana 是 Graphite 和 InfluxDB 仪表盘和图形编辑器。Grafana 是开源的,功能齐全的度量仪表盘和图形编辑器,支持 Graphite,InfluxDB 和 OpenTSDB。
Linux: ECS_CentOS 7.2
nginx: 1.9.15
购买一台ECS
yum -y install gcc gcc-c++ autoconf automake zlib zlib-devel openssl openssl-devel pcre* make gd-devel libjpeg-devel libpng-devel libxml2-devel bzip2-devel libcurl-devel
useradd nginx -s /sbin/nologin -M
wget http://nginx.org/download/nginx-1.9.15.tar.gz && tar xvf nginx-1.9.15.tar.gz && cd nginx-1.9.15
./configure --prefix=/usr/local/product/nginx1.9.14 --user=nginx --group=nginx --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-pcre
make && make install
ln -s /usr/local/product/nginx1.9.14 /usr/local/nginx ==>创建软链接
--with-http_stub_status_module:支持nginx状态查询
--with-http_ssl_module:支持https
--with-http_spdy_module:支持google的spdy,想了解请百度spdy,这个必须有ssl的支持
--with-pcre:为了支持rewrite重写功能,必须制定pcre
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.3.2.linux-x64.tar.gz
tar -zxvf grafana-4.3.2.linux-x64.tar.gz
mv grafana-4.3.2 grafana
cd grafana/bin/
#查看可以安装的插件
./grafana-cli plugins list-remote
#安装zabbix插件
./grafana-cli plugins install alexanderzobnin-zabbix-app
#安装饼图插件
./grafana-cli plugins install grafana-piechart-panel
#启动,并后台运行
./grafana-server -homepath /opt/grafana/grafana &
[root@grafana conf]# mkdir extra
[root@grafana conf]# cd extra/
[root@grafana extra]# vim grafana.conf
server {
listen 80;
server_name grafana.dtstack.com;
access_log /data/logs/zabbix/grafana.dtstack.com.access.log main;
location / {
index index.html;
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
[root@grafana conf]# cat nginx.conf
user nginx;
worker_processes 1;
#error_log logs/error.log warning;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main ‘$remote_addr - $remote_user [$time_local] "$request" ‘
‘$status $body_bytes_sent "$http_referer" ‘
‘"$http_user_agent" "$http_x_forwarded_for"‘;
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
include extra/*.conf;
}
192.168.119.140 grafana.dtstack.com
访问http://grafana.dtstack.com admin/admin
启用zabbix插件
数据源配置 - 数据源
Name: zabbix
Default: ?
Type: Zabbix
## Http settings
URL: http://zabbix.dtstack.com/api_jsonrpc.php
Access: proxy
## Zabbix API details
Username: xxxxxx
Password: xxxxxx
标签:UI nts autoconf sts conf zab str pen notice
原文地址:http://www.cnblogs.com/iyulang/p/6957042.html