Monitoring Juju Backup All
After the charm is deployed, it exposes prometheus metrics related to backups on port 10000 by default. An example of sample metrics is as follows:
# HELP juju_backup_all_command_duration_seconds Length of time the charm-juju-backup-all backup command took.
# TYPE juju_backup_all_command_duration_seconds gauge
juju_backup_all_command_duration_seconds{result_code="StatusUnknown",status_ok="0"} 0.0
# HELP juju_backup_all_command_ok_info Indicates whether or not the charm-juju-backup-all backup command was a success.
# TYPE juju_backup_all_command_ok_info gauge
juju_backup_all_command_ok_info{result_code="StatusUnknown"} 0.0
# HELP juju_backup_all_backup_failed_total The number of failed backups.
# TYPE juju_backup_all_backup_failed_total counter
juju_backup_all_backup_failed_total 0.0
# HELP juju_backup_all_backup_purged_total The number of purged backups.
# TYPE juju_backup_all_backup_purged_total counter
juju_backup_all_backup_purged_total 0.0
# HELP juju_backup_all_backup_completed_total The number of completed backups.
# TYPE juju_backup_all_backup_completed_total counter
juju_backup_all_backup_completed_total 0.0
To enable monitoring with prometheus with the help of these metrics, relate the charm with a prometheus deployment:
juju relate juju-backup-all <prometheus-k8s offer url>
This works best with prometheus-k8s and grafana-agent-k8s charms. See more about COS lite deployment and cross model relations.