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
Without further ado, let’s run the screenshot dir...
Generally speaking, the mouse is displayed as an u...
When writing a Dockerfile, include an entrypoint ...
You may often see the following effect: That’s ri...
Yesterday when I was implementing the function of...
Calculation of the box model <br />Margin + ...
The test environment of this experiment: Windows ...
Table of contents 1. Error message 2. Cause of er...
Angularjs loop object properties to achieve dynam...
Because if there is no forward slash at the end of...
Table of contents 1. Switch between production en...
Table of contents The effect of mixed inheritance...
Table of contents 1. What is an Operating System ...
Click here to return to the 123WORDPRESS.COM HTML ...
Scenario: As the amount of data increases, the di...