{% extends "base.html" %}{% set active = 'devices' %} {% block title %}{{ device.label }} · lanwatch{% endblock %} {% block content %}

{{ device.label }} {% if powered_off_by %}powered off{% else %}{{ 'online' if device.online else 'offline' }}{% endif %}{% if device.watch %} watched{% endif %}

IP
{{ device.ip or '-' }}
MAC
{{ device.mac or '-' }}{% if device.private_mac %} private{% endif %} {% if aliases %}
also seen as {{ aliases | join(', ') }}{% endif %}
Vendor
{{ device.vendor or '-' }}{% if device.vm %} VM{% endif %}
Hostname
{{ device.hostname or '-' }}
Kind
{% if device.kind %}{{ device.kind }} {% if device.kind_manual %}set by you {% elif device.kind_confidence is not none %}{{ (device.kind_confidence * 100) | round | int }}% confidence{% endif %} {% else %}-{% endif %}
Description
{{ device.description or '-' }}
{% if device.attrs.upnp %}
UPnP
{{ device.attrs.upnp.friendly_name }} {{ device.attrs.upnp.manufacturer }} {{ device.attrs.upnp.model }}
{% endif %} {% if device.attrs.mdns %}
mDNS
{{ device.attrs.mdns | join(', ') }}
{% endif %} {% set u = device.attrs.unifi %}{% if u %}
UniFi
{% if u.name %}{{ u.name }} · {% endif %}{{ 'wired' if u.wired else 'wireless' }}{% if u.guest %} · guest{% endif %} {% if u.uplink %} · via {{ u.uplink.name }}{% if u.uplink.model and u.uplink.model != u.uplink.name %} {{ u.uplink.model }}{% endif %}{% endif %} {% if u.network %} · network {{ u.network.name }}{% if u.network.vlan is not none %} VLAN {{ u.network.vlan }}{% endif %}{% endif %} {% if u.ssids_on_network %}
SSIDs on that network: {{ u.ssids_on_network | join(', ') }}{% endif %}
{% endif %} {% set ax = device.attrs.airos %}{% if ax and config.airos.enabled %}
airOS
{{ ax.model }} · {{ ax.firmware }} · {{ 'access point' if (ax.mode or '').startswith('ap') else 'station' if (ax.mode or '').startswith('sta') else ax.mode }}{% if ax.frequency_mhz %} on {{ ax.frequency_mhz }} MHz{% endif %}{% if ax.peer %} · linked with {{ ax.peer }}{% if ax.peer_ip %} {{ ax.peer_ip }}{% endif %}{% elif ax.stations == 0 %} · no link{% else %} · {{ ax.stations }} stations{% endif %}{% if ax.ethernet_mbps %} · Ethernet {{ ax.ethernet_mbps }} Mbit/s{% endif %} link{% if ax.macs and ax.macs | length > 1 %}
MAC addresses: {{ ax.macs | join(', ') }}{% endif %}
{% endif %} {% set ud = device.attrs.unifi_device %}{% if ud %}
UniFi device
{{ ud.model }} · {% if ud.state == 'ONLINE' %}online{% else %}{{ ud.state | lower | replace('_', ' ') }}{% endif %} {% if ud.uplink %} · uplink {{ ud.uplink.name }}{% endif %}{% if ud.ports.total %} · ports {{ ud.ports.up }}/{{ ud.ports.total }} up{% endif %} {% if ud.radios %} · radios {% for r in ud.radios %}{{ r.band }} GHz ch {{ r.channel }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}
{% endif %} {% set rt = device.attrs.router %}{% if rt and config.snmp.router() %}
Router
{% if rt.arp_interface %}in its ARP table on {{ rt.arp_interface }}{% else %}in its ARP table{% endif %}{% if rt.dhcp_lease is sameas true %} · DHCP lease since {{ rt.dhcp_lease_since or '?' }}{% elif rt.dhcp_lease is sameas false %} · no DHCP lease: a static address, or another DHCP server{% endif %} table
{% endif %} {% set sn = device.attrs.snmp %}{% if sn and config.snmp.targets() %}
SNMP
{{ sn.name or '-' }} · {{ sn.vendor or sn.object_id }} {{ sn.descr | truncate(90) }}{% if sn.location %} · {{ sn.location }}{% endif %} read over SNMPv3
{% endif %} {% if junos and config.snmp.targets() %}
Junos
{% if junos.engine %}routing engine {{ junos.engine.state }}{% if junos.engine.cpu_pct is not none %} · CPU {{ junos.engine.cpu_pct }} %{% endif %}{% if junos.engine.mem_pct is not none %} · memory {{ junos.engine.mem_pct }} %{% endif %}{% if junos.engine.temp_c %} · {{ junos.engine.temp_c }} °C{% endif %}{% endif %} {% if junos.has_alarms %} · {% if junos.alarms_on %}{{ junos.alarms_on | join(' and ') }} alarm on{% else %}no chassis alarms{% endif %}{% endif %} {% for n in junos.sessions %} · sessions {{ n.current }} of {{ n.max }}{% if junos.sessions | length > 1 %} (node {{ n.node }}){% endif %}{% endfor %} {% if junos.last_change %}
last commit {{ junos.last_change.at | local }} by {{ junos.last_change.user or '?' }} ({{ junos.last_change.source }}){% if junos.rescue and not junos.rescue.saved %} · no rescue config{% endif %}{% endif %}
{% endif %} {% if device.attrs.ipv6 %}
IPv6
{{ device.attrs.ipv6 | join(', ') }}{% if device.attrs.ipv6_open %}
open: {% for a, ps in device.attrs.ipv6_open.items() %}{{ a }} {{ ps | join(' ') }}{% if not loop.last %}; {% endif %}{% endfor %}{% endif %}
{% endif %} {% if partners %}
Linked
{% for link, o, rel in partners %}{{ rel }} {{ o.label }} {{ o.ip or '' }}{% if not o.online %} offline{% endif %}{% if not loop.last %}
{% endif %}{% endfor %}
{% endif %}
First seen
{{ device.first_seen | local }}
Last seen
{{ device.last_seen | local }}
{% set fw = device.attrs.firmware %}{% if fw %}
Firmware
{{ fw.product }} {{ fw.version }}{% if fw.model %} {{ fw.model }}{% endif %} {% if fw['update'] %}{{ 'behind' if fw.latest else 'update available' }}{% if fw.latest %} latest is {{ fw.latest }}{% endif %} {% elif fw['update'] is sameas false %}up to date{% if fw.latest_checked %} by a list checked {{ fw.latest_checked }}{% endif %} {% else %}latest release unknown{% endif %} · checked {{ fw.checked | local }}
{% endif %}
Last service scan
{{ last_inventory | local }}
{% if ups %}{% include "_ups.html" %}{% endif %} {% if presence %}

Presence, last 4 weeks

Answered {{ (presence.share * 100) | round | int }}% of {{ presence.rounds }} discovery rounds since {{ presence.first | local }}. {% if presence.quietest %}Most often away {{ presence.quietest.day }} {{ '%02d' | format(presence.quietest.hour) }}:00–{{ '%02d' | format(presence.quietest.hour + 1) }}:00 (there {{ (presence.quietest.share * 100) | round | int }}% of the time).{% else %}Never missed a round.{% endif %}

{% for h in range(24) %}{% endfor %} {% for row in presence.grid %} {% set day = presence.days[loop.index0] %}{% for p in row %}{% set h = loop.index0 %} {% if p is none %} {% else %}{% endif %} {% endfor %} {% endfor %}
Day
{{ presence.days[loop.index0] }}no data{{ (p * 100) | round | int }}%
{% endif %} {% if suggestions %}

Suggested links

{% endif %}

Edit

{% for k in kinds %}
Kind and description normally come from the LLM. Changing them pins your values; clear both to hand them back.

Services

{% if services %}
{% for s in services %} {% endfor %}
PortStateServiceProductDetailsFirst seenLast seen
{{ s.port }}/{{ s.proto }} {{ s.state }} {{ s.name or '-' }}{% if s.tunnel %} ({{ s.tunnel }}){% endif %} {{ s.product or '' }} {{ s.version or '' }} {{ s.extrainfo or '' }} {% if s.details %}
{{ s.details|length }} script{{ 's' if s.details|length != 1 }}
{{ s.details | tojson(indent=2) }}
{% else %}-{% endif %}
{{ s.first_seen | local }} {{ s.last_seen | local }}
{% else %}

No service scan yet.

{% endif %}

History

{% if events %}
{% for e in events %}{% endfor %}
TimeKindEvent
{{ e.ts | local }}{{ e.kind }}{{ e.summary }}
{% else %}

No events recorded.

{% endif %}

Findings

{% if findings %}
{% set back = '/devices/' ~ device.id %}{% set devices_by_id = {device.id: device} %}{% include "_finding_rows.html" %}
SeverityKindFindingDeviceSinceStatusAction
{% else %}

None.

{% endif %}

Links

Devices that belong with this one {% if partners %}{% endif %} {% if others %}

For separate devices that belong together: the management card (iLO, iDRAC, IPMI) of a server, the switch a device hangs off, the UPS it runs on. Both stay devices of their own. A watched server that stops answering while its management card answers is reported as powered off.

{% endif %}

Housekeeping

Merge with another device, or forget this one {% if others %}

For one physical device that shows up twice, typically a phone or laptop that changed its private MAC address. The other entry disappears, its address is remembered as belonging to this device, and its history moves here. This cannot be undone.

{% endif %}

Removes the device with its services and findings. If it is still on the network, the next discovery adds it again as a new device.

{% endblock %}