{% extends 'admin/master.html' %} {% macro pct(part, whole) -%} {%- if whole -%} {{ "%.0f"|format(100.0 * part / whole) }}% {%- else -%} 0% {%- endif -%} {%- endmacro %} {% macro freshness_badge(state) -%} {%- if state == 'never' -%} never {%- elif state == 'very_old' -%} stale >7d {%- elif state == 'old' -%} stale >24h {%- endif -%} {%- endmacro %} {% block head %} {{ super() }} {% endblock %} {% block body %}

Data Quality

Snapshot generated {{ now.strftime('%Y-%m-%d %H:%M UTC') }}. Counts cover non-template, non-object hosts; archived rows are listed separately so they don't inflate the live counts.

{# ---- KPI scorecard ---- #} {% set live = totals.live %} {% set with_missing = totals.with_missing %} {% set stale_pct = (100.0 * totals.stale / live) if live else 0 %} {% set missing_pct = (100.0 * with_missing / live) if live else 0 %} {# Stale links go straight to the Hosts list filtered to is_stale=yes. #} {% set stale_link = host_list_url ~ '?flt0_' ~ stale_filter_idx ~ '=yes' if stale_filter_idx is not none else '#per-source' %}
Live hosts
{{ live }}
{{ totals.archived }} archived
Stale
{{ totals.stale }}
{{ pct(totals.stale, live) }} of live
{% if has_cmdb_schema %}
Missing CMDB fields
{{ with_missing }}
{{ pct(with_missing, live) }} of live
{% endif %}
Duplicate hostname groups
{{ totals.duplicate_clusters }}
probable collisions
Silent sources
{{ totals.silent_sources }}
never & >7d
{# ---- Lifecycle distribution + per-source ---- #}

Lifecycle distribution

{% for state, count in lifecycle_counts.items() %} {% endfor %}
{{ state.replace('_', ' ').title() }} {% if lifecycle_filter_idx is not none %} {{ count }} {% else %} {{ count }} {% endif %}

Per-source breakdown

⬇ CSV
{% for row in sources %} {% set source_link = host_list_url ~ '?flt0_' ~ account_filter_idx ~ '=' ~ row.name if account_filter_idx is not none and row.name != '(none)' else None %} {% else %} {% endfor %}
Source Total live Stale Archived Last seen
{% if source_link %} {{ row.name }} {% else %} {{ row.name }} {% endif %} {% if source_link %} {{ row.total }} {% else %} {{ row.total }} {% endif %} {% if row.stale %} {% if source_link and stale_filter_idx is not none %} {{ row.stale }} {% else %} {{ row.stale }} {% endif %} {% else %} 0 {% endif %} {% if row.archived %} {% if archive_list_url and row.name != '(none)' %} {{ row.archived }} {% else %} {{ row.archived }} {% endif %} {% else %} 0 {% endif %} {% if row.last_seen %} {{ row.last_seen.strftime('%Y-%m-%d %H:%M') }} {% else %} never {% endif %} {{ freshness_badge(row.freshness) }}
No live hosts.
{# ---- Per-object-type breakdown ---- #}

Per-object-type breakdown

⬇ CSV
{% if has_cmdb_schema %} {% endif %} {% for row in types %} {% if has_cmdb_schema %} {% endif %} {% else %} {% endfor %}
Object type Total live StaleWith missing fields
{{ row.name }} {{ row.total }} {% if row.stale %} {{ row.stale }} {% else %}0{% endif %} {% if row.with_missing_fields %} {{ row.with_missing_fields }} ({{ pct(row.with_missing_fields, row.total) }}) {% else %}0{% endif %}
No live hosts.
{# ---- Most-missed CMDB fields ---- #} {% if has_cmdb_schema %}

Most-missed CMDB fields (top {{ missing_top|length }})

⬇ CSV
{% if missing_top %}
{% for field, count in missing_top %} {% endfor %}
Field Hosts missing it % of live
{{ field }} {{ count }} {{ pct(count, live) }}
{% else %}

All configured fields are filled in.

{% endif %} {% endif %} {# ---- Silent sources ---- #}

Configured accounts with no live hosts ({{ silent_sources|length }})

⬇ CSV
{% if silent_sources %}
{% for row in silent_sources %} {% endfor %}
AccountType
{% if account_edit_url %} {{ row.name }} {% else %} {{ row.name }} {% endif %} {{ row.type }}
{% else %}

All enabled accounts have delivered at least one host.

{% endif %} {# ---- Possible duplicate hostnames ---- #}

Possible duplicate hostnames (top {{ duplicates|length }})

⬇ CSV
{% if duplicates %}
{% for cluster in duplicates %} {% endfor %}
GroupHostnames
{{ cluster|length }} {% for name in cluster %} {% if hostname_filter_idx is not none %} {{ name }} {% else %} {{ name }} {% endif %} {% endfor %}
{% else %}

No duplicate-looking hostnames found.

{% endif %} {# ---- Per-host empty CMDB fields ---- #} {% if has_cmdb_schema %}

Hosts with empty CMDB fields (first {{ empty_fields|length }})

⬇ CSV
{% if empty_fields %}
{% for row in empty_fields %} {% endfor %}
Hostname Type Missing fields
{% if hostname_filter_idx is not none %} {{ row.hostname }} {% else %} {{ row.hostname }} {% endif %} {{ row.object_type }} {% for f in row.missing %} {{ f }} {% endfor %}
{% else %}

All configured fields are filled in.

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