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

How to use in a cluster #14

Open
PhillippOhlandt opened this issue May 28, 2018 · 8 comments
Open

How to use in a cluster #14

PhillippOhlandt opened this issue May 28, 2018 · 8 comments

Comments

@PhillippOhlandt
Copy link

Hey,

how would one use this in a cluster of nodes? I don't use it to collect operating system or vm metrics but metrics about my application state. That means every node should give me (kinda) the same metrics.

Has someone done this yet? What is the easiest approach?

@deadtrickster
Copy link
Owner

Hi, could you please be more specific? The reason I asked is that there is no really difference whether it's a cluster or not. You custom metrics are just metrics, they have instance label attached, etc.

@PhillippOhlandt
Copy link
Author

The lib itself works with ETS so the metrics state is not distributed to all members in a cluster. I want that the /metrics endpoint of all of my nodes return the same metrics so I just need to scrape one of my nodes and not all of them. I think I need a wrapper that does the replication of all metric changes across the cluster.

@deadtrickster
Copy link
Owner

but why?

@PhillippOhlandt
Copy link
Author

Because I see my state as one unit and not as a unit per node. Each node will have a different part of the whole state and all entrypoints (/metrics, graphql api, etc.) should show the whole state and not just the one from the current node.

@deadtrickster
Copy link
Owner

but what you will do if network split, how you'll know the state (and the issues) of the particular node? plus prometheus does exactly this - aggregates.

@PhillippOhlandt
Copy link
Author

but what you will do if network split, how you'll know the state

Valid question for everything distributed

plus prometheus does exactly this - aggregates.

yes it does, but I do not want to reconfigure prometheus every time I scale up. I also don't want to limit myself with having each node exposing a webserver.

@deadtrickster
Copy link
Owner

reconfigure prometheus every time I scale up

I think this is what service discovery for.

I understand that other concerns (incl not having http endpoint) are important to you, but in prometheus world even reachability is a metric itself (and a good source of alerts). If you don't want to have plugs/phoenix, you can look at zero-dependency exporter - https://github.com/deadtrickster/prometheus-httpd.

@PhillippOhlandt
Copy link
Author

I actually use prometheus as my main time series long time storage and I don't trust service discovery that much. It also often requires yet another piece of software and from a quick google search, prometheus doesn't seem to support SSDP.

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

No branches or pull requests

2 participants