grafana安装配置

2019-02-28  本文已影响0人  AsiaYo

安装grafana

$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.1-1.x86_64.rpm
$ yum -y install grafana-5.0.1-1.x86_64.rpm
$ /etc/init.d/grafana-server start
$ grafana-cli plugins list-remote
id: abhisant-druid-datasource version: 0.0.5
id: akumuli-datasource version: 1.2.8
id: alexanderzobnin-zabbix-app version: 3.9.1
id: andig-darksky-datasource version: 1.0.0
id: ayoungprogrammer-finance-datasource version: 1.0.0
id: belugacdn-app version: 1.2.0
id: bessler-pictureit-panel version: 1.0.0
id: blackmirror1-singlestat-math-panel version: 1.1.5
id: blackmirror1-statusbygroup-panel version: 1.1.1
id: bosun-app version: 0.0.28
id: briangann-datatable-panel version: 0.0.6
id: briangann-gauge-panel version: 0.0.6
id: btplc-alarm-box-panel version: 1.0.7
id: btplc-peak-report-panel version: 0.2.3
id: btplc-status-dot-panel version: 0.2.3
id: btplc-trend-box-panel version: 0.1.9
id: camptocamp-prometheus-alertmanager-datasource version: 0.0.6
id: citilogics-geoloop-panel version: 1.1.1
id: cloudflare-app version: 0.1.3
id: crate-datasource version: 0.5.1
id: dalmatinerdb-datasource version: 1.0.5
id: ddurieux-glpi-app version: 1.3.0
id: devicehive-devicehive-datasource version: 2.0.1
id: digiapulssi-breadcrumb-panel version: 1.1.4
id: digiapulssi-organisations-panel version: 1.1.0
id: digrich-bubblechart-panel version: 1.1.0
id: fastweb-openfalcon-datasource version: 1.0.0
id: fatcloud-windrose-panel version: 0.7.0
id: fetzerch-sunandmoon-datasource version: 0.1.2
id: flant-statusmap-panel version: 0.0.2
id: foursquare-clouderamanager-datasource version: 0.9.2
id: fzakaria-simple-annotations-datasource version: 1.0.0
id: gnocchixyz-gnocchi-datasource version: 1.7.0
id: goshposh-metaqueries-datasource version: 0.0.1
id: grafana-azure-data-explorer-datasource version: 1.0.0
id: grafana-azure-monitor-datasource version: 0.2.2
id: grafana-clock-panel version: 0.1.0
id: grafana-example-app version: 1.0.1
id: grafana-influxdb-08-datasource version: 1.0.2
id: grafana-influxdb-flux-datasource version: 5.1.0
id: grafana-kairosdb-datasource version: 3.0.1
id: grafana-kubernetes-app version: 1.0.1
id: grafana-piechart-panel version: 1.3.3
id: grafana-polystat-panel version: 1.0.14
id: grafana-simple-json-datasource version: 1.4.0
id: grafana-worldmap-panel version: 0.1.2
id: gridprotectionalliance-openhistorian-datasource version: 1.0.2
id: gridprotectionalliance-osisoftpi-datasource version: 1.0.3
id: hawkular-datasource version: 1.1.1
id: ibm-apm-datasource version: 0.8.0
id: instana-datasource version: 1.3.0
id: jasonlashua-prtg-datasource version: 4.0.3
id: jdbranham-diagram-panel version: 1.4.4
id: kentik-app version: 1.3.1
id: larona-epict-panel version: 1.0.0
id: linksmart-hds-datasource version: 0.3.0
id: linksmart-sensorthings-datasource version: 1.1.0
id: marcuscalidus-svg-panel version: 0.2.0
id: michaeldmoore-annunciator-panel version: 1.0.0
id: monasca-datasource version: 1.0.0
id: monitoringartist-monitoringart-datasource version: 1.0.0
id: moogsoft-aiops-app version: 7.0.1
id: mtanda-google-calendar-datasource version: 1.0.4
id: mtanda-heatmap-epoch-panel version: 0.1.7
id: mtanda-histogram-panel version: 0.1.6
id: natel-discrete-panel version: 0.0.8-pre
id: natel-influx-admin-panel version: 0.0.5
id: natel-plotly-panel version: 0.0.5
id: natel-usgs-datasource version: 0.0.2
id: neocat-cal-heatmap-panel version: 0.0.3
id: novalabs-annotations-panel version: 0.0.1
id: ns1-app version: 0.0.7
id: ntop-ntopng-datasource version: 1.0.0
id: opennms-helm-app version: 2.0.0
id: ovh-warp10-datasource version: 2.1.1
id: percona-percona-app version: 1.0.0
id: petrslavotinek-carpetplot-panel version: 0.1.1
id: praj-ams-datasource version: 1.0.1
id: rackerlabs-blueflood-datasource version: 0.0.2
id: radensolutions-netxms-datasource version: 1.1.0
id: raintank-snap-app version: 0.0.5
id: raintank-worldping-app version: 1.2.4
id: ryantxu-ajax-panel version: 0.0.5
id: ryantxu-annolist-panel version: 0.0.1
id: satellogic-3d-globe-panel version: 0.1.0
id: savantly-heatmap-panel version: 0.2.0
id: sbueringer-consul-datasource version: 0.1.5
id: sidewinder-datasource version: 0.2.0
id: skydive-datasource version: 1.0.1
id: smartmakers-trafficlight-panel version: 1.0.0
id: sni-pnp-datasource version: 1.0.5
id: sni-thruk-datasource version: 1.0.0
id: snuids-radar-panel version: 1.4.1
id: snuids-trafficlights-panel version: 1.4.2
id: stagemonitor-elasticsearch-app version: 0.83.2
id: udoprog-heroic-datasource version: 0.1.0
id: vertamedia-clickhouse-datasource version: 1.8.0
id: vonage-status-panel version: 1.0.8
id: voxter-app version: 0.0.1
id: yesoreyeram-boomtable-panel version: 0.4.6
id: zuburqan-parity-report-panel version: 1.0.1

我们看到第三个插件alexanderzobnin-zabbix-app version: 3.9.1是我们要安装的zabbix插件,命令:

$ grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 3.9.1
from url: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.9.1/download
into: /var/lib/grafana/plugins

✔ Installed alexanderzobnin-zabbix-app successfully 

Restart grafana after installing plugins . <service grafana-server restart>

显示安装成功,重启grafana服务

配置grafana并添加mysql和zabbix插件

用户名密码填写zabbix的用户名和密码。Direct DB Connection这里可选可不选,选择的好处是

Select SQL Data Source for Zabbix database. In order to use this feature you should create and configure it first. Zabbix plugin uses this data source for querying history data directly from database. This way usually faster than pulling data from Zabbix API, especially on the wide time ranges, and reduces amount of data transfered.

大概是说直接连接数据库获取数据比zabbix-api的方式要更快,更加节省资源。因为刚才我已经创建了zabbix-mysql所以我选择了直连mysql,如果没创建mysql的话SQL Data Source这里是没有数据库选项的。

上一篇下一篇

猜你喜欢

热点阅读