mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-12-18 19:32:22 -06:00
Updated README and modified interface update log messages.
This commit is contained in:
13
README.md
13
README.md
@@ -10,6 +10,8 @@ A script to sync the Netbox device inventory to Zabbix.
|
||||
* ZABBIX_PASS="Password"
|
||||
* NETBOX_HOST="https://netbox.local"
|
||||
* NETBOX_TOKEN="secrettoken"
|
||||
Optional:
|
||||
* NETBOX_KEY="Private user key"
|
||||
|
||||
#### Flags
|
||||
| Flag | Option | Description |
|
||||
@@ -17,7 +19,8 @@ A script to sync the Netbox device inventory to Zabbix.
|
||||
| -c | cluster | For clustered devices: only add the primary node of a cluster and use the cluster name as hostname. |
|
||||
| -H | hostgroup | Create non-existing hostgroups in Zabbix. Usefull for a first run to add all required hostgroups. |
|
||||
| -t | tenant | Add the tenant name to the hostgroup format (Tenant/Site/Manufacturer/Role) |
|
||||
| -v | Verbose | Log with debugging on. |
|
||||
| -s | secret | Use Netbox secrets if present on device for SNMP parameters
|
||||
| -v | verbose | Log with debugging on. |
|
||||
|
||||
|
||||
#### Logging
|
||||
@@ -30,7 +33,7 @@ In case of omitting the -H flag, manual hostgroup creation is required for devic
|
||||
This is in the format:
|
||||
{Site name}/{Manufacturer name}/{Device role name}
|
||||
And with tenants (-t flag):
|
||||
{Tenant name}/{Site name}/{Manufacturer name}/{Device role name}
|
||||
{Site name}/{Tenant name}/{Manufacturer name}/{Device role name}
|
||||
|
||||
Make sure that the Zabbix user has proper permissions to create hosts.
|
||||
The hostgroups are in a nested format. This means that proper permissions only need to be applied to the site name hostgroup and cascaded to any child hostgroups.
|
||||
@@ -109,6 +112,12 @@ To configure the interface parameters you'll need to use custom context. Custom
|
||||
```
|
||||
Note: Not all SNMP data is required for a working configuration. [The following parameters are allowed ](https://www.zabbix.com/documentation/current/manual/api/reference/hostinterface/object#details_tag "The following parameters are allowed ")but are not all required, depending on your environment.
|
||||
|
||||
##### Secrets
|
||||
Instead of having the password in plain-text in the config context, you can also set the password as secret in the Netbox device configuration.
|
||||
You will need to use the -s option for this. Keep in mind that you will need a Netbox private user key for this functionality.
|
||||
|
||||
This method of setting device SNMP parameters is working, but i would recommend going for a "secret macro" implementation to keep your environment more predictable. Refer to the macro from the config context and set the macro inside of Zabbix to the actual community string / authentication secret etc.
|
||||
|
||||
#### Permissions
|
||||
Make sure that the user has proper permissions for device read and modify (modify to set the Zabbix HostID custom field) operations.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user