# Auto Registration Hosts Zabbix

Auto Registration is very helpful if we are monitoring the large subnet of network with identical machines. Auto registration helps to automatically index these hosts on the zabbix dashboard with needing to configure each hosts individually.

***

First we will navigate to `Alerts > Actions > Auto registration Actions` & then perform the following configurations :&#x20;

<figure><img src="https://2332860236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq6mjlFfyDOi3mV0lemKE%2Fuploads%2FkkCaA7Tbv1gfGvAg1KFZ%2Fimage.png?alt=media&#x26;token=a09e54c7-b3fa-47ad-bba6-1926e01d60c3" alt=""><figcaption></figcaption></figure>

On the top right section we will use `Create Action` to create new action and we will enter the following configurations :&#x20;

<figure><img src="https://2332860236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq6mjlFfyDOi3mV0lemKE%2Fuploads%2FAYKPEjC8BdoXL8QpkTZu%2Fimage.png?alt=media&#x26;token=06e43542-38ce-4f9f-803f-3fc0f8f95d50" alt=""><figcaption></figcaption></figure>

We will select the `Operations` tab and enter the auto-registration configurations , Adding host and associating it with the templete.

<figure><img src="https://2332860236-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq6mjlFfyDOi3mV0lemKE%2Fuploads%2FkcQWGxtsrYGlSU0BsEdM%2Fimage.png?alt=media&#x26;token=1d48a0d2-5cf9-4193-a259-2e125d70312b" alt=""><figcaption></figcaption></figure>

***

## Adding Hosts&#x20;

Now we will install the zabbix agent in one of the zabbix servers and edit the following configurations:&#x20;

To install the agent on the linux we can refere the installation section and install the zabbix agent.

{% content-ref url="zabbix-installation" %}
[zabbix-installation](https://ghoulsec.gitbook.io/ghoulsec-vault/security-operations/zabbix-nms/zabbix-installation)
{% endcontent-ref %}

One installed we will edit the config file :&#x20;

```bash
sudo nano /etc/zabbix/zabbix-agent.conf
```

We will change the following parameters inside the config file :&#x20;

```bash
# Server 
Server = <Server IP>
Server Active = <Server IP>
# Hostname
Hostname = <Your_HOSTNAME>
# Host Metadata
HostMetadata = Linux Servers
# Ensure Host Metadata is same given in the zabbix autoregistration action

# Interface
HostInterface = <HOST_IP>
```

Once done we will restart the service and we will see the autoregistered host on the dashboard in few mins.

```bash
sudo systemctl restart zabbix-agent
```
