mirror of
https://github.com/TheNetworkGuy/netbox-zabbix-sync.git
synced 2026-03-21 20:18:38 -06:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aae04476b | ||
|
|
da17b7be7d | ||
|
|
4b54d93c6f | ||
|
|
8073cae46a | ||
|
|
9da113ac60 | ||
|
|
473dd1dcc1 | ||
|
|
14e68c34ea |
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user