In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to automatically add hundreds of Zabbix monitoring, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Zabbix automation can be divided into three general directions:
Automatic addition of Zabbix Agent
Zabbix Discovery automatic discovery
Use Zabbix API
So today let's talk about the automatic addition of Zabbix Agent.
Zabbix Agent active registration means that when we add a new server, install Zabbix Agent, and configure the IP address of Zabbix Server, Zabbix Agent actively contacts Zabbix Server,Zabbix Server to receive the connection of Agent, and automatically adds them to Host according to the characteristics of Agent and corresponding policies, and can automatically associate the corresponding monitoring templates according to the relevant characteristics.
Zabbix Agent configuration
We need to enable active registration of ZabbixAgent. First, we need to configure ZabbixAgent.
IP address of ServerActive=Zabbix Server
Hostname=auto.example.com
# set the hostname. If not, HostnameItem is used by default to obtain the hostname. By default, HostnameItem=system.hostname, so you can get the hostname of Agent.
# HostMetadata=nginx
# HostMetadata is used to define the metadata of the host. It is used when registering automatically. It cannot be greater than 255characters. If it is not set, it can be obtained from HostMetadataItem by default.
HostMetadataItem=system.uname
# HostMetadataItem is also used to define the metadata of the host. It cannot be greater than 255characters when automatically registering. The Item set here refers to the monitoring item included with Zabbix. Note that this value only takes effect when HostMetadata is not set.
Zabbix Action configuration
After configuring Agent, we configure an Action on the Web interface. The steps are:
Configuration > action > > Eventsource (choose Auto registration) > > CreateAction.
You can customize one name, and the other ones are fine by default.
Action Tab
Conditions Tab
We need to define the required conditions in Conditions, and here we choose Host metadata like Linux. This just matches the HostMetadataItem=system.uname that we set in the agent configuration file.
Operations Tab
Next we configure the Operations tab to tell Action what to do when the condition is matched. Below, we have configured three actions. After a request is initiated by a qualified activehost, the following actions will be performed:
Add agent to the host list
Add agent to the linuxservers group
Agent host link template Template OS linux
After this configuration, the new Agent is automatically added to the host monitor by Zabbix Server and the template is automatically linked.
It is important to emphasize that you need to change the monitoring type in the template to Zabbix Agent (active).
Currently, auto-registration does not generate an event, so you can't see Zabbix Server automatically add a host in Event.
Thank you for reading this article carefully. I hope the article "how to automatically add hundreds of Zabbix monitors" shared by the editor will be helpful to everyone. At the same time, I also hope you can support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.