Integration between Netbox and Zabbix to unify everything in a single SoT (Source of Truth) using Flask as a middleware
- CREATE devices, templates, sites, platform
- UPDATE devices, all ipaddress, sites, platform
- DELETE devices, all ipaddress, templates, sites, platform
To get Netbox-Zabbix-Integracion up and running run the following commands.
-
Set VALUES equals in Netbox and Zabbix:
- Platform(Netbox) - Templates(Zabbix)
- Sites(Netbox) - HostGroups(Zabbix)
-
Set the WeebHooks in Netbox pointing to the API roots:
- CREATE (POST): https://[your_IP]:[PORT]/create
- UPDATE (POST): https://[your_IP]:[PORT]/update
- DELETE (DELETE): https://[your_IP]:[PORT]/delete
-
Clone this repository
git clone https://github.com/AdrianJPT/Netbox-Zabbix-Integration.git
cd Netbox-Zabbix-Integration
- Set the corresponding variables in "credentials.py" file:
Netbox_Url = '[your_netbox_url]'
Netbox_Token = '[your_netbox_token]'
Zabbix_Url = '[your_netbox_url]'
Zabbix_Token = '[your_zabbix_token]'
- Getting Netbox-Zabbix-Integracion, Build the DockerFile
docker compose build
- Getting Netbox-Zabbix-Integracion, Create the container
docker compose up
If you want to edit the port of the docker container, override the docker-compose.yml file.
version: '3.8'
services:
api:
build: .
ports:
- "5000:5000"
volumes:
- .:/app
command: flask run --host=0.0.0.0 --port=5000 --debug
- netbox-docker = 2.6.1 (How to deploy Netbox-Docker)
- zabbix-docker = 6.4 (How to deploy Zabbix-Docker)
- Creating a device:
2023-03-11.00-17-15.mp4
- Assigning and UPDATING an IP address:
2023-03-11.00-21-08.mp4
2023-03-11.00-23-54.mp4
- Deleting a Device: