{% if netbox %}
{% comment %} IP DEVICE {% endcomment %}
{% comment %} STATUS {% endcomment %}
Status
Uptime |
{{ netbox.get_up_display|capfirst }}
{% ifequal netbox.up netbox.UP_UP %}
for {{ netbox.up_since|timesince }}
{% endifequal %}
|
{% with netbox.get_availability as stats %}
Availability |
{% if stats %}
{% with stats.availability as a %}
{% if a.day %}
{{ a.day|floatformat:2 }}%
{% else %}
(N/A)
{% endif %}
last day,
{% if a.week %}
{{ a.week|floatformat:2 }}%
{% else %}
(N/A)
{% endif %}
last week,
{% if a.month %}
{{ a.month|floatformat:2 }}%
{% else %}
(N/A)
{% endif %}
last month
{% endwith %}
{% else %}
N/A
{% endif %}
|
Response time |
{% if stats %}
{% with stats.response_time as rt %}
{% if rt.day %}
{{ rt.day|floatformat:3 }}s
{% else %}
(N/A)
{% endif %}
last day,
{% if rt.week %}
{{ rt.week|floatformat:3 }}s
{% else %}
(N/A)
{% endif %}
last week,
{% if rt.month %}
{{ rt.month|floatformat:3 }}s
{% else %}
(N/A)
{% endif %}
last month
{% endwith %}
{% else %}
N/A
{% endif %}
|
{% endwith %}
First discovered |
{{ netbox.discovered|date|default:"N/A" }}
{{ netbox.discovered|time }} |
{% comment %} JOBS {% endcomment %}
{% with netbox.get_last_jobs as jobs %}
{% if jobs %}
Jobs
Name |
End time |
Duration |
Status |
{% for job in jobs|dictsortreversed:'end_time' %}
{{ job.job_name|capfirst }}
|
{{ job.end_time|date:"DATETIME_FORMAT" }}
|
{{ job.duration|stringformat:".2f" }}s
|
{% if job.is_overdue %}
{% else %}
{% if job.success %}
{% else %}
{% endif %}
{% endif %}
|
{% endfor %}
{% else %}
No jobs have run on this netbox
{% endif %}
{% endwith %}
{% else %}
{% comment %} IF NO NETBOX SHOW THIS {% endcomment %}
IP
Address: {{ host_info.addresses.0.addr|default:"N/A" }}
Status |
Not monitored |
Prefix |
{% with no_netbox.prefix as prefix %}
{% if prefix %}
{{ prefix.net_address }}
{% else %}
N/A
{% endif %}
{% endwith %}
|
{% with no_netbox.prefix.vlan as vlan %}
VLAN |
{% if vlan %}
{{ vlan }}
{% else %}
N/A
{% endif %}
|
Usage |
{{ vlan.usage|default:"N/A" }} |
Description |
{{ vlan.description|default:"N/A" }} |
Organization |
{% if vlan.organization %}
{{ vlan.organization|default:"N/A" }}
{% else %}
N/A
{% endif %}
|
Optional #1 |
{{ vlan.organization.optional_1|default:"N/A" }} |
Optional #2 |
{{ vlan.organization.optional_2|default:"N/A" }} |
Optional #3 |
{{ vlan.organization.optional_3|default:"N/A" }} |
{% endwith %}
{% with no_netbox.arp as arp %}
Last active |
{% ifequal no_netbox.dt_max arp.end_time %}
Right now
{% else %}
{% if arp.end_time %}
{{ arp.end_time|date }}
{{ arp.end_time|time }}
{% else %}
Never
{% endif %}
{% endifequal %}
|
Last seen with MAC |
{% if arp.mac %}
{{ arp.mac }}
{% else %}
N/A
{% endif %}
|
{% endwith %}
{% endif %}