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

added EC2 InstanceLifecycle info as label (new label called lifecycle) #6017

Closed
wants to merge 1 commit into from

Conversation

aesiliato
Copy link

Signed-off-by: aesiliato

NB:
AWS API shows InstanceLifecycle in ec2 describe instances result only if the instance is a spot one. The new feature set value of lifecycle label = normal if InstanceLifecycle doesn't exist on describe instances results.

Signed-off-by: aesiliato <antonioesiliato@ip-192-168-21-54.eu-west-1.compute.internal>
if inst.InstanceLifecycle != nil {
labels[ec2LabelLifecycle] = model.LabelValue(*inst.InstanceLifecycle)
} else {
labels[ec2LabelLifecycle] = "normal"
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's expose what the API exposes, rather than changing it.

Copy link
Author

@aesiliato aesiliato Sep 12, 2019

Choose a reason for hiding this comment

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

Screen Shot 2019-09-12 at 15 50 42
Screen Shot 2019-09-12 at 15 51 04

AWS console applies the same concept as you can see in the attached images... Anyway currently Prometheus cannot retrieve the InstanceLifecycle info even when the API exposes it

Copy link
Contributor

Choose a reason for hiding this comment

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

We expose what the API exposes, not whatever munging other systems may do on top.

@@ -54,6 +54,7 @@ require (
github.com/prometheus/client_golang v1.1.0
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4
github.com/prometheus/common v0.6.0
github.com/prometheus/procfs v0.0.4 // indirect
Copy link
Member

Choose a reason for hiding this comment

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

that's unrelated

@stale stale bot added the stale label Feb 19, 2020
@ghost ghost mentioned this pull request Mar 1, 2020
@beorn7
Copy link
Member

beorn7 commented Aug 17, 2020

Superseded by #6914

@beorn7 beorn7 closed this Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants