{# plugins/snmp/templates/snmp/form.html — add or edit an SNMP device (milestone 491): where it is, how to sign in, what to read, and Test to ask the device before saving. Secrets are never sent back to the browser; a blank secret field keeps the stored one. #} {% extends "base.html" %} {% from "_macros.html" import crumbs, page_header %} {% block title %}{{ ("Edit " ~ device.name) if device else "Add SNMP device" }} — Steward{% endblock %} {% block breadcrumb %} {%- if device -%} {{ crumbs([("SNMP", "/plugins/snmp/"), (device.name, "/plugins/snmp/devices/" ~ device.id), ("Edit", "")]) }} {%- else -%} {{ crumbs([("SNMP", "/plugins/snmp/"), ("Add device", "")]) }} {%- endif -%} {% endblock %} {% block content %} {{ page_header(("Edit " ~ device.name) if device else "Add SNMP device") }}
{% if error %}{% endif %}
{{ csrf_field() }} {% if device %}{% endif %}

Device

Which host's page shows this device's readings.

Sign-in

The device's read community. Blank {{ "keeps the saved one" if v.has_community else "means public" }}.
Asking the device… Asks the device for its name, uptime and interfaces, with what's typed here. Nothing is saved.

Readings

{% for pid, label, what in presets %} {% if pid == "interfaces" %}
{% endif %} {% endfor %}
One a line: the OID, a name (letters, digits, underscores), and optionally a unit: {% for u, words in units.items() %}{{ u }} ({{ words }}){{ ", " if not loop.last else "." }}{% endfor %}
Cancel
{% if device %}

Delete this device

Steward stops polling it. Its past readings age out with the rest of the history.

{{ csrf_field() }}
{% endif %}
{% endblock %}