Skip to content

Monitor every backup deployed in the same namespace #1102

Description

@lenglet-k

Summary

As an SRE,
I want to “monitor every backup deployed in the same namespace”
in order to “create a Prometheus rule that detects failed backups.”

Background

Our environment deploys multiple schedules in the same namespace, and each schedule backs up a PostgreSQL database.

In Prometheus, we cannot differentiate between each backup task because the instance label is mapped to the namespace where the task is located. As a result, all our K8up metrics look the same, and worse still, the latest metric overwrites the previous ones, and we cannot add additional labels. It seems sensible to add a schedule or backup task name to the metrics label in order to quickly identify the backup that has failed.

Furthermore, the operator has no metrics indicating that the backup has failed.

Implementation ideas

For restic, grouping metrics by schedule or Backup name or both.

Exemple:

k8up_backup_restic_last_errors{namespace="namespace", cluster="mycluster", backup="backupJob"} 1 

For operator add new metrics:

k8up_backup_failed{namespace="namespace", cluster="mycluster",  schedule="schedule", backup="backupJob"} 1
k8up_backup_succeeded{namespace="namespace", cluster="mycluster", schedule="schedule", backup="backupJob"} 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions