Zabbix configuration

Zabbix user and permissions

Zabbix user used by this extension must have READ access to all host groups. The user doesn't require Frontend access or Admin permissions if this user is used only by this integration. First, we need to create a User group with correct permissions and then create a user who will be a member of created group.

Create user group

  1. In Administration->User groups click on Create user group

  2. In User groups view define the Group name, for example, ZabbixAPI

  3. Frontend access change to Disabled

  4. Click on Permissions to switch to the Permissions tab

  5. Click on the Select button and then click on the Name checkbox which selects all Host groups, then click on the Select button

  6. Click on the Read button

  7. Click on Add link above Add button. Permissions will be changed to the Read

  8. Click on the Add button

Create user

The user type is Zabbix User.

  1. In Administration->Users click on Create user

  2. In Users view define the Alias

  3. Set password

  4. Select group created in the previous step, in our case ZabbixAPI

  5. Click on Add button

Zabbix configuration to discover IP addresses for hosts

This is an optional feature. It’s not required for the extension to work.

The goal is an automatic IP address discovery for all host interfaces (exclude loopback) and to populate inventory data. Zabbix inventory field Host networks is populated by Zabbix item IP addresses of network interfaces with item key interfaces.

The inventory field and item are defined in the attached template. The Zabbix item key interfaces is used by the ActiveGate extension to retrieve the interface list for hosts. If you change the item key in template and agent configuration, the new item key must be updated in the ActiveGate extension's endpoint configuration in the field Interfaces key

Installation

  1. Import Zabbix template  zbx_export_templates_IP_inventory.xml

  2. Update Zabbix agent configuration file

  • LINUX / UNIX - Add the following line to config and restart the agent

    • UserParameter=interfaces,hostname -I

  • Windows Server - Add following line to config and restart the agent

    • UserParameter=interfaces,C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -nologo -command "Get-WmiObject Win32_NetworkAdapterConfiguration | Where { $_.IPAddress } | Select -Expand IPAddress | Where { $_ -match '^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$' }"

  1. Restart Zabbix agent

  2. Assign template Template Inventory IP addresses to required hosts (Inventory must be changed to automatic for all hosts)

zbx_export_templates_IP_inventory.xml

<?xml version="1.0" encoding="UTF-8"?> <zabbix_export> <version>5.0</version> <date>2020-11-11T20:00:20Z</date> <groups> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>Template Inventory IP addresses</template> <name>Template Inventory IP addresses</name> <groups> <group> <name>Templates</name> </group> </groups> <applications> <application> <name>Network Interfaces</name> </application> </applications> <items> <item> <name>IP addresses of network interfaces</name> <key>interfaces</key> <trends>0</trends> <value_type>CHAR</value_type> <inventory_link>HOST_NETWORKS</inventory_link> <applications> <application> <name>Network Interfaces</name> </application> </applications> </item> </items> </template> </templates> </zabbix_export>