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

Vue folding display multi-line text component implementation code

Folding display multi-line text component Fold an...

HTML table tag tutorial (8): background image attribute BACKGROUND

Set a background image for the table. You can use...

How to run py files directly in linux

1. First create the file (cd to the directory whe...

js code to realize multi-person chat room

This article example shares the specific code of ...

Summary of Operator Operations That Are Very Error-Prone in JavaScript

Table of contents Arithmetic operators Abnormal s...

Detailed explanation of how to cleanly uninstall Docker

First, the server environment information: Reason...

A detailed introduction to deploying RabbitMQ environment with docker

Prerequisites: Docker is already installed 1. Fin...

Web page experience: Web page color matching

<br />The color of a web page is one of the ...

HTML Grammar Encyclopedia_HTML Language Grammar Encyclopedia (Must Read)

Volume Label, Property Name, Description 002 <...

CSS to achieve the effect of rotating flip card animation

The css animation of the rotating flip effect, th...

Creating Responsive Emails with Vue.js and MJML

MJML is a modern email tool that enables develope...

MySQL slow query method and example

1. Introduction By enabling the slow query log, M...

How to build a SOLO personal blog from scratch using Docker

Table of contents 1. Environmental Preparation 2....