{% extends 'generic/object_edit.html' %} {% load form_helpers %} {% block title %}Plugin Settings{% endblock %} {% block tabs %} {% endblock tabs %} {% block content %}
{% csrf_token %}

LibreNMS Server Settings

Configure which LibreNMS server to use for synchronization operations. Multiple servers can be configured in the NetBox configuration file.

{% render_field server_form.selected_server %}

Connection Test

Test the connection to the selected LibreNMS server to verify configuration.

Configuration Example

To configure multiple LibreNMS servers, update your NetBox configuration.py:

PLUGINS_CONFIG = {
    'netbox_librenms_plugin': {
        'servers': {
            'production': {
                'display_name': 'Production LibreNMS',
                'librenms_url': 'https://librenms-prod.example.com',
                'api_token': 'your_production_token',
                'cache_timeout': 300,
                'verify_ssl': True,
                'interface_name_field': 'ifDescr'
            },
            'testing': {
                'display_name': 'Test LibreNMS',
                'librenms_url': 'https://librenms-test.example.com',
                'api_token': 'your_test_token',
                'cache_timeout': 300,
                'verify_ssl': False,
                'interface_name_field': 'ifName'
            }
        }
    }
}
Note: For backward compatibility, the legacy single-server configuration is still supported if no "servers" configuration is provided.
{% csrf_token %}

Device Naming Defaults

Configure default naming preferences for imported devices.

User preferences: These defaults apply to users who have not yet changed their own toggle settings on the import page. Once a user changes a toggle, their personal preference is saved and takes priority over these defaults. Saving these settings will also update your own preferences to match.
{{ import_form.use_sysname_default }} {% if import_form.use_sysname_default.help_text %} {{ import_form.use_sysname_default.help_text }} {% endif %}
{{ import_form.strip_domain_default }} {% if import_form.strip_domain_default.help_text %} {{ import_form.strip_domain_default.help_text }} {% endif %}

Interface Naming Preference

{{ import_form.remember_interface_name_per_platform }} {% if import_form.remember_interface_name_per_platform.help_text %} {{ import_form.remember_interface_name_per_platform.help_text }} {% endif %}

Virtual Chassis Member Naming

Configure how virtual chassis member devices are named during import.

{{ import_form.vc_member_name_pattern }} {% if import_form.vc_member_name_pattern.errors %}
{{ import_form.vc_member_name_pattern.errors }}
{% endif %}

Available placeholders:

  • {position} - VC position number
  • {serial} - Member serial number

Note: The pattern is appended to the master device name. At least one placeholder is required to ensure each member gets a unique name.

Examples:

  • -M{position} → switch01-M1, switch01-M2
  • ({position}) → switch01 (1), switch01 (2)
  • -SW{position} → switch01-SW1, switch01-SW2
  • [{serial}] → switch01 [ABC123], switch01 [ABC124]

Location Parsing

Describe the structure of the single LibreNMS location string so it can be split into NetBox fields during import. Parsed values are matched exactly by name, then fall back to any configured Location Mappings.

{{ import_form.location_parse_pattern }} {% if import_form.location_parse_pattern.errors %}
{{ import_form.location_parse_pattern.errors }}
{% endif %}
{{ import_form.location_parse_is_regex }} {{ import_form.location_parse_is_regex.help_text }}

Available placeholders:

  • {region} - NetBox Region name
  • {site} - NetBox Site name
  • {location} - NetBox Location name
  • {rack} - NetBox Rack name
  • {tenant} - NetBox Tenant name

Note: Literal text between placeholders is treated as a separator. Leave the pattern blank to match the whole location string against both site and location.

Examples:

  • {site} - {rack} → "NYC - R1" parses site="NYC", rack="R1"
  • {site}, {location} → "NYC, Hall A" parses site="NYC", location="Hall A"
  • Regex: (?P<site>[^-]+)-(?P<rack>.+)
{% endblock %}