-
Notifications
You must be signed in to change notification settings - Fork 793
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
base: master
Are you sure you want to change the base?
feat: add cluster license collector #833
Conversation
Signed-off-by: kekkokers <kekkokers@gmail.com>
5e4d4a9
to
617e127
Compare
There was a problem hiding this 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
Signed-off-by: kekkokers <kekkokers@gmail.com>
3a30e6f
to
0c74085
Compare
Signed-off-by: kekkokers <kekkokers@gmail.com>
Signed-off-by: kekkokers <kekkokers@gmail.com>
Signed-off-by: kekkokers <kekkokers@gmail.com>
ee49b46
to
e283dcc
Compare
Signed-off-by: kekkokers <kekkokers@gmail.com>
14e324b
to
365715f
Compare
Hello @sysadmind, Thank you for the feedback! Everything has been implemented; let me know if there's anything else to be done. Thanks! |
Signed-off-by: kekkokers <kekkokers@gmail.com>
There was a problem hiding this 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"} |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this code can be removed and use the getURL()
func.
https://github.com/prometheus-community/elasticsearch_exporter/blob/master/collector/util.go#L26
https://github.com/prometheus-community/elasticsearch_exporter/blob/master/collector/snapshots.go#L119-L127
@@ -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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 | |
No description provided.