Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to realize the report function of Monitoring and alarm Statistical Information by Zabbix

Shulou Source: shulou.com Published: 2022-06-01 04:00:47 10月01日 Update

This article mainly introduces Zabbix how to achieve monitoring alarm statistical information report function, the article is very detailed, has a certain reference value, interested friends must read it!

The requirements are as follows:

Using zabbix to monitor the alarm, due to the occurrence of a long time, more alarm times, busy personnel and so on, some alarm contents will be ignored, so we need a report to reflect who has received what kind of alarm information and how many alarm messages have been received, so as to judge whether these situations have been dealt with and the progress of processing, as well as better allocation of human resources.

The requirements analysis assumes:

1. Zabbix has its own report function, but this thing has its limitations and has not been found yet.

2. The information of the look-up table in the database is always judged twice to show the results.

Process:

The second method is chosen: database.

Take a look at the tables in the zabbix database and find out that the following three tables may have corresponding relationships:

In fact, my results here only use 1 table and 3 tables and 2 tables to display the results. in fact, there are many ways to present the results. * you may also need a "user group" table to display the results and manage the team members.

Here I present the results as follows: (application-level monitoring of the history of email alarms)

Message filtering sql:

Selectuserid,name,sum (casewhensubjectlike'%CPUsystime%'then1end) systime,sum (casewhensubjectlike'%CPUUSE%'then1end) cpuuse,sum (casewhensubjectlike'%DiskI%'then1end) diskio,sum (casewhensubjectlike'%availablememory%'then1end) mem,sum (casewhensubjectlike'%isunreachable%'then1end) downtime,sum (casewhensubjectlike'%restarted%'then1end) restart,sum (casewhensubjectlike'%hasbeenchanged%'then1end) passchange,sum (casewhensubjectlike'%Freedisk%'then1end) disk Sum (casewhensubjectnotlike'%CPU%'andsubjectnotlike'%availablememory%'andsubjectnotlike'%Disk%'andsubjectnotlike'%isunreachable%'andsubjectnotlike'%restart%'andsubjectnotlike'%hasbeenchanged%'andsubjectnotlike'%disk%'then1end) otherfrom (selecta.userid,c.name,a.subjectfromalertsa,userscwherea.mediatypeid='6'anda.clock > '1392220800'anda.clock'1392220800'anda.clock

Tags: Alarm result information function report monitoring content monitoring alarm situation data database statistics method time condition article email demand processing thing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker MariaDB Shulou Tech Info Linux Huawei