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 analysis of replication in Mysql

1.MySQL replication concept It means transferring...

A brief discussion on the use of React.FC and React.Component

Table of contents 1. React.FC<> 2. class xx...

Examples of optimistic locking and pessimistic locking in MySQL

The task of concurrency control in a database man...

...

Blog Design Web Design Debut

The first web page I designed is as follows: I ha...

Common commands for deploying influxdb and mongo using docker

Deploy database based on docker sudo docker pull ...

Learn the common methods and techniques in JS arrays and become a master

Table of contents splice() Method join() Method r...

Vue3.0+vite2 implements dynamic asynchronous component lazy loading

Table of contents Create a Vite project Creating ...

UDP connection object principle analysis and usage examples

I wrote a simple UDP server and client example be...

Solve the problem of blocking positioning DDL in MySQL 5.7

In the previous article "MySQL table structu...

JS implements the dragging and placeholder functions of elements

This blog post is about a difficulty encountered ...

Detailed explanation of fetch network request encapsulation example

export default ({ url, method = 'GET', da...

Docker network mode and configuration method

1. Docker Network Mode When docker run creates a ...