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

feat: add cluster license collector #833

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kekkker
Copy link

@kekkker kekkker commented Dec 10, 2023

No description provided.

Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

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

A bit of a refactor and this should be ready. Thanks

collector/cluster_license_response.go Outdated Show resolved Hide resolved
collector/cluster_license_test.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
collector/cluster_license.go Outdated Show resolved Hide resolved
collector/cluster_license.go Outdated Show resolved Hide resolved
Signed-off-by: kekkokers <[email protected]>
@kekkker
Copy link
Author

kekkker commented Dec 12, 2023

Hello @sysadmind, Thank you for the feedback! Everything has been implemented; let me know if there's anything else to be done. Thanks!

Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

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

Otherwise, I think everything looks good.

}

var (
defaultClusterLicenseLabels = []string{"issued_to", "issuer", "type", "status"}
Copy link
Contributor

Choose a reason for hiding this comment

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

@SuperQ What do you think of these labels? type and status seem like normal labels, but I'm not sure about issued_to or issuer. I'm not sure that they cause any harm here, but I'm not sure of the tradeoffs.


u := *c.u
u.Path = path.Join(u.Path, "/_license")
res, err := c.hc.Get(u.String())
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -263,6 +263,10 @@ Further Information
| elasticsearch_data_stream_stats_json_parse_failures | counter | 0 | Number of parsing failures for Data Stream stats |
| elasticsearch_data_stream_backing_indices_total | gauge | 1 | Number of backing indices for Data Stream |
| elasticsearch_data_stream_store_size_bytes | gauge | 1 | Current size of data stream backing indices in bytes |
| elasticsearch_cluster_license_expiry_date_seconds | gauge | 1 | License expiry date since unix epoch in second s |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| elasticsearch_cluster_license_expiry_date_seconds | gauge | 1 | License expiry date since unix epoch in second s |
| elasticsearch_cluster_license_expiry_date_seconds | gauge | 1 | License expiry date since unix epoch in seconds |

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