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

Fix snapshot_stats metrics which happens on HA hdfs type snapshot rep… #442

Merged

Conversation

bydeath
Copy link
Contributor

@bydeath bydeath commented Jun 17, 2021

…ository

fix issue #415
err logs: "failed to fetch and decode snapshot stats" err:"json: cannot unmarshal object into Go struct field .settings of type string" "

repository-hdfs is an elasticsearch plugin: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs-config.html#repository-hdfs-config

…ository

fix issue 415
err logs: "failed to fetch and decode snapshot stats" err:"json: cannot unmarshal object into Go struct field .settings of type string" "

repository-hdfs is an elasticsearch plugin: https://www.elastic.co/guide/en/elasticsearch/plugins/current/repository-hdfs-config.html#repository-hdfs-config

Signed-off-by: bruc vv <brucvv@gmail.com>
@bydeath bydeath force-pushed the fix-snapshot_stats_unmarshal_err branch from a5ba19c to 4f20bba Compare June 17, 2021 07:10
Type string `json:"type"`
Settings map[string]string `json:"settings"`
Type string `json:"type"`
Settings map[string]interface{} `json:"settings"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we don't use the value of settings anywhere, we could just remove the field 🤔

Copy link
Contributor Author

@bydeath bydeath Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the value of settings is not used now. I tried it worked without Settings field, and it's another way to fix the bug.

remove unused field `Settings` of the struct `SnapshotRepositoriesResponse`.

Signed-off-by: bruc vv <brucvv@gmail.com>
@bydeath bydeath force-pushed the fix-snapshot_stats_unmarshal_err branch from b99d073 to 3bad103 Compare June 18, 2021 07:06
@sysadmind sysadmind merged commit eb380d7 into prometheus-community:master Jun 18, 2021
@bydeath bydeath deleted the fix-snapshot_stats_unmarshal_err branch May 16, 2022 07:01
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

Successfully merging this pull request may close these issues.

3 participants