{% extends "_base.html" %} {% block title %}Agent Status — {{ _brand_name }}{% endblock %} {% block content %} {#- agent_total / agent_disconnected / agent_partial are computed once in Go (report_service.go) and reused for both the email subject and this summary, so the two never drift. -#}

Agent Status

I checked {{ agent_total|default(0) }} account{{ 's' if agent_total|default(0) != 1 else '' }}. {% if agent_disconnected|default(0) > 0 or agent_partial|default(0) > 0 %} {% if agent_disconnected|default(0) > 0 %}{{ agent_disconnected|default(0) }} agent{{ 's' if agent_disconnected|default(0) != 1 else '' }} disconnected{% endif %}{% if agent_disconnected|default(0) > 0 and agent_partial|default(0) > 0 %} and {% endif %}{% if agent_partial|default(0) > 0 %}{{ agent_partial|default(0) }} ha{{ 've' if agent_partial|default(0) != 1 else 's' }} partial connectivity{% endif %} — details below. {% else %} All agents are running healthy. {% endif %}

{% for account in accounts %} {% set agent_details = account.agent_details.data.agent[0] %} {% set status = agent_details.connection_status %} {% set connected_count = 0 %} {% if status.alertManagerConnection %}{% set connected_count = connected_count + 1 %}{% endif %} {% if status.grafanaEnabled %}{% set connected_count = connected_count + 1 %}{% endif %} {% if status.karpenterEnabled %}{% set connected_count = connected_count + 1 %}{% endif %} {% if status.logsConnection %}{% set connected_count = connected_count + 1 %}{% endif %} {% if status.opencostConnection %}{% set connected_count = connected_count + 1 %}{% endif %} {% endfor %}
Account Status Connections Last Connected
{{ account.account_name }} {{ connected_count }}/5 {{ agent_details.last_connected_at }} UTC
{% set accounts_with_issues = [] %} {% for account in accounts %} {% set agent_details = account.agent_details.data.agent[0] %} {% set status = agent_details.connection_status %} {% if agent_details.status | lower not in ['running', 'connected', 'active'] or not status.alertManagerConnection or not status.grafanaEnabled or not status.karpenterEnabled or not status.logsConnection or not status.opencostConnection %} {% if accounts_with_issues.append(account) %}{% endif %} {% endif %} {% endfor %} {% if accounts_with_issues %}
Fix these connections
{% for account in accounts_with_issues %} {% set agent_details = account.agent_details.data.agent[0] %} {% set status = agent_details.connection_status %} {% set is_running = agent_details.status | lower in ['running', 'connected', 'active'] %} {% set disconnected_connections = [] %} {% if not status.alertManagerConnection %}{% if disconnected_connections.append('Alert Manager') %}{% endif %}{% endif %} {% if not status.grafanaEnabled %}{% if disconnected_connections.append('Grafana') %}{% endif %}{% endif %} {% if not status.karpenterEnabled %}{% if disconnected_connections.append('Karpenter') %}{% endif %}{% endif %} {% if not status.logsConnection %}{% if disconnected_connections.append('Logs') %}{% endif %}{% endif %} {% if not status.opencostConnection %}{% if disconnected_connections.append('OpenCost') %}{% endif %}{% endif %}

{{ account.account_name }}

{% if not is_running %}

Agent {{ agent_details.status | lower | capitalize }} since {{ agent_details.last_connected_at }} UTC. No data is being collected.

Version: {{ agent_details.version }}  ·  {{ agent_details.k8s_provider }}/{{ agent_details.k8s_version }}

{% endif %} {% if disconnected_connections | length > 0 %}

{% if is_running %}{{ disconnected_connections | length }} integration{{ 's' if disconnected_connections | length != 1 else '' }} down — cost and scaling data may be incomplete.{% endif %} Disconnected: {{ disconnected_connections | join(', ') }}

{% endif %} {% if not is_running %}Check agent{% else %}Reconnect integrations{% endif %} →
{% endfor %} {% else %}

✓ All {{ accounts|length }} account{{ 's' if accounts|length != 1 else '' }} are running healthy

{% endif %} {% endblock %}