Skip to content

Commit

Permalink
retrieve ingestion metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Fiedorowicz <[email protected]>
  • Loading branch information
mfiedorowicz committed Sep 18, 2024
1 parent e56bfd3 commit 88156fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion netbox_diode_plugin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,19 @@ def get(self, request):
only_metrics=True
)

metrics = {
"new": ingestion_metrics.metrics.new or 0,
"reconciled": ingestion_metrics.metrics.reconciled or 0,
"failed": ingestion_metrics.metrics.failed or 0,
"no_changes": ingestion_metrics.metrics.no_changes or 0,
"total": ingestion_metrics.metrics.total or 0,
}

context = {
"next_page_token": resp.next_page_token,
"ingestion_logs_table": table,
"total_count": resp.metrics.total,
"ingestion_metrics": ingestion_metrics,
"ingestion_metrics": metrics,
}

except ReconcilerClientError as error:
Expand Down

0 comments on commit 88156fa

Please sign in to comment.