7 Commits

Author SHA1 Message Date
Raymond Kuiper
9aae04476b Update README.md on incorrect custom field usage for Zabbix inventory 2026-03-20 20:06:02 +01:00
Twan Kamans
da17b7be7d Merge pull request #173 from TheNetworkGuy/develop
Build and Push Docker Image / test_quality (push) Failing after 1m5s
Build and Push Docker Image / test_code (push) Failing after 1m14s
Build and Push Docker Image / build (push) Failing after 2m47s
Package code to main
2026-02-27 16:44:01 +01:00
Twan Kamans
4b54d93c6f Merge pull request #172 from TheNetworkGuy/bug/config-file-path
🐛 Adjusting reading of config.py behavior to support legacy usage
2026-02-27 15:47:16 +01:00
Wouter de Bruijn
8073cae46a 🔥 Removed special case option because of unlikely scenario 2026-02-27 15:36:39 +01:00
Wouter de Bruijn
9da113ac60 🚧 Added check for reading config file from netbox-zabbix-sync.py as root dir 2026-02-27 13:43:56 +01:00
Wouter de Bruijn
473dd1dcc1 🐛 Updated script_dir path for new netbox_zabbix_sync parent folder 2026-02-27 13:43:18 +01:00
Wouter de Bruijn
14e68c34ea 🐛 Changed end of line to LF 2026-02-27 13:42:31 +01:00
3 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -353,8 +353,8 @@ For Virtual Machines, use `vm_inventory_map`.
```python
inventory_sync = True
inventory_mode = "manual"
device_inventory_map = {"custom_fields/mycustomfield/name": "alias"}
vm_inventory_map = {"custom_fields/mycustomfield/name": "alias"}
device_inventory_map = {"custom_fields/mycustomfield": "alias"}
vm_inventory_map = {"custom_fields/mycustomfield": "alias"}
```
See `config.py.example` for an extensive example map. Any Zabbix Inventory fields
+6 -6
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
from netbox_zabbix_sync.modules.cli import parse_cli
if __name__ == "__main__":
parse_cli()
#!/usr/bin/env python3
from netbox_zabbix_sync.modules.cli import parse_cli
if __name__ == "__main__":
parse_cli()
+2 -1
View File
@@ -114,8 +114,9 @@ def load_env_variable(config_environvar):
def load_config_file(config_default, config_file="config.py"):
"""Returns config from config.py file"""
# Find the script path and config file next to it.
script_dir = path.dirname(path.dirname(path.abspath(__file__)))
script_dir = path.dirname(path.dirname(path.dirname(path.abspath(__file__))))
config_path = Path(path.join(script_dir, config_file))
# If the script directory is not found, try the current working directory