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

Slow metrics endpoint #112

Open
rlex opened this issue May 5, 2021 · 2 comments
Open

Slow metrics endpoint #112

rlex opened this issue May 5, 2021 · 2 comments

Comments

@rlex
Copy link

rlex commented May 5, 2021

Monitoring two routers, both of them have around 100k routes via BGP.

When i call /metrics, it can take up to minute to print them. Does it calls mikrotik API every time i use /metrics?

@nshttpd
Copy link
Owner

nshttpd commented May 6, 2021

Yes, it does. What is your polling rate from prometheus? It doesn't do any sort of caching because it expects that your poll rate from Prometheus is what you want as the granularity of the metrics as reported by the exporter.

I have had the pondering of a couple of things to add in and I should probably just add them as issues to do here at some point. The first is to spin up a collection go func per device with a configurable max concurrency value. So that users with multiple devices won't have to wait for the serialization of all the devices.

The other would be the same thing, but for each metric type that needs to be collected. That I'm wondering on just how bad that would hammer the device API endpoint though. So at the very least I could do the first and see how it helps and then work on the second.

Does that sound like a possible "maybe it would help" thing @rlex?

@nshttpd
Copy link
Owner

nshttpd commented May 7, 2021

Oh, already add the go func per device thing already. I guess it's really just down to the other part then.

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