Analysis of Linux Zabbix custom monitoring and alarm implementation process

Analysis of Linux Zabbix custom monitoring and alarm implementation process

Target

Display one of the data in the iostat command in the zabbix front-end monitoring.

iostat Command

The iostat command is used to monitor the usage of system input and output devices and CPU.

Here we take out the tps item of disk sda. Note: tps: Transactions Per Second, the number of transactions processed per second.

Add monitoring items on the monitored end

Create the file iotps.conf under /etc/zabbix/zabbix_agentd.d

The format of custom monitoring items is: UserParameter=<key>,<shell command>

Restart the service: systemctl restart zabbix-agent

examine:

Test whether the client-defined monitoring items are normal on the monitoring end

Install the check tool: yum -y install zabbix-get

Detection:

Note: Because Server=192.168.1.71 is used in the agent /etc/zabbix/zabbix_agentd.conf file, 192 IP must also be used here

Add custom monitoring items on the monitoring front-end page

Configuration---Host---Monitoring items in the web01 row---Create monitoring items in the upper right corner of the page---

Click Add --- Monitor --- Latest Data --- Found an additional sda tps

Custom alarm

Configuration---Host---Corresponding trigger under the host---Create trigger in the upper right corner of the page

Click Add, double-click the web01 label in xshell to open the new port, and the following alarm will appear under Monitoring---Problems:

At this time, close an xshell tab and wait for a while

Note: If you want it to update faster, you can set the update interval in the corresponding monitoring item (here is Number of logged in users). The system default is 1 minute.

Add sound alarm

Click user settings in the lower left corner---Sending messages---check the front-end information. Since we are unclassified here, give unclassified a sound and click Update.

Email alarm (taking 163 mailbox as an example)

Get the authorization code

Management---Alarm Media Type---Create Media Type in the upper right corner of the page

Click Update, find the alarm media type you created on the page that appears, and click Test (Success)

Click Add, Configure---Action---Create an action in the upper right corner of the page

Click Add, then click Actions

Click Add, click User Settings---Alarm Media---Add in the lower left corner of the page

Click Add, click Update, then we use xshell to log in to the two web01 servers, and the mailbox receives the email:

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of monitoring Jenkins process based on zabbix
  • Detailed explanation of the process of Zabbix active, passive and web monitoring in distributed monitoring system
  • Distributed monitoring system Zabbix uses SNMP and JMX channels to collect data
  • Detailed explanation of Zabbix monitoring SQL Server service status
  • How to monitor mysql using zabbix
  • How to use filters to implement monitoring in Zabbix
  • How does Zabbix monitor and obtain network device data through ssh?
  • Detailed tutorial for upgrading zabbix monitoring 4.4 to 5.0
  • Detailed steps for adding hosts you need to monitor in zabbix
  • Using zabbix to monitor the ogg process (Windows platform)

<<:  MySQL stored procedures and common function code analysis

>>:  JavaScript to achieve mouse tailing effect

Recommend

JavaScript macrotasks and microtasks

Macrotasks and Microtasks JavaScript is a single-...

Installation steps of docker-ce on Raspberry Pi 4b ubuntu19 server

The Raspberry Pi model is 4b, 1G RAM. The system ...

Example code for implementing a simple search engine with MySQL

Table of contents Preface Introduction ngram full...

Implementing password box verification information based on JavaScript

This article example shares the specific code of ...

MySQL recursion problem

MySQL itself does not support recursive syntax, b...

Linux process management tool supervisor installation and configuration tutorial

Environment: CentOS 7 Official documentation: htt...

Use of environment variables in Docker and solutions to common problems

Preface Docker can configure environment variable...

HTML table tag tutorial (25): vertical alignment attribute VALIGN

In the vertical direction, you can set the row al...

Detailed explanation of the difference between chown and chmod commands in Linux

In Linux system, both chmod and chown commands ca...

Example of making XML online editor using js

Table of contents Preface The need for online XML...

Is mysql a relational database?

MySQL is a relational database management system....

Centos7.3 automatically starts or executes specified commands when booting

In centos7, the permissions of the /etc/rc.d/rc.l...

Detailed explanation of Mysql transaction isolation level read commit

View MySQL transaction isolation level mysql> ...

Writing daily automatic backup of MySQL database using mysqldump in Centos7

1. Requirements: Database backup is particularly ...