...
Nagios user and permissions
Zabbix Nagios user used by this extension must have READ CGI 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
In
Administration->User groups
click onCreate user group
In User groups view define the Group name, for example, ZabbixAPI
Frontend access change to Disabled
Click on Permissions to switch to the Permissions tab
Click on the Select button and then click on the Name checkbox which selects all Host groups, then click on the Select button
Click on the Read button
Click on Add link above Add button. Permissions will be changed to the Read
Click on the Add button
Create user
The user type is Zabbix User.
In
Administration->Users
click onCreate user
In Users view define the Alias
Set password
Select group created in the previous step, in our case ZabbixAPI
Click on Add button
Zabbix configuration to discover IP addresses for hosts
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
Import Zabbix template zbx_export_templates_IP_inventory.xml
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}$' }"
Restart Zabbix agent
Assign template
Template Inventory IP addresses
to required hosts (Inventory must be changed to automatic for all hosts)
zbx_export_templates_IP_inventory.xml
...
the state of all Nagios environment.
Create Nagios 4.x user
The web server must use Basic authentication.
For Nagios 4.x you can use the default admin user or create a new one dedicated for the extension. Let’s say we have nagiosadmin
as a default admin user and we are going to create new user dynauser
Locate the full path to your
htpasswd.users
file. It’s usual locations are
/etc/nagios/htpasswd.users
/usr/local/nagios/etc/htpasswd.users
2. Let’s say path is /usr/local/nagios/etc so issue command to add user htpasswd /usr/local/nagios/etc/htpasswd.users dynauser
3. edit file cgi.cfg
, it is located in same directory as htpasswd.users and add after your admin user newly created dynauser
authorized_for_configuration_information=nagiosadmin,dynauser
authorized_for_all_services=nagiosadmin,dynauser
authorized_for_all_hosts=nagiosadmin,dynauser
Create NagiosXI user
For NagiosXI you can use the default admin user or create a new one dedicated for the extension.
Create a user with the following Security Settings
...