{# plugins/snmp/templates/snmp/index.html #} {% extends "base.html" %} {% block title %}SNMP — Steward{% endblock %} {% block content %}

SNMP Devices

{{ devices|length }} device(s) configured
{% if not devices %}
No SNMP devices configured. Add devices to plugin.yaml.
{% else %} {% for device in devices %}

{{ device.name }}

{{ device.host }} {% if device.readings %} ● reachable {% else %} ○ no data yet {% endif %} History
{% if device.readings %}
{% for oid_cfg in device.oids %} {% set label = oid_cfg.label if oid_cfg.label else oid_cfg.oid %} {% set val = device.readings.get(label) %}
{{ label }}
{% if val is not none %}
{% if val >= 1000000 %}{{ "%.2f"|format(val / 1000000) }}M {% elif val >= 1000 %}{{ "%.1f"|format(val / 1000) }}K {% else %}{{ "%.4g"|format(val) }}{% endif %}
{% else %}
{% endif %}
{% endfor %}
{% else %}

No readings yet — waiting for next poll cycle.

{% endif %}
{% endfor %} {% endif %} {% endblock %}