mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2025-07-20 02:06:45 -06:00
added comments
This commit is contained in:
parent
81113af519
commit
a4386e2335
@ -69,7 +69,7 @@ Make sure that the Zabbix user has permissions to read hostgroups and proxy serv
|
|||||||
If you want to automatically create hostgroups then the create permission on host-groups should also be applied.
|
If you want to automatically create hostgroups then the create permission on host-groups should also be applied.
|
||||||
|
|
||||||
### Custom links
|
### Custom links
|
||||||
To make the user experience easier you could add a custom link that redirects users to the Zabbix latest data.
|
To make the user experience easier you could add a custom link that redirects users to the Zabbix the latest data.
|
||||||
```
|
```
|
||||||
* Name: zabbix_latestData
|
* Name: zabbix_latestData
|
||||||
* Text: {% if obj.cf["zabbix_hostid"] %}Show host in Zabbix{% endif %}
|
* Text: {% if obj.cf["zabbix_hostid"] %}Show host in Zabbix{% endif %}
|
||||||
@ -174,7 +174,7 @@ You can set the proxy for a device using the 'proxy' key in config context.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Because of the posible amount of destruction when setting up Netbox but forgetting the proxy command, the sync works a bit different. By default everything is synced except in a situation where the Zabbix host has a proxy configured but nothing is configured in Netbox. To force deletion and a full sync, use the -p flag.
|
Because of the posible amount of destruction when setting up Netbox but forgetting the proxy command, the sync works a bit different. By default, everything is synced except in a situation where the Zabbix host has a proxy configured but nothing is configured in Netbox. To force deletion and a full sync, use the -p flag.
|
||||||
|
|
||||||
### Set interface parameters within Netbox
|
### Set interface parameters within Netbox
|
||||||
When adding a new device, you can set the interface type with custom context. By default, the following configuration is applied when no config context is provided:
|
When adding a new device, you can set the interface type with custom context. By default, the following configuration is applied when no config context is provided:
|
||||||
@ -186,7 +186,7 @@ When adding a new device, you can set the interface type with custom context. By
|
|||||||
|
|
||||||
Due to Zabbix limitations of changing interface type with a linked template, changing the interface type from within Netbox is not supported and the script will generate an error.
|
Due to Zabbix limitations of changing interface type with a linked template, changing the interface type from within Netbox is not supported and the script will generate an error.
|
||||||
|
|
||||||
For example when changing a SNMP interface to an Agent interface:
|
For example when changing an SNMP interface to an Agent interface:
|
||||||
```
|
```
|
||||||
Netbox-Zabbix-sync - WARNING - Device: Interface OUT of sync.
|
Netbox-Zabbix-sync - WARNING - Device: Interface OUT of sync.
|
||||||
Netbox-Zabbix-sync - ERROR - Device: changing interface type to 1 is not supported.
|
Netbox-Zabbix-sync - ERROR - Device: changing interface type to 1 is not supported.
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set environment variables for Zabbix and Netbox URLs and authentication tokens
|
||||||
export ZABBIX_HOST="https://zabbix.local"
|
export ZABBIX_HOST="https://zabbix.local"
|
||||||
export ZABBIX_USER="username"
|
export ZABBIX_USER="username"
|
||||||
export ZABBIX_PASS="Password"
|
export ZABBIX_PASS="Password"
|
||||||
export NETBOX_HOST="https://netbox.local"
|
export NETBOX_HOST="https://netbox.local"
|
||||||
export NETBOX_TOKEN="secrettoken"
|
export NETBOX_TOKEN="secrettoken"
|
||||||
|
|
||||||
|
# Call the Python script to sync Netbox devices with Zabbix
|
||||||
python3 netbox_zabbix_sync.py
|
python3 netbox_zabbix_sync.py
|
Loading…
Reference in New Issue
Block a user