{% extends 'generic/object.html' %} {% load i18n %} {% block content %}

{% trans "Services" %}

{% if object.service_monitoring_enabled %} {% if can_refresh_services %}
{% csrf_token %}
{% else %} {% endif %} {% endif %}
{% trans "Configured" %}
{% if object.service_monitoring_enabled %} {% trans "Enabled" %} {% else %} {% trans "Disabled" %} {% endif %}
{% trans "Eligible" %}
{% if object.service_monitoring_eligible %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %}
{% trans "Reachable" %}
{% if service_heartbeat.reachable %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %}
{% trans "Heartbeat" %}
{% if service_heartbeat.is_stale %} {% trans "Stale" %} {% else %} {% trans "Fresh" %} {% endif %}
{% trans "Last success" %}
{{ service_heartbeat.last_success_at|date:"SHORT_DATETIME_FORMAT"|default:"—" }}
{% trans "Stale after" %}
{{ service_heartbeat.stale_after|date:"SHORT_DATETIME_FORMAT"|default:"—" }}
{% trans "Last status" %}
{{ service_heartbeat.last_status|default:"—" }}
{% if service_heartbeat.last_error %}
{% endif %}

{% trans "Latest Service Status" %}

{% for service in service_statuses %} {% empty %} {% endfor %}
{% trans "Unit" %} {% trans "Health" %} {% trans "Active" %} {% trans "Sub" %} {% trans "Result" %} {% trans "Restarts" %} {% trans "PID" %} {% trans "Unit file" %} {% trans "Last seen" %}
{{ service.unit }} {% if service.is_healthy %} {% trans "Healthy" %} {% else %} {% trans "Unhealthy" %} {% endif %} {{ service.active_state|default:"—" }} {{ service.sub_state|default:"—" }} {{ service.result|default:"—" }} {{ service.n_restarts|default:"0" }} {{ service.main_pid|default:"—" }} {{ service.unit_file_state|default:"—" }} {{ service.last_seen_at|date:"SHORT_DATETIME_FORMAT"|default:"—" }}
{% trans "No service status has been projected for this endpoint." %}

{% trans "Recent Collections" %}

{% for collection in service_collections %} {% empty %} {% endfor %}
{% trans "Collected" %} {% trans "Status" %} {% trans "Trigger" %} {% trans "Reachable" %} {% trans "Duration" %} {% trans "RPC execution" %} {% trans "Error" %}
{{ collection.collected_at|date:"SHORT_DATETIME_FORMAT" }} {% if collection.status == 'succeeded' %} {% trans "Succeeded" %} {% elif collection.status == 'failed' %} {% trans "Failed" %} {% else %} {% trans "Pending" %} {% endif %} {{ collection.get_trigger_display }} {% if collection.reachable %} {% trans "Yes" %} {% else %} {% trans "No" %} {% endif %} {% if collection.duration_ms is not None %} {{ collection.duration_ms }} ms {% else %} — {% endif %} {{ collection.rpc_execution_id|default:"—" }} {{ collection.error_message|default:"—" }}
{% trans "No service collections have been queued for this endpoint." %}
{% endblock %}