From 40cb24c2984eeeeb1676f4a770bf46b62646deb1 Mon Sep 17 00:00:00 2001 From: Raymond Kuiper Date: Wed, 28 May 2025 15:34:57 +0200 Subject: [PATCH] Updated Configuration (markdown) --- Configuration.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/Configuration.md b/Configuration.md index b7e710b..33e928a 100644 --- a/Configuration.md +++ b/Configuration.md @@ -1,3 +1,65 @@ +### Config file + +First time user? Copy the `config.py.example` file to `config.py`. This file is +used for modifying filters and setting variables such as custom field names. + +```sh +cp config.py.example config.py +``` + +### Set environment variables + +Set the following environment variables: + +```sh +export ZABBIX_HOST="https://zabbix.local" +export ZABBIX_USER="username" +export ZABBIX_PASS="Password" +export NETBOX_HOST="https://netbox.local" +export NETBOX_TOKEN="secrettoken" +``` + +Or, you can use a Zabbix API token to login instead of using a username and +password. In that case `ZABBIX_USER` and `ZABBIX_PASS` will be ignored. + +```sh +export ZABBIX_TOKEN=othersecrettoken +``` + +If you are using custom SSL certificates for NetBox and/or Zabbix, you can set +the following environment variable to the path of your CA bundle file: + +```sh +export REQUESTS_CA_BUNDLE=/path/to/your/ca-bundle.crt +``` + +### NetBox custom fields + +Use the following custom fields in NetBox (if you are using config context for +the template information then the zabbix_template field is not required): + +``` +* Type: Integer +* Name: zabbix_hostid +* Required: False +* Default: null +* Object: dcim > device +``` + +``` +* Type: Text +* Name: zabbix_template +* Required: False +* Default: null +* Object: dcim > device_type +``` + +You can make the `zabbix_hostid` field hidden or read-only to prevent human +intervention. + +This is optional and there is a use case for leaving it read-write in the UI to +manually change the ID. For example to re-run a sync. + ## Virtual Machine (VM) Syncing In order to use VM syncing, make sure that the `zabbix_id` custom field is also