Zabbix-3.0.3 combines Grafana-3.1.0 to give you the drawing you want

Source: Internet
Author: User
Tags grafana influxdb

Zabbix-3.0.3 combines Grafana-3.1.0 to give you the drawing you want
GuideGrafana is a Graphite and InfluxDB dashboard and graphic editor. Grafana is an open-source, fully functional measurement dashboard and graphic editor that supports Graphite, InfluxDB, and OpenTSDB. Grafana features: flexible and rich graphical options, mixed style, daytime and nighttime modes, multiple data sources, Graphite and InfluxDB query editors.

Grafana Installation

Install Grafana source package on Linux (CentOS, Fedora, OpenSuse, Redhat)

1. You can use yum to directly install Grafana.
yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1468321182.x86_64.rpm
2. Install the latest stable version.

# In CentOS, Redhat/Fedora: manually install

yum install initscripts fontconfig
rpm -Uvh grafana-3.1.0-1468321182.x86_64.rpm

# Install On OpenSuse:
Rpm-I -- nodeps grafana-3.1.0-1468321182.x86_64.rpm

3. Install the via yum repository and configure the grafana Source
cat /etc/yum.repos.d/grafana.repo

[Grafana]
Name = grafana
Baseurl = https://packagecloud.io/grafana/stable/el/6/?basearch
Repo_gpgcheck = 1
Enabled = 1
Gpgcheck = 1
Gpgkey = https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
Sslverify = 1
Sslcacert =/etc/pki/tls/certs/ca-bundle.crt
# If you want to experience the test version, you can change the test link.

baseurl=https://packagecloud.io/grafana/testing/el/6/$basearch

# Install grafana using yum

yum install –y grafana

# Rpm gpg Key
# These RPMs are signatures. You can use the public GPG key to verify the signature,
# Public key download: https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana

4. Installation Package details

►Binary/usr/sbin/grafana-server
►Service management script/etc/init. d/grafana-server
►Install the default file/etc/sysconfig/grafana-server
►Configuration file/etc/grafana. ini
►Install the systemd Service (if the systemd available grafana-server.service
►Log file/var/log/grafana. log
►The default configuration specifies a database sqlite3/var/lib/grafana. db

5. Start Grafana
service grafana-server start

# Set garfana-server to enable auto-start upon startup

chkconfig grafana-server on

# Start the server (via systemd)

systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server

# Set auto-start systemd Service

systemctl enable grafana-server.service
6. Environment Variable File

When running the Systemd and daemon services in the background, you can use the/etc/sysconfig/grafana-server File to set environment variables, you can modify the garfana-server File to set other variables such as the log directory.
# Default log File:/var/log/grafana
# Database settings
# The default configuration specifies that a sqlite3 database is located in/var/lib/grafana. db. Back up the database before the upgrade. You can also use the MySQL or ipvs Grafana database.

7. Access Test

# Enter http: // 10.1.1.103: 3000/login in the address bar
# Default User and password: admin

Install garfana-zabbix plug-in

Https://github.com/alexanderzobnin/grafana-zabbix
Wiki: http://docs.grafana-zabbix.org/installation/

Install using grafana-cli

# Getting the list of available plug-ins

grafana-cli plugins list-remote

# Install the zabbix plugin

grafana-cli plugins install alexanderzobnin-zabbix-app

# Restart the garfana service after installing the plug-in

service grafana-server restart

# Use the grafana-zabbix-app source, which contains the latest version of the plug-in

cd /var/lib/grafana/plugins/

# Clone grafana-zabbix-app plug-in Project

git clonehttps://github.com/alexanderzobnin/grafana-zabbix-app

# Note: if you do not have git, install git first.

yum –y install git

# Restart the garfana service after the plugin is installed

service grafana-server restart

#Note: in this way, you can upgrade the plug-in through containers.

cd /var/lib/grafana/plugins/grafana-zabbix-app
git pull
service grafana-server restart
Install with source code package

# NodeJS, npm, and Grunt are required for source code installation.

git clone https://github.com/alexanderzobnin/grafana-zabbix.git
cd grafana-zabbix
npm install
npm install -g grunt-cli
grunt

# The plug-in will be built into the dist/directory. Then you can copy it to your grafana plug-in directory or specify the path for compiling the plug-in the grafana configuration file.
[Plugin. zabbix]
Path =/home/your/clone/dir/grafana-zabbix/dist
# Execute the following command to update an update:

git pull
grunt

# Restart the grafana Service

service grafana-server restart
systemctl restart grafana-server
Configure Grafana to enable the plug-in

# Log on to grafana, move to the plug-in the left-side pane of grafana, select the Application tab, select the "configuration" tab, open Zabbix, and enable the plug-in.
# Configure the Zabbix Data Source
# Add a new data source. Open the Zabbix data source on the panel and click "add data source" and select Zabbix from the drop-down list.
# Note the place marked by the Red Line. Set "Name" to "Type" to Zabbix. Enter the Url used to access zabbix-web, and add the PHP file of zabbix-api, the Zabbix details username and password must be set on the Zabbix-web page. In this article, the username is gafana and the password is grafana. If you do not want to create a new account, you can use the Zabbix initial user. after setting is complete, click Add to bring up:

# The Zabbix version of this tutorial is Zabbix-3.0.3, detailed configuration tutorial, see the official documentation: http://docs.grafana-zabbix.org/installation/configuration/
# Common error solution see: http://docs.grafana.org/installation/troubleshooting/

Get started with Grafana-ZabbixAdd a new graphic panel to the dashboard

Create CPU load graphics

Add multiple metrics to a chart

# You can use regular expressions in the measurement field to generate charts of a large number of projects. Grafana is implemented using a JavaScript regular expression. For example, if you want to display the CPU time (user, system, iowait, etc.), you can use a regular expression to create a graph in the item field:

/CPU (?! Idle). * time/

# Use a regular expression to compare the same monitoring metrics of different hosts./. */Indicates matching all,/^ salt/matches the options starting with salt. Take the CPU system time displayed on all hosts as an example:

# Create an image to display MySQL query data statistics, select a group, host, application, and use/MySQL. * operations/to match different operations

You can set the value of Max data points to 50 to adjust the Display Effect of the image.

Drawing with Singlestat and Gauges

View All images

Save the created dashboard

Grafana plug-in Installation

# Plug-In link: https://github.com/grafana/grafana
# Installing a Panel
# Use grafana-cli to install Clock under the command line

grafana-cli plugins install grafana-clock-panel

# Install apps and Worldping

grafana-cli plugins install raintank-worldping-app

# Install Data source. Use SimpleJson as an example.

grafana-cli plugins install grafana-simple-json-datasource

# After installation is complete, a message is prompted to restart the grafana service.

/etc/init.d/grafana-server restart

# Plug-in usage and dashboard template Import
# Demonstrate Worldping usage
# Install and use grafana-zabbix.
Official Address: http://docs.grafana-zabbix.org
Demo: http://play.grafana.org/
Github: https://github.com/grafana/grafana

Address: http://www.linuxprobe.com/zabbix-with-grafana.html


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.