mirror of
https://github.com/netinvent/npbackup.git
synced 2025-09-11 07:25:47 +08:00
Improve npbackup prometheus metric by adding state
This commit is contained in:
parent
eb75c91212
commit
22bdccbcac
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ def metric_writer(
|
|||
metrics.append(
|
||||
f'npbackup_oper_state{{{labels},action="{operation}",repo="{repo_name}"}} {0 if restic_result else 1}'
|
||||
)
|
||||
metrics.append(f"npbackup_exec_state{{{labels}}} {exec_state}")
|
||||
metrics.append(f'npbackup_exec_state{{{labels}}},action="{operation}" {exec_state}')
|
||||
logger.debug("Metrics computed:\n{}".format("\n".join(metrics)))
|
||||
if destination:
|
||||
logger.debug("Sending metrics to {}".format(destination))
|
||||
|
|
Loading…
Add table
Reference in a new issue