{% extends 'generic/object.html' %} {% load buttons %} {% load helpers %} {% load plugins %} {% load static %} {% load i18n %} {% load render_table from django_tables2 %} {% block javascript %} {{ block.super }} {% endblock %} {% block breadcrumbs %} {{ block.super }} {% with model_name=object|meta:"model_name" %} {% if model_name == "device" %} {% elif model_name == "virtualmachine" %} {% endif %} {% endwith %} {% endblock %} {% block content %}
Device Status
{% if found_in_librenms %} {% with model_name=object|meta:"model_name" %} {% if model_name == "device" %} {% endif %} {% endwith %} {% endif %}
Status {% if found_in_librenms %} Found in LibreNMS {% else %} Not found in LibreNMS
{% endif %}
LibreNMS ID {{ librenms_device_id }}
Device Type {{ librenms_device_hardware }}
LibreNMS Location
{{ librenms_device_location }}
{% csrf_token %} {% if librenms_device_location != object.site.name %} {% else %} {% endif %}
{% if last_fetched %} Last data updated: {{ last_fetched|date:"Y-m-d H:i" }} {% endif %} {% if librenms_device_id %} {% if found_in_librenms %}
{% include 'netbox_librenms_plugin/_interface_sync.html' %}
{% include 'netbox_librenms_plugin/_cable_sync.html' %}
{% include 'netbox_librenms_plugin/_ipaddress_sync.html' %}
{% elif mismatched_device %}
Device Mismatch: The LibreNMS device with ID {{ librenms_device_id }} does not match the NetBox device.
Netbox Device Details:
  • NetBox Name: {{ object.name }}
  • Primary IP: {{ object.primary_ip.address.ip|default:'-' }}
  • Primary IP DNS Name: {{ object.primary_ip.dns_name|default:'-' }}
LibreNMS Device with ID {{ librenms_device_id }}:
  • LibreNMS Name: {{ sysName|default:'-' }}
  • Hardware: {{ librenms_device_hardware }}
  • IP Address: {{ librenms_device_ip }}
Options:
  • Remove custom field value and let LibreNMS plugin try to find it
  • Manually enter the correct LibreNMS device ID
{% else %}
Device not found: Device has custom field 'librenms_id' set to {{ librenms_device_id }} but was not found in LibreNMS.
Options:
  • Remove custom field value and let LibreNMS plugin try to find it
  • Manually enter the correct LibreNMS device ID
{% endif %} {% else %} {% if is_vc_member and not has_vc_primary_ip %}
Virtual chassis primary device {{ vc_primary_device }} requires a primary IP for LibreNMS sync
{% elif is_vc_member and has_vc_primary_ip %}
LibreNMS sync is managed by virtual chassis member {{ vc_primary_device }}
{% elif not found_in_librenms %}
To match a device with LibreNMS, one of these identifiers must match the LibreNMS hostname/IP:
{% endif %} {% endif %} {% endblock %}