Grafana tutorial: docker installation and basic use (add data source, add dashboard, alert notification settings, dashboard alert settings)

What is Grafana

​Grafana
is a visualization panel (Dashboard) with very beautiful charts and layout displays, a full-featured metrics dashboard and a graphical editor. Support Graphite, zabbix, InfluxDB, Prometheus and OpenTSDB as data sources.
Grafana main features:

  • Flexible and rich graphical options;
  • Multiple styles can be mixed; support day and night mode;
  • Multiple data sources.

Grafana installation

(1) Download mirror

docker pull grafana/grafana

(2) Create a container

docker run ‐d ‐p 3001:3000 ‐e INFLUXDB_HOST=influxsrv ‐e INFLUXDB_PORT=8086 ‐e INFLUXDB_NAME=cadvisor ‐e INFLUXDB_USER=cadvisor ‐e INFLUXDB_PASS=cadvisor ‐‐link influxsrv:influxsrv ‐‐name grafana grafana/grafana

(3) Access

http://192.168.184.144:3001

Username and password are both admin

Use of Grafana

1 Add data source

(1) Click Settings, DataSource
insert image description here
(2) Click to add data source
insert image description here
(3) Name the data source, specify the type, address, and connected database name, user name and password and
insert image description here
click Save. Data source created successfullyinsert image description here

2 Add Dashboard

(1) Select Dashboards --Manager
insert image description here
(2) Click the "Add" button
(3) Click the Graph icon
insert image description here

(4) The following chart interface appears, click Panel Title and select Edit
insert image description here
(5) Define basic information such as the title
insert image description here

(6) Set the query information to memory and specify the container name
insert image description here

(7) Specify the unit of the y-axis as M
insert image description here

(8) Save
insert image description here

Fill in the name

insert image description here

3 Alert notification settings

(1) Select the menu alerting–> Notification channels
insert image description here

(2) Click the Add channel button
insert image description here

(3) Fill in the name, select the type as webhook, and fill in the hook address
insert image description here

This hook address is the address of the previous expansion of the base microservice
insert image description here

(4) Click the SendTest test to observe whether the basic microservice adds a container

(5) Click save to save

(6) Add the shrink address in the same way

4 Dashboard warning settings

(1) Open the dashboard just edited again
insert image description here

(2) Click Create Alert
insert image description here

Set warning line
(3) Select notification
insert image description here

save Changes

Guess you like

Origin blog.csdn.net/a772304419/article/details/132081783