mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-24 22:44:04 +08:00
fixup prometheus labels
This commit is contained in:
parent
cc96d95940
commit
da7fa826d0
1 changed files with 1 additions and 2 deletions
|
@ -66,7 +66,7 @@ def metric_writer(config_dict: dict, restic_result: bool, result_string: str):
|
|||
|
||||
# Configure lables
|
||||
label_string = ",".join(
|
||||
[f"{key}={value}" for key, value in labels.items() if value]
|
||||
[f"{key}=\"{value}\"" for key, value in labels.items() if value]
|
||||
)
|
||||
try:
|
||||
# Make sure we convert prometheus_additional_labels to list if only one label is given
|
||||
|
@ -81,7 +81,6 @@ def metric_writer(config_dict: dict, restic_result: bool, result_string: str):
|
|||
logger.debug("Trace:", exc_info=True)
|
||||
|
||||
label_string += ',npversion="{}{}"'.format(NAME, VERSION)
|
||||
|
||||
errors, metrics = restic_output_2_metrics(
|
||||
restic_result=restic_result, output=result_string, labels=label_string
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue