Get the App
SLTechnology News&Howtos  ›  Servers  › 

CentOS 7.7 yum installation and configuration Zabbix 4.0 LTS details (4)

Shulou Source: shulou.com Published: 2022-06-02 02:26:31 11月18日 Update

I. Custom charts, integrating Grafana:

1. Custom charts:

(1) Create a chart:

Configuration --> Hosts --> Graphs --> Create graph --> Add

(2) View the chart:

Monitoring --> Graphs --> Host --> Graph

2. Zabbix Server integrates Grafana:

(1) Grafana Profile:

Grafana is a visual panel, with very beautiful charts and layout display, full-featured metrics dashboard and graphic editor, support Graphite, Zabbix, InfluxDB, Prometheus, OpenTSDB, Elasticsearch, etc. as data sources, optimize the display of graphics, can be used to monitor large screens, more flexible and powerful functions, rich plug-ins, support user authentication, but Grafana itself does not store data.

(2) zabbix-server node installation Grafana:

# vim /etc/yum.repos.d/grafana.repo

[tsinghua-grafana]

name=tsinghua grafana

baseurl=https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm/

enabled=1

gpgcheck=0

# yum -y install grafana

Note: grafana version 6.4.4 is installed

# rpm -ql grafana | less

Configuration file directory: /etc/grafana

Configuration file: /etc/grafana/grafana. ini, modify the following parameters

a、;http_addr = --> http_addr = 192.168.0.120

b. If you use the default port 3000, you do not need to modify: http_port = 3000

Log file: /var/log/grafana/grafana. log

sqlite3 database file: /var/lib/grafana/grafana. db

Note: Reference document grafana.com/docs/installation/rpm/

(3) Start Grafana:

# systemctl start grafana-server

# systemctl status grafana-server

# ps aux | grep grafana-server

# ss -tunlp | grep -w 3000

# tail -100 /var/log/grafana/grafana.log

# grafana-server -v

# grafana-server -h

(4) Configuration startup:

# systemctl daemon-reload

# systemctl enable grafana-server

(5) Visit http://192.168.0.120:3000 in the browser. The default username and password are admin.

New password root@123

(6) Grafana installation enables Zabbix plugins:

Zabbix does not exist in the data source by default: Add data source

# grafana-cli -v

# grafana-cli -h

Show all available plugins for Grafana:

# grafana-cli plugins list-remote

# grafana-cli plugins list-remote | grep -i zabbix

Install the Zabbix plug-in (choose one of the following methods):

a. Execute # grafana-cli plugins install alexanderzobnin-zabbix-app, which may be slow due to network reasons.

b. Download the plug-in https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.10.4/download, alexanderzobnin-grafana-zabbix-v3.10.4-1-g29a98f5.zip, upload it to/var/lib/grafana/plugins directory, and unzip it

Restart Grafana: # systemctl restart grafana-server

Grafana enables Zabbix plugins:

Configuration --> Plugins --> Zabbix --> Enable

Zabbix added to the data source:

(7) Configure Zabbix data sources:

URL: http://192.168.0.120/zabbix/api_jsonrpc.php, IP of Zabbix Server

Zabbix API details configure Zabbix Web username Admin and password root@123, Zabbix version 4.x:

(8) Import instrument panel:

(9) View default charts:

(10) Modify the default System load panel to add CPU loads of 1 minute and 5 minutes:

Save modifications:

(11) Custom panels:

Install plug-ins that support pie charts:

# grafana-cli plugins list-remote | grep pie

# grafana-cli plugins install grafana-piechart-panel

# systemctl restart grafana-server

Refresh page: Configuration --> Plugins

This plugin is enabled by default after installation

Save after modifying title:

(12) Set the latest time period for data display and the automatic refresh interval of web pages:

(13) Grafana adds Zabbix alerts:

Stop vsftpd on node-122 to trigger alarm:

(14) Grafana variables:

(15) Grafana large screen mode:

press Esc to exit

Note: Chrome Press F11 to enter full-screen mode

Tags: Plug-ins data charts configuration data sources files comments users panels support gauges dashboards features graphics large screen password time mode browser user name Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi NVidia macOS Microsoft MariaDB