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

Support multiple endpoints for memcache sampler #237

Open
eaddingtonwhite opened this issue Aug 18, 2021 · 2 comments
Open

Support multiple endpoints for memcache sampler #237

eaddingtonwhite opened this issue Aug 18, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@eaddingtonwhite
Copy link

Currently the memcache sampler in Rezolus only supports passing a single Memcache endpoint to monitor and sample
https://github.com/twitter/rezolus/blob/master/src/config/samplers.rs#L93

let endpoint = common.config.samplers().memcache().endpoint().unwrap();
let mut addrs = endpoint.to_socket_addrs().unwrap_or_else(|_| {
fatal!("ERROR: endpoint address is malformed: {}", endpoint);
});
let address = addrs.next().unwrap_or_else(|| {
fatal!("ERROR: failed to resolve address: {}", endpoint);
});
let sampler = Self {
address,
common,
stream: None,
};
if sampler.sampler_config().enabled() {
sampler.register();
}

It would be nice if we could pass a comma separated list of host:port memcache endpoints to Rezolus memcache sampler. This would allow you to run a single Rezolus agent to monitor multiple Memcache process or containers on a single host. The config might look something like this:

# An example config that produces percentile metrics for specific Memcached stats
# while preserving the original metric names.

[general]
listen = "0.0.0.0:4242"
fault_tolerant = false
reading_suffix = ""

[samplers]
[samplers.memcache]
enabled = true
endpoint = "localhost:11211,localhost:11212,localhost:11213,localhost:11214"

An alternative would be to run a Rezolus agent per memcache process 1:1 but this creates additional overhead for end user to configure and run on host in this way.

@eaddingtonwhite eaddingtonwhite changed the title Support multiple endpoints for memecache sampler Support multiple endpoints for memcache sampler Aug 18, 2021
@brayniac
Copy link
Contributor

Interesting idea. Definitely possible to support something like this, but it also raises the question of how we'd expose these on a per-instance basis. This is a somewhat larger question in terms of how we want to support "scoped" metrics. #109

Similar considerations should be made for per disk, or per core telemetry.

That said, it should be possible to do something for this sampler without solving the entire problem. I'd welcome a PR to add this functionality to the memcache sampler - I don't currently have bandwidth to work on the implementation or a real use-case for this. But it does seem useful.

@brayniac brayniac added enhancement New feature or request help wanted Extra attention is needed labels Aug 18, 2021
@thinkingfish

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants