Observability Reference
This document lists all the metrics KubeArchive emit and all the labels they use. See Observability on KubeArchive to learn how to configure KubeArchive’s observability stack.
Third-Party Library Metrics
KubeArchive uses third-party library that instrument HTTP clients, gather system metrics, …:
Custom Metrics
KubeArchive exposes the following custom metrics:
workqueue metrics
KubeArchive makes use of queues to receive and process updates from the Kubernetes API. The supported labels are:
-
queue: the name of the queue.
The metrics are:
-
workqueue.adds: total number of additions to the queue. Use withrateto measure how fast the queue is growing. -
workqueue.latency_(sum/count/bucket): seconds that an item is on the queue waiting for processing. Use withrate(sum)/rate(count)to measure latencies, or use thebucketmetrics to inspect quantiles. -
workqueue.duration_(sum/count/bucket): seconds that an item takes to process. Use withrate(sum)/rate(count)to measure latencies, or use thebucketmetrics to inspect quantiles. -
workqueue.retries: total number of times items were added back to the queue for retry. Use withrateto measure how fast the processing is failing. -
workqueue.depth: current number of items on the queue. Use directly. -
workqueue.longest_running: seconds of the longest current active item has been processing. Use directly. -
workqueue.unfinished_work: sum of all the seconds all the processing items are taking. Use directly.
kubearchive.cloudevents
Labels: result, event_type resource_type
Tracks the total number of Cloud Events (resource updates) received aggregated by resource_type,
event_type and result.
-
result: one ofinsert,update,none,error,no_matchorno_conf.-
error: there was an error during the processing of the resource update. This may indicate problems with the database, deleting resources, Cloud Event corruption, etc. Check the logs to find the root cause. -
no_conf: the resource update received is not configured on anyKubeArchiveConfig. This may mean there is something sending Cloud Events to KubeArchive but it should not. -
no_match: the resource update received does not match the conditions for processing. This may indicate that KubeArchiveConfig rules should be refined. -
insert: the resource was inserted into the database. -
update: a resource with the samemetadata.uidexists in the database and it was updated. -
none: a resource with the samemetadata.uidexists in the database and itsmetadata.managedFields.timewas newer, so there was no update. This may indicate a problem with the system that sends resource updates.
-
-
resource_type: a combination of the resourceapiVersionandkind. For exampleapps/v1/Deployment,v1/Podsortekton.dev/v1/PipelineRun. -
event_type: one oforg.kubearchive.sinkfilters.resource.add,org.kubearchive.sinkfilters.resource.updateororg.kubearchive.sinkfilters.resource.delete.
kubearchive.updates
Tracks updates received from Kubernetes and delivery from KubeArchive’s Operator to KubeArchive’s Sink.
Labels: event_type, resource_type, result
-
event_type: the Kubernetes event type:ADDED,MODIFIED,DELETEDandBOOKMARK. -
resource_type: the apiVersion and group of the resource the watcher is related to. -
result: one oferror,resync,deliveredorfailed.-
error: the event received was of typeERRORand was not a gone error. -
resync: the event received was of typeERRORand triggered a resync of the watcher (Gone error). -
delivered: the event wasADDED,MODIFIEDorDELETEDand was successfully delivered from the Operator to the Sink. -
failed: the event wasADDED,MODIFIEDorDELETEDand failed to be delivered from the Operator to the Sink.
-