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

Can relabelling be used to query multiple services on the same server? #1674

Closed
gouthamve opened this Issue May 27, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@gouthamve
Copy link
Member

gouthamve commented May 27, 2016

Hi,

We have a unique use case, where we are running 10 services (All the same type) on one instance. Can I use EC2 SD relabelling to ask prometheus to scrape 10 ports for the same instance (instanceId)?

Thanks,
Goutham

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 27, 2016

You'll need 10 scrape configs to do that.

@gouthamve

This comment has been minimized.

Copy link
Member Author

gouthamve commented May 27, 2016

Hmm,

Sounds okay as long as I can relabel the job tag to point to the same thing. Thats possible right? I am just about to start a POC on this.

Also, I am thinking instead of having 10 different time series for the same instance, can I relabel the address for all the 10 to be the same address? Or will it change how the metrics are handled?

Thanks,
Goutham.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 27, 2016

Yes, that's possible. Job names in scrape configs must be unique, so you'll need to use relabelling on 9 of them to get the same value.

The instance labels will be different for them, which will distinguish them.

@gouthamve

This comment has been minimized.

Copy link
Member Author

gouthamve commented May 27, 2016

What if I don't want to distinguish them? I will running a large cluster with 10 services on each machine.

Having the details on a service level will increase the number of series 10x and it doesn't make sense for me to monitor on a service level. Server level monitoring make sense. Also not having a metric level retention policy makes me keep all the series even after using a recording rule to aggregate.

That was what made me go for unifying the instance label for all services on that instance, but I am not sure how it impacts storage/metrics.

@gouthamve

This comment has been minimized.

Copy link
Member Author

gouthamve commented May 27, 2016

Hmm, for the 10 scrape-configs, in each scrape config, I am specifying the ec2_sd_config. Will that make 10 lookups?

The describe instances call is throttled easily if a lot of instances are returned. Can we have a global ec2 lookup as, if a lot of jobs are there, throttling will become an issue.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented May 27, 2016

For 10 servers I doubt you have enough time series to run into performance issues.

Yes, it'll do 10 ec2 lookups. If you wish to avoid that I'd suggest doing your own lookups and writing to file_sd.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.