{% load i18n %}{% load helpers %}{% load checkmk_tags %}
{% for error in errors %}
{% trans "Checkmk query failed" %}: {{ error }}
{% endfor %}
{% if not_configured %}
{% trans "No Checkmk sites configured. Add one under Plugins → Checkmk sites, or in PLUGINS_CONFIG['netbox_checkmk']['sites']." %}
{% else %}
{% if model == "cluster" %}
| {% trans "Overall state" %} |
{% cmk_severity_badge worst_severity %}
{% blocktrans with found=members_found total=members_total %}{{ found }} of {{ total }} members found in Checkmk{% endblocktrans %}
|
| {% trans "Cluster host" %} |
{% if host.found %}
{{ host.status.name }}
{% cmk_badge host.status.label %} ({{ host.site.name }})
{% else %}
{% blocktrans with name=host.hostname %}No Checkmk host named "{{ name }}"{% endblocktrans %}
{% endif %}
|
{% if member_rows %}
| {% trans "Member" %} |
{% trans "Checkmk host" %} |
{% trans "Host" %} |
{% trans "Services" %} |
{% trans "Site" %} |
{% for member, h in member_rows %}
| {{ member|linkify }} |
{% if h.found %}
{{ h.status.name }} |
{% cmk_badge h.status.label %} |
{% include "netbox_checkmk/inc/service_counts.html" with services=h.status.services %} |
{{ h.site.name }} |
{% else %}
{{ h.hostname }} |
{% trans "Not found in Checkmk" %} |
{% endif %}
{% endfor %}
{% else %}
{% trans "This cluster has no member devices or virtual machines." %}
{% endif %}
{% if members_truncated %}
{% endif %}
{% elif host.found %}
| {% trans "Host" %} |
{{ host.status.name }}
{% cmk_badge host.status.label %}
{% if host.status.acknowledged %}{% trans "ACK" %}{% endif %}
{% if host.status.in_downtime %}{% trans "Downtime" %}{% endif %}
|
| {% trans "Site" %} |
{{ host.site.name }} |
{% if host.status.plugin_output %}
| {% trans "Output" %} |
{{ host.status.plugin_output }} |
{% endif %}
| {% trans "Services" %} |
{% include "netbox_checkmk/inc/service_counts.html" with services=host.status.services %} |
{% if host.status.last_check %}
| {% trans "Last check" %} |
{{ host.status.last_check|cmk_timestamp|isodatetime }} |
{% endif %}
{% if services %}
| {% trans "State" %} | {% trans "Service" %} | {% trans "Output" %} |
{% for svc in services %}
| {% cmk_badge svc.label %}
{% if svc.acknowledged %}ACK{% endif %}
{% if svc.in_downtime %}DT{% endif %}
|
{{ svc.description }} |
{{ svc.plugin_output|truncatechars:200 }} |
{% endfor %}
{% endif %}
{% else %}
{% if errors %}
{% blocktrans with name=host.hostname %}Host "{{ name }}" could not be determined.{% endblocktrans %}
{% elif host.hostname %}
{% blocktrans with name=host.hostname %}No Checkmk host named "{{ name }}" found on any configured site.{% endblocktrans %}
{% else %}
{% trans "This object has no name to look up in Checkmk." %}
{% endif %}
{% endif %}
{% endif %}