How to configure auto registration in Zabbix ?

[et_pb_section admin_label=”section”]
[et_pb_row admin_label=”row”]
[et_pb_column type=”4_4″]
[et_pb_text admin_label=”Text”]
It is possible to allow active Zabbix agent auto-registration, after which the server can start monitoring them. This way new hosts can be added for monitoring without configuring them manually on the front end.

Auto registration can happen when a previously unknown active agent asks for checks.

The feature might be very handy for automatic monitoring of new Cloud nodes. As soon as you have a new node in the Cloud Zabbix will automatically start the collection of performance and availability data of the host.

Active agent auto-registration also supports the monitoring of added hosts with passive checks. When the active agent asks for checks, providing it has the ‘ListenIP’ or ‘ListenPort’ configuration parameters defined in the configuration file, these are sent along to the server. (If multiple IP addresses are specified, the first one is sent to the server.)

Server, when adding the new auto-registered host, uses the received IP address and port to configure the agent. If no IP address value is received, the one used for the incoming connection is used. If no port value is received, 10050 is used.



How to install Zabbix Agent 3.4 ?

How to Configure Zabbix Agent ?

Step 1 — Configure Front end for auto-registration

Now you need to configure the frontend. We will create 2 actions, one for all hosts Linux and two for all hosts windows, naturally, we can have a much higher granularity (example : WebServer, DB, Cache…) and be able to apply specific templates and put them in such a specific group.

Go to the front end : Configuration —> Action  and in drop-down menu “Event source“, select Auto-Registration.

For Linux :

  • Name: Linux host autoregistration
  • Conditions: Host metadata like Linux (case sentive)
  • Operations: Link to templates: Template OS Linux

For Windows :

  • Name: Windows host autoregistration
  • Conditions: Host metadata like Windows (case sentive)
  • Operations: Link to templates: Template OS Windows

Step 2 — Configure Zabbix Agent for auto-registration

To make the auto-registration, we will use host metadata. Host metadata is configured in the agent configuration file, zabbix_agentd.conf.

There are 2 ways of specifying host metadata in the configuration file:

1st example with HostMetaData :

Using host metadata to allow some basic protection against unwanted hosts registering.

Add the next line to the agent configuration file (Linux or Windows) “/etc/zabbix/zabbix_agentd” or “C:\Zabbix\zabbix_agentd.confg“, You can put what you want in HostMetadata.

Do not forget to restart zabbix agent


2nd example with HostMetadataItem :

The second thing to do is configuring the agents. Add the next line to the agent configuration file

The variable system.uname detected automatically the operating system used, example “Linux” or “Windows”.

An example of host metadata in this case

To finish do not forget to restart zabbix agent


Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer