Detailed process of zabbix monitoring process and port through agent

Detailed process of zabbix monitoring process and port through agent

Environment Introduction

Operating system: centos 7.4

Zabbix version: zabbix server 3.4.7

Client: zabbix-agent 3.4.7

Monitoring process: mysqld

Monitoring port: 3306 tcp

Process Monitoring

Confirm that the client has been installed and the agent is running

View Process

View several processes belonging to that user

The mysql process is two processes of the root user

Add monitoring items

Write any name

Type zabbix-client

Key value selection process number return number

Application selection prosesesses process

proc.num[<name>,<user>,<state>,<cmdline>]

The following is the monitoring configuration of the MySQL process, and the parameter description in key.

<name> The first parameter is the process name. It is not necessary to fill it in. Filling it in will make the monitoring less accurate (only for personal testing)

<user> The second parameter is the user name of the running process

<state> The third one is the state of the process. The general selection all includes: all (default) , run , sleep , zomb

The fourth parameter of <cmdline> is used to specify the characters contained in the process name to filter the processes.

Confirm Update

Create a trigger

Select the monitoring item you just created

insert

Modify {hgh3a01:proc.num[,root,all,mysqld].last()}=0

for

{hgh3a01 : proc.num[,root,all,mysqld] . max(#2)}=2

hgh3a01 : host name

proc.num[,root,all,mysqld] :monitoring items

max(#2)}=2 : Indicates that the values ​​received the last two times are both 2 processes (ps -ef shows that there are two mysqld processes, so value = 2), indicating that the mysqld process is running, and an alarm is triggered.

Because we want to test whether the alarm can be triggered, we need to select =2. Normal <1 means it is not running.

Wait a few minutes to see if the trigger can be triggered.

Receive email warning

Change the test process to normal (because mysql runs two processes, I set the trigger to issue an alarm when the number of processes is less than two)

Save the update and observe whether it returns to normal

Monitoring Port

Add monitoring items

Modify port save update

Same as monitoring process (test first)

Receive trigger warnings

Adjust the previous value to 0

Test returned normal

This is the end of this article about zabbix monitoring processes and ports through agent. For more relevant zabbix monitoring processes and ports content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to monitor oracle database using zabbix agent2
  • How to deploy zabbix_agent in docker
  • Installation and configuration method of Zabbix Agent on Linux platform
  • Install and configure Zabbix Agentd on Windows
  • Zabbix implements batch monitoring of port status
  • How to monitor multiple JVM processes in Zabbix

<<:  JavaScript flow control (branching)

>>:  10 issues that must be considered when designing and building large-scale website architecture

Recommend

Detailed explanation of how Zabbix monitors the master-slave status of MySQL

After setting up the MySQL master-slave, you ofte...

mysql5.7.21 utf8 encoding problem and solution in Mac environment

1. Goal: Change the value of character_set_server...

Solve the problem of margin merging

1. Merge the margins of sibling elements The effe...

WeChat applet learning wxs usage tutorial

What is wxs? wxs (WeiXin Script) is a scripting l...

Use CSS to easily implement some frequently appearing weird buttons

background In the group, some students will ask r...

Details after setting the iframe's src to about:blank

After setting the iframe's src to 'about:b...

MySQL 5.7.18 installation tutorial under Windows

This article explains how to install MySQL from a...

How to Enable or Disable Linux Services Using chkconfig and systemctl Commands

This is an important (and wonderful) topic for Li...

Installation and configuration tutorial of MongoDB under Linux

MongoDB Installation Choose to install using Yum ...

Brief analysis of the various versions of mysql.data.dll driver

Here is the mysql driver mysql.data.dll Notice: T...

A brief discussion on the types of node.js middleware

Table of contents Overview 1. Application-level m...

Advanced and summary of commonly used sql statements in MySQL database

This article uses examples to describe the common...

Sample code for displaying a scroll bar after the HTML page is zoomed out

Here is a record of how to make a scroll bar appe...