Zabbix automatically discovers rules to monitor service units in Linux systems
1. Write a script in the scripts directory. The script content is as follows: 2. Write the configuration file in the /etc/zabbix_agentd.conf.d directory. The content is as follows: vim service_status.conf UserParameter=service.status,/usr/local/zabbix/scripts/service_status.sh 3. Restart zabbix_agentd: 4. Create a template in the zabbix web interface. The monitoring items of the template are done through automatic discovery rules. The contents of the automatic discovery rules are as follows: Definition of the key value of the monitoring item prototype: system.run[cat /tmp/service_status.txt | grep -w '{#SN}' | awk '{print $1" "$2" "$3" "$4}' | awk '{print $NF}',] 5. View the results in the latest data: Summarize The above is the process of Zabbix monitoring Linux system services introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Using JS to implement a simple calculator
>>: How to use Navicat to export and import mysql database
I have recently been developing a visual operatio...
This article example shares the specific code of ...
Preface Swap is a special file (or partition) loc...
Achieve results Implementation Code html <div ...
This article example shares the specific code of ...
Table of contents 1. Download steps 2. Configure ...
GitHub has all kinds of magic tools. Today I foun...
Benefits of using xshell to connect to Linux We c...
Overview UNION The connection data set keyword ca...
In actual development or production environments,...
In LINUX, periodic tasks are usually handled by t...
I have been engaged in Java web development for mo...
Icon icon processing solution The goal of this re...
Preface If our business is at a very early stage ...
Table of contents Overview Global hook function R...