Grafana introduction

Grafana is an open source data visualization tool developed in the Go language that allows you to flexibly configure various ICONS to display monitored data.

Zabbix is an enterprise-class, highly mature, distributed open source monitoring solution capable of monitoring the health and integrity of numerous network parameters and servers. Test interview Guide

Grafana can access Zabbix data for presentation.

What is his vision for the Grafana + Zabbix solution?

  • Install zabbix-Server on any computer, and then install Zabbix-Agent on the performance server under test. In this way, you can send various monitoring data of the performance server to Zabbix-Server during the performance test
  • Install Grafana on any computer, and then install the Zabbix plug-in to make Grafana support Zabbix
  • In Grafana, configure Zabbix-Server as the data source and add a display panel so that the data for the performance servers under test monitored with Zabbix is displayed in Grafana.

Okay, now that you’re clear, let’s get started!

ⅰ. Install Zabbix

Select a server and install zabbix-Server and Zabbix-Agent. For details, see

Install zabbix in centos8

ⅱ. Zabbix-agent is installed on the performance server

Install zabbix-Agent on the tested server. For details, see

Added Zabbix resource monitoring for Linux

ⅲ. Grafana installation

Installation method 1: Install it directly

# centos wget https://dl.grafana.com/oss/release/grafana-7.1.3-1.x86_64.rpm sudo yum install grafana 7.1.3-1. X86_64. RPM # reference: https://grafana.com/grafana/downloadCopy the code

Installation method 2: Container installation

Perform:

Docker run - d - name = grafana2 -p 7777:3000 - v/var/lib/grafana: / var/lib/grafana grafana/grafana: 3.0.4Copy the code

Install zabbix in grafana

Centos (corresponding to method 1 above)

Grafana -cli plugins install alexanderzobnin-zabbix-app Restart grafana systemctl restart grafana-serverCopy the code

Docker container installation (corresponding to method 2 above)

Grafana -cli plugins install alexanderzobnin-zabbix-app. Grafana -cli plugins install alexanderzobnin-zabbix-app Docker restart specifies the name of the dockerCopy the code

Note: this plugin may take a bit longer to install

V. Grafana with Zabbix

Browser access: http://IP of the machine where Grafana is installed: port (default 3000) Login account/password: admin/admin

Enter plug-in Plugin management

Search for the Zabbix plug-in

Click the “Enable” button

Configure the database resource datasource

Fill in name, the name can be defined by yourself; Add HTTP URL: http://zabbix-server Machine IP: port (if zabbix-server uses nginx, the default port is 80)/api_jsonrpc.php; Access Select Server(default). Scroll down

Fill in the Zabbix login account/password: Admin/ Zabbix in the Zabbix API Details and click the “Save & Test” button at the bottom. If the following figure is displayed, the vm is successfully added.

If the following information occurs, check whether the HTTP URL address and zabbix account password are faulty. If all is correct, the picture below is also prompted, you can wait for a short time to save.

The introduction of panel

Enter 8677\6098 and click [Load]

In Zabbix Server, select the previously added data Source and click the [Import] button

For more panel templates, search the official website. More templates

ⅵ. Performance test execution and monitoring

  • Open JMeter and write scripts to invoke the services of the server under performance test to achieve performance test.
  • In the Grafana panel, check out the chart shown “Test Interview Guide”

Note: In grafana, the data of the monitored server cannot be displayed normally. Check the values of ‘group’ and ‘host’ in the upper left corner of the panel in grafana. Then, check whether the groups of monitored performance servers are consistent when configuring hosts in the front end of zabbix-Server. Ensure that the groups are consistent.

Well, now we have a new performance test monitoring solution.