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 Vue lazyload picture lazy loading example

Documentation: https://github.com/hilongjw/vue-la...

SQL implementation of LeetCode (197. Rising temperature)

[LeetCode] 197.Rising Temperature Given a Weather...

CentOS 7 builds hadoop 2.10 high availability (HA)

This article introduces how to build a high-avail...

Vue gets token to implement token login sample code

The idea of ​​using token for login verification ...

How to configure MySQL master-slave replication under Windows

MySQL master-slave replication allows data from o...

A brief discussion on Axios's solution to remove duplicate requests

Table of contents 1. Cancel duplicate requests 2....

Vue3 navigation bar component encapsulation implementation method

Encapsulate a navigation bar component in Vue3, a...

Implementation of importing and exporting docker images

Docker usage of gitlab gitlab docker Startup Comm...

Hide HTML elements through display or visibility

Sometimes we need to control whether HTML elements...

Vue uses vue meta info to set the title and meta information of each page

title: vue uses vue-meta-info to set the title an...

jQuery clicks on the love effect

This article shares the specific code of jQuery&#...

Detailed explanation of CSS elastic box flex-grow, flex-shrink, flex-basis

The functions of the three attributes flex-grow, ...

Mysql string interception and obtaining data in the specified string

Preface: I encountered a requirement to extract s...

Detailed explanation of dynamically generated tables using javascript

*Create a page: two input boxes and a button *Cod...