Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics "*_last_*_status" return invalid values starting from 2.1.0 #599

Closed
Reuuke opened this issue Jan 27, 2023 · 5 comments
Closed

Metrics "*_last_*_status" return invalid values starting from 2.1.0 #599

Reuuke opened this issue Jan 27, 2023 · 5 comments
Assignees
Milestone

Comments

@Reuuke
Copy link

Reuuke commented Jan 27, 2023

After upgrading to 2.1.3, we found that the "clickhouse_backup_last_create_status" metric always returns 2 (unknown), regardless of the actual status.
The way I did my test is the following :

$ clickhouse-backup --version
Version:	 2.1.3
Git Commit:	 f3e6a5667371bfa122e5a907b68e5004b40251f7
Build Date:	 2022-12-26

$ curl -s localhost:7171/metrics | grep -E "clickhouse_backup_last_create_status|clickhouse_backup_last_upload_status"
clickhouse_backup_last_create_status 2
clickhouse_backup_last_upload_status 2

$ curl -s localhost:7171/backup/create -X POST
{"status":"acknowledged","operation":"create","backup_name":"2023-01-27T18-58-58"}

$ curl -s localhost:7171/backup/status
{"command":"create","status":"success","start":"2023-01-27 18:58:58","finish":"2023-01-27 18:58:59"}

$ curl -s localhost:7171/backup/upload/2023-01-27T18-58-58
{"status":"acknowledged","operation":"upload","backup_name":"2023-01-27T18-58-58","diff":false}

$ curl -s localhost:7171/backup/status
{"command":"upload 2023-01-27T18-58-58","status":"success","start":"2023-01-27 19:05:23","finish":"2023-01-27 19:07:52"

$ curl -s localhost:7171/metrics | grep -E "clickhouse_backup_last_create_status|clickhouse_backup_last_upload_status"
clickhouse_backup_last_create_status 2
clickhouse_backup_last_upload_status 2

I expected the values to be set to 1 but it stays at 2 after a successful backup and upload.

This metric returns the correct value on versions 1.x.x and 2.0.0, all versions 2.1.x return 2 always.

How you have any idea why? Did I miss something?

@Slach
Copy link
Collaborator

Slach commented Jan 28, 2023

Thanks for reporting, try to fix it ASAP
could you check latest master?

@Slach Slach self-assigned this Jan 28, 2023
@Slach Slach added this to the 2.2.0 milestone Jan 28, 2023
@Reuuke
Copy link
Author

Reuuke commented Jan 30, 2023

Yep, checked - the same behavior, value is not updating.

@ppavlov39
Copy link

ppavlov39 commented Feb 3, 2023

Hi! We also have such a problem and, in addition, the wrong value of the counters of failed and successful backups (always 0).

@Slach Slach closed this as completed in 7f8664c Feb 3, 2023
@Slach
Copy link
Collaborator

Slach commented Feb 3, 2023

@ppavlov39 @Reuuke could you check altinity/clickhouse-backup:master docker image?

@ppavlov39
Copy link

@Slach Hi!
I just have checked metrics and with the docker images (tag: master) they are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants