Files
netbox/configuration/plugins.py
T
hermes 693370446c chore: upgrade all 14 plugins, fix config-diff key, pin netbox base image
- plugin_requirements.txt: pinned ==versions (10 plugins updated vs PyPI)
- Dockerfile-Plugins: FROM netbox:latest -> netbox:v4.6-5.0.2 (reproducible)
- configuration/plugins.py: fix netbox-config-diff -> netbox_config_diff key (required_settings USERNAME/PASSWORD)
- docker-compose.yml: VERSION default v4.6-5.0.1 -> v4.6-5.0.2
- README-NETBOX-MCP.md: fix NetBox version 6.0.4 -> 4.6.10, mark plugins TODO done
- NetBox 4.6.0 -> 4.6.10; all 14 plugins now load (config_diff, secrets, qrcode, floorplan revived)
NOTE: docker-compose.override.yml (housekeeping DB env fix) is gitignored - kept local
2026-09-03 14:33:28 +00:00

198 lines
7.7 KiB
Python

# Add your plugins and plugin settings here.
# Of course uncomment this file out.
# To learn how to build images with your required plugins
# See https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins
# PLUGINS = ["netbox_bgp"]
PLUGINS = [
"netbox_prometheus_sd",
"netbox_lists",
"netbox_inventory",
"netbox_interface_synchronization",
"netbox_documents",
"netbox_contract",
"netbox_data_flows",
"netbox_config_diff",
"netbox_attachments",
"netbox_topology_views",
"netbox_reorder_rack",
"netbox_secrets",
"netbox_qrcode",
"netbox_floorplan"
]
# PLUGINS_CONFIG = {
# "netbox_bgp": {
# ADD YOUR SETTINGS HERE
# }
# }
PLUGINS_CONFIG = {
"netbox_prometheus_sd": {
# https://github.com/FlxPeters/netbox-plugin-prometheus-sd
# The plugin has not further plugin configuration.
},
"netbox_lists": {
# https://github.com/devon-mar/netbox-lists
# Return IPs as /32 or /128.
# Default: True
"as_cidr": True,
# For services without any explicit IPs configured,
# use the primary IPs of the associated device/vm.
# Default: True
"service_primary_ips": True,
# Summarize responses
"summarize": True,
# A list of attributes for the devices-vms-attrs endpoint
#
# Attributes will be joined with "__" in the returned object.
# eg. ("primary_ip", "address") -> primary_ip__address
"devices_vms_attrs": [
("id",),
("name",),
("role", "slug"),
("platform", "slug"),
("primary_ip", "address"),
("tags",),
],
# Tuple/list of attributes to use for Prometheus VM SD target. Defaults are shown.
#
# If all attributes return None, the device's name will be used.
"prometheus_vm_sd_target": (
# For a custom field
# ("cf", "fqdn"),
# If this returns none, try Name.
("primary_ip", "address", "ip"),
("name",), # not necessary
),
# Dictionary of label to VM attribute for Prometheus VM SD. Defaults are shown.
"prometheus_vm_sd_labels": {
"__meta_netbox_id": ("id",),
"__meta_netbox_name": ("name",),
"__meta_netbox_status": ("status",),
"__meta_netbox_cluster_name": ("cluster", "name"),
"__meta_netbox_site_name": ("site", "name"),
"__meta_netbox_role_name": ("role", "name"),
"__meta_netbox_platform_name": ("platform", "name"),
"__meta_netbox_primary_ip": ("primary_ip", "address", "ip"),
"__meta_netbox_primary_ip4": ("primary_ip4", "address", "ip"),
"__meta_netbox_primary_ip6": ("primary_ip6", "address", "ip"),
# A custom field. Will be an empty string if None.
# "__meta_netbox_fqdn": ("cf", "fqdn"),
},
# Tuple/list of attributes to use for Prometheus device SD target. Defaults are shown.
#
# If all attributes return None, the device's name will be used.
"prometheus_device_sd_target": (
# For a custom field
# ("cf", "fqdn"),
("primary_ip", "address", "ip"),
("name",), # not necessary
),
# Dictionary of label to device attribute for Prometheus device SD. Defaults are shown.
"prometheus_device_sd_labels": {
"__meta_netbox_id": ("id",),
"__meta_netbox_name": ("name",),
"__meta_netbox_status": ("status",),
"__meta_netbox_site_name": ("site", "name"),
"__meta_netbox_platform_name": ("platform", "name"),
"__meta_netbox_primary_ip": ("primary_ip", "address", "ip"),
"__meta_netbox_primary_ip4": ("primary_ip4", "address", "ip"),
"__meta_netbox_primary_ip6": ("primary_ip6", "address", "ip"),
"__meta_netbox_serial": ("serial",),
# A custom field. Will be an empty string if None.
# "__meta_netbox_fqdn": ("cf", "fqdn"),
},
# Tuple/list of attributes to use for Prometheus IP address SD target. Defaults are shown.
#
# If all attributes return None, the address in CIDR format will be used.
"prometheus_ipaddress_sd_target": (
("address", "ip"),
),
# Dictionary of label to IP address attribute for Prometheus ip address SD. Defaults are shown.
"prometheus_ipaddress_sd_labels": {
"__meta_netbox_id": ("id",),
"__meta_netbox_role": ("role",),
"__meta_netbox_dns_name": ("dns_name",),
"__meta_netbox_status": ("status",),
# For addresses assigned to interfaces
#"__meta_netbox_device": ("assigned_object", "device", "name"),
#"__meta_netbox_interface": ("assigned_object", "name"),
},
},
"netbox_inventory": {
# https://github.com/ArnesSI/netbox-inventory
# Example settings below, see "Available settings"
# in README.md for all possible settings
"used_status_name": "used",
"stored_status_name": "stored",
"sync_hardware_serial_asset_tag": True,
},
"netbox-interface-synchronization": {
# https://github.com/NetTech2001/netbox-interface-synchronization
'exclude_virtual_interfaces': True
},
"netbox-documents": {
# https://github.com/jasonyates/netbox-documents
#All settings are optional -- the defaults are shown below
# Enable the global navigation menu
'enable_navigation_menu': True,
# Location of the documents panel on object detail pages (left/right)
'documents_location': 'left',
# Custom document types (see below)
'custom_doc_types': [],
# Per-model document type filtering (see below)
'allowed_doc_types': {},
},
"netbox-contract": {
# https://github.com/mlebreuil/netbox-contract
},
"netbox-data-flows": {
# https://github.com/Alef-Burzmali/netbox-data-flows/
},
"netbox_config_diff": {
# https://github.com/miaow2/netbox-config-diff
#define credentials for devices connection:
# Новая версия (2.15+) требует эти поля обязательно — см. required_settings в __init__.py
"USERNAME": "foo",
"PASSWORD": "bar",
"AUTH_SECONDARY": "foobar", # define here password for accessing Privileged EXEC mode, this variable is optional
"PATH_TO_SSH_CONFIG_FILE": "/home/.ssh/config", # define here PATH to SSH config file, it will be used for device connections, this variable is optional
},
"netbox-attachments": {
# https://github.com/Kani999/netbox-attachments
"applied_scope": "model",
"scope_filter": ["dcim.device", "ipam.prefix", "tenancy"],
"display_default": "right_page",
"create_add_button": True, # show top "Attachments" dropdown in additional_tab mode
"display_setting": {"ipam.vlan": "left_page"},
},
"netbox-topology-views": {
# https://github.com/netbox-community/netbox-topology-views
'static_image_directory': 'netbox_topology_views/img',
'allow_coordinates_saving': True,
'always_save_coordinates': True
},
"netbox-reorder-rack": {
# https://github.com/minitriga/netbox-reorder-rack/
},
"netbox-secrets": {
# https://github.com/Onemind-Services-LLC/netbox-secrets/blob/master/docs
# A list of NetBox models where secrets can be assigned and displayed. Each entry is app_label.model.
'apps': [
'dcim.device',
'virtualization.virtualmachine',
],
},
"netbox-qrcode": {
# https://github.com/netbox-community/netbox-qrcode
},
"netbox-floorplan": {
# https://github.com/netbox-community/netbox-floorplan-plugin
},
}