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

pfstats hammers pfdhcp and the API frontend with requests #3634

Closed
julsemaan opened this issue Sep 20, 2018 · 3 comments · Fixed by #3714
Closed

pfstats hammers pfdhcp and the API frontend with requests #3634

julsemaan opened this issue Sep 20, 2018 · 3 comments · Fixed by #3714

Comments

@julsemaan
Copy link
Collaborator

I have a deployment where there are 549 routed networks.

The way the API call for leases statistics is designed, this results in 549 individual API calls every 24 seconds (https://github.com/inverse-inc/packetfence/blob/devel/lib/pfconfig/namespaces/config/Stats.pm#L51)

This results in high disk usage since httpd.api-frontend.access is ginormous and with high load on api-frontend, pfdhcp and rsyslog.

We should optimize this so that it performs a single API call to fetch all the leases information in one shot

@extrafu
Copy link
Member

extrafu commented Sep 26, 2018

@fdurand Let's move to a strategy where we only show alerts for subnets running out of IPs.

@extrafu
Copy link
Member

extrafu commented Sep 26, 2018

Let's not show graphs anymore for DHCP pools.

@julsemaan
Copy link
Collaborator Author

It seems the API endpoint already does exist but is undocumented, its '/api/v1/dhcp/stats' which returns stats for all the pools

So as discussed in the meeting, we should collect all the metrics in a single API call and then store it in statsd and show alerts for scopes with low amount of leases but stop showing the graphs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants