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

sflow-to-rrd-handler: spikes when API key disappears #829

Open
nickhilliard opened this issue Feb 14, 2023 · 3 comments · May be fixed by #845
Open

sflow-to-rrd-handler: spikes when API key disappears #829

nickhilliard opened this issue Feb 14, 2023 · 3 comments · May be fixed by #845

Comments

@nickhilliard
Copy link
Member

If the API key disappears, then sflow-to-rrd-handler will not zero out the matrix on each write, causing the graph output to increase monotonically.

Probably the process needs to trap authorization problems in reload_mactable() and abort if authorization is unsuccessful, as that is a terminal error that cannot be resolved without operator intervention.

@agbcix
Copy link

agbcix commented May 16, 2023

We are experiencing a similar, but maybe more generic issue here. [Or do you consider this a different issue?]

Whenever the API is unavailable (database, webserver, ...), sflow-to-rrd-handler will block in reload_mactable() and eventually produce spikes.

It'd be cool to decouple reload_mactable() from the main loop, e.g. short timeout and improved error handling.

@barryo
Copy link
Member

barryo commented May 16, 2023

PRs welcome @agbcix if you have perl skillz. See this page on contributing.

@agbcix
Copy link

agbcix commented May 16, 2023

I looked into this more deeply now. It seems like reload_mactable() is dealing well with the timeout etc.

But: Upon any error (timeout, authentication issue, ...) the $newmactable will be undefined. Only if $newmactable is defined, we are running matrix_init() which is actually flushing the in-memory data.

Proposed fix (no PR yet):
run $matrix = matrix_init($mactable, $infraid); unconditionally.

agbcix added a commit to bcix/IXP-Manager that referenced this issue May 17, 2023
Previously the counters were not reset in case the API was unreachable.
After writing data to RRDs new counters need to be initialized.
@agbcix agbcix linked a pull request May 17, 2023 that will close this issue
3 tasks
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

Successfully merging a pull request may close this issue.

3 participants