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

Daily Recap

I reviewed {{ cluster_count|default(0) }} cluster{{ 's' if cluster_count|default(0) != 1 else '' }} overnight. {% if attention_count|default(0) > 0 %} {{ attention_count|default(0) }} need{{ 's' if attention_count|default(0) == 1 else '' }} your attention {% else %} Everything looks healthy {% endif %} {% if total_potential_savings|default(0) > 0 %} and there's ${{ total_potential_savings|default(0) | round(2) }}/mo in savings you haven't acted on yet{% if total_opportunity_lost and total_opportunity_lost > 0 %} (${{ total_opportunity_lost | round(2) }} lost in the last 30 days){% endif %}. {% else %}.{% endif %}

OVERVIEW
{% for account in insights.data.cloud_accounts %} {% set c_app = (highlight1.data.app_events.rows | selectattr('account_id', 'equalto', account.id) | first) %} {% set c_node = (highlight1.data.node_events.rows | selectattr('account_id', 'equalto', account.id) | first) %} {% set c_pod = (highlight1.data.pod_events.rows | selectattr('account_id', 'equalto', account.id) | first) %} {% set ev_count = (c_app.event_count if c_app else 0) + (c_node.event_count if c_node else 0) + (c_pod.event_count if c_pod else 0) %} {% set recs = highlight1.data.recommendation_groupings.rows | selectattr('account_id', 'equalto', account.id) | list %} {% set cluster_savings = recs | map(attribute='sum_estimated_savings') | sum %} {% set sec_events = insights.data.recommendation_security_groupings_v2.rows | selectattr('account_id', 'equalto', account.id) | list %} {% set sec_critical = sec_events | map(attribute='count_severity_critical') | sum %} {% set sec_high = sec_events | map(attribute='count_severity_high') | sum %} {% set has_data = (ev_count > 0) or (recs | length > 0) or (sec_events | length > 0) %} {% if has_data %} {% endif %} {% endfor %}
Cluster Events Savings Security  
{{ account.account_name }} {{ ev_count }} {% if cluster_savings > 0 %}${{ cluster_savings | round(2) }}{% else %}—{% endif %} {% if sec_critical > 0 or sec_high > 0 %} {{ sec_critical }}C / {{ sec_high }}H {% else %} ✓ {% endif %} View →
{% for account in insights.data.cloud_accounts %} {% set current_app_event_row = highlight1.data.app_events.rows | selectattr('account_id', 'equalto', account.id) | first %} {% set previous_app_event_row = highlight2.data.app_events.rows | selectattr('account_id', 'equalto', account.id) | first %} {% set current_app_events = current_app_event_row.event_count if current_app_event_row else 0 %} {% set previous_app_events = previous_app_event_row.event_count if previous_app_event_row else 0 %} {% set current_node_event_row = highlight1.data.node_events.rows | selectattr('account_id', 'equalto', account.id) | first %} {% set previous_node_event_row = highlight2.data.node_events.rows | selectattr('account_id', 'equalto', account.id) | first %} {% set current_node_events = current_node_event_row.event_count if current_node_event_row else 0 %} {% set previous_node_events = previous_node_event_row.event_count if previous_node_event_row else 0 %} {% set current_pod_event_row = highlight1.data.pod_events.rows | selectattr('account_id', 'equalto', account.id) | first %} {% set previous_pod_event_row = highlight2.data.pod_events.rows | selectattr('account_id', 'equalto', account.id) | first %} {% set current_pod_events = current_pod_event_row.event_count if current_pod_event_row else 0 %} {% set previous_pod_events = previous_pod_event_row.event_count if previous_pod_event_row else 0 %} {% set total_highlights = current_app_events + current_node_events + current_pod_events %} {% set recommendations = highlight1.data.recommendation_groupings.rows | selectattr('account_id', 'equalto', account.id) | list %} {% set total_recommendations = recommendations | length %} {% set insights_list = insights.data.insight | selectattr('account_id', 'equalto', account.id) | rejectattr('type', 'equalto', 'Optimization') | list %} {% set total_insights = insights_list | length %} {% set security_events = insights.data.recommendation_security_groupings_v2.rows | selectattr('account_id', 'equalto', account.id) | list %} {% set total_security_events = security_events | length %} {% set total_data = total_highlights + total_recommendations + total_insights + total_security_events %} {% if total_data > 0 %}

{{ account.account_name }}

{#- INSIGHTS -#} {% if total_insights > 0 %}
INSIGHTS
{% for insight in insights_list %} {% set apps_count = insight.applications | default([], true) | length %} {% set insight_text = (insight.title ~ ' detected for (' ~ apps_count ~ ') workloads') if (insight.type == 'Troubleshooting' and apps_count > 0) else insight.title %} {% if insight.type in ('Troubleshooting', 'Performance') %}{% set insight_cta = 'Investigate' %} {% elif insight.type == 'Security' %}{% set insight_cta = 'Secure now' %} {% elif insight.type == 'Configuration' %}{% set insight_cta = 'Configure' %} {% elif insight.type in ('Optimization', 'Cost') %}{% set insight_cta = 'Optimize' %} {% elif insight.type == 'InfraUpgrade' %}{% set insight_cta = 'Upgrade' %} {% else %}{% set insight_cta = 'View details' %}{% endif %}

• {{ insight_text }} {% if insight.redirect_url %}   {#- redirect_url is a relative path from computeRedirectURL today; the absolute-URL branch guards a future change to that contract -#} {% set insight_href = insight.redirect_url if insight.redirect_url.startswith(('http://', 'https://')) else base_url ~ ('' if insight.redirect_url.startswith('/') else '/') ~ insight.redirect_url %} {{ insight_cta }} → {% endif %}

{% endfor %} {% endif %} {#- RECOMMENDED ACTIONS -#} {% if total_recommendations > 0 %}
RECOMMENDED ACTIONS
{% set sorted_recommendations = recommendations | sort(attribute='sum_estimated_savings', reverse=True) %} {% for recommendation in sorted_recommendations[:5] %} {% set savings = recommendation.sum_estimated_savings %} {% set rule = recommendation.rule_name %} {#- pod_right_sizing splits into two category rows upstream (ml-k8s-server classify_pod_right_sizing_category): "RightSizing" = requests set but mis-sized, "Configuration" = no requests set. Tag both so the two recap lines read as distinct findings. Mirrors _POD_RIGHT_SIZING_CATEGORY_TAGS in slack/daily_highlight.py. -#} {% set pod_right_sizing_tags = {'RightSizing': ' (resize requests)', 'Configuration': ' (set requests, best practice)'} %} {% set rule_label = rule.replace('_', ' ') %} {% if rule == 'pod_right_sizing' %} {% set rule_label = rule_label ~ pod_right_sizing_tags.get(recommendation.category, '') %} {% endif %} {% if rule == 'eks_cluster_upgrade' %} {% set link_hash = 'security/cluster-upgrade' %} {% elif rule == 'unused_pvc' %} {% set link_hash = 'optimize/unused-volume' %} {% elif rule == 'pod_right_sizing' %} {% set link_hash = 'optimize/right-sizing' %} {% elif rule == 'pv_rightsize' %} {% set link_hash = 'optimize/pv-rightsizing' %} {% elif rule == 'replica_right_sizing' %} {% set link_hash = 'optimize/replica-rightsizing' %} {% elif rule == 'abandoned_resource' %} {% set link_hash = 'optimize/abandoned-resources' %} {% else %} {% set link_hash = 'optimize/summary' %} {% endif %}

• {{ recommendation.count }} {{ rule_label }} {% if savings > 0 %} — save ${{ savings | round(2) }}/mo {% endif %}   {% if 'unused' in rule or 'abandoned' in rule %}Clean up{% elif 'right' in rule or 'replica' in rule %}Apply{% else %}Review{% endif %} →

{% endfor %} {% endif %} {#- HIGHLIGHTS -#} {% if total_highlights > 0 %}
HIGHLIGHTS
vs. previous 24 hours
{% if current_app_events > 0 %}

• Application Errors: {{ current_app_events }} {% set diff_app_events = previous_app_events - current_app_events %} {% if previous_app_events == 0 %} (none yesterday) {% elif diff_app_events > 0 %} (▼ {{ ((diff_app_events / previous_app_events) * 100) | round(0) }}%) {% elif diff_app_events < 0 %} (▲ {{ ((-diff_app_events / previous_app_events) * 100) | round(0) }}%) {% else %} (no change) {% endif %}

{% endif %} {% if current_node_events > 0 %}

• Node Errors: {{ current_node_events }} {% set diff_node_events = previous_node_events - current_node_events %} {% if previous_node_events == 0 %} (none yesterday) {% elif diff_node_events > 0 %} (▼ {{ ((diff_node_events / previous_node_events) * 100) | round(0) }}%) {% elif diff_node_events < 0 %} (▲ {{ ((-diff_node_events / previous_node_events) * 100) | round(0) }}%) {% else %} (no change) {% endif %}

{% endif %} {% if current_pod_events > 0 %}

• Pod Errors: {{ current_pod_events }} {% set diff_pod_events = previous_pod_events - current_pod_events %} {% if previous_pod_events == 0 %} (none yesterday) {% elif diff_pod_events > 0 %} (▼ {{ ((diff_pod_events / previous_pod_events) * 100) | round(0) }}%) {% elif diff_pod_events < 0 %} (▲ {{ ((-diff_pod_events / previous_pod_events) * 100) | round(0) }}%) {% else %} (no change) {% endif %}

{% endif %} {% endif %} {#- SECURITY -#} {% if total_security_events > 0 %}
SECURITY
{% for security_event in security_events %}

• {{ security_event.count_severity_critical }} Critical, {{ security_event.count_severity_high }} High, {{ security_event.count_severity_medium }} Medium, {{ security_event.count_severity_low }} Low across {{ security_event.count_image }} images   Fix now →

{% endfor %} {% endif %} {% endif %} {% endfor %} {% endblock %}