Skip to content

Integration between Netbox and Zabbix to unify everything in a single SoT (Source of Truth)

Notifications You must be signed in to change notification settings

AdrianJPT/Netbox-Zabbix-Integration

Repository files navigation

Netbox and Zabbix Integration using Flask API

Integration between Netbox and Zabbix to unify everything in a single SoT (Source of Truth) using Flask as a middleware

Funcionalities from Netbox to Zabbix:

  • CREATE devices, templates, sites, platform
  • UPDATE devices, all ipaddress, sites, platform
  • DELETE devices, all ipaddress, templates, sites, platform

TESTS:

End to End Testing:

Architecture:

image

Quickstart

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

Tested on:

Execution VIDEOS:

  • 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:
2023-03-11.00-25-59.mp4

About

Integration between Netbox and Zabbix to unify everything in a single SoT (Source of Truth)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published