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

haproxy - Calculate used session percentage #752

Merged
merged 2 commits into from
Jan 10, 2014
Merged

Conversation

walkeran
Copy link
Contributor

@walkeran walkeran commented Dec 9, 2013

Calculate the percentage of used sessions (spct) from the current number of sessions (scur) and the session limit (slim).

The reasoning behind this was I would like to be able to trigger alerts when the number of current sessions (haproxy.frontend.session.current) approaches the session limit (haproxy.frontend.session.limit). Since one can only alert on a single metric, another metric had to be created, which reflects the percentage of sessions used.

This is quite literally the only python that I've ever hacked up, so feel free to shoot this down if it looks terrible :) That said, I've tested it out and it seems to work as expected on my haproxy installation... hopefully the Travis CI tests work this time.

Calculate the percentage of used sessions (spct) from the current number of sessions (scur) and the session limit (slim).
@remh
Copy link
Contributor

remh commented Jan 10, 2014

Thanks @walkeran !

@remh remh closed this Jan 10, 2014
@remh remh reopened this Jan 10, 2014
remh added a commit that referenced this pull request Jan 10, 2014
haproxy - Calculate used session percentage
@remh remh merged commit 807be28 into DataDog:master Jan 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants