Skip to content

Monitoring

Julien edited this page Jun 17, 2019 · 10 revisions

As it can be useful to monitor the backup process, Bivac publishes a Prometheus endpoint. Among the generic golang metrics, Bivac exposes the following metrics:

  • bivac_backupExitCode returns 0 if the backup operation was successfully run and 1 when it failed.
  • bivac_build_info returns generic informations about the build currently in use.
  • bivac_lastBackup returns the timestamp of the latest volume's backup.
  • bivac_oldestBackup returns the timestamp of the oldest volume's backup.

From a bivac agent container:

$ curl $BIVAC_REMOTE_SERVER/metrics
# HELP bivac_backupExitCode Status of the last backup
# TYPE bivac_backupExitCode gauge
bivac_backupExitCode{hostname="testing",volume_id="canary",volume_name="canary"} 0.0
# HELP bivac_build_info Bivac build informations
# TYPE bivac_build_info gauge
bivac_build_info{build_date="2019-05-06",commit_sha="077a21cae2a96e2d14dd0c098f8fe6e6fddaeb85",golang_version="go1.11.9",version="2.0.0-21-g077a21c"} 1.0
# HELP bivac_oldestBackup Date of the oldest snapshot
# TYPE bivac_oldestBackup gauge
bivac_oldestBackup{hostname="testing",volume_id="canary",volume_name="canary"} 1.559249337e+09
...