Apache Loadbalancer monitoring for things not in HAProxy #13525
Labels
No labels
announcement
anubis
authentication
aws
backlog
blocked
bodhi
ci
cloud
communishift
copr
database
day-to-day
dc-move
deprecated
dev
discourse
dns
downloads
easyfix
epel
firmitas
forgejo_migration
Gain
High
Gain
Low
Gain
Medium
gitlab
greenwave
hardware
help wanted
high-trouble
koji
koschei
lists
low-trouble
medium-trouble
mirrorlists
monitoring
Needs investigation
odcs
OpenShift
ops
outage
packager_workflow_blocker
pagure
permissions
Priority
Needs Review
Priority
Next Meeting
Priority
🔥 URGENT 🔥
Priority
Waiting on Assignee
Priority
Waiting on External
Priority
Waiting on Reporter
rabbitmq
release-monitoring
releng
request-for-resources
s390x
security
SMTP
sprint-0
sprint-1
src.fp.o
staging
unfreeze
waiverdb
websites-general
wiki
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
infra/tickets#13525
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of request
We have some stuff on the proxies that is not in HAPRoxy, we should do something similar for those.
OK, I started digging into this....
Firstly, the BalancerManager is the place to get data from - see https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html#balancer_manager
However, this is per-vhost, there is no global status equivalent to
/apache-status?auto, so we'll have to add this to the VHost definitions for balancers. Annoying, but not too bad. I tested on forge.stg.fpo using this (indented lines were already present)This allowed me to curl the balancer-manager page locally using a host header:
curl -k -H "Host: forge.stg.fedoraproject.org" 'https://127.0.0.1/balancer-manager'which works, but outputs raw HTML (ugh). I copied to my machine and rendered it locally, see attached screenshot.So, it is possible to do this, via:
Not fun, but doable
The alternative is to rewrite our configs. I've not tested this, but clanker discussions and research suggests that moving the balancer definitions out of the vhosts should mean we can have a single global /balancer-manager page. It would look something like:
Given we generally use the same nodes for all the balanced apps, this might be feasible. Should I test this path before we make a decision? If it works I prefer the latter...
Hum... yeah, if we do 'per balancer' tho all the openshift apps will be lumped into one bucket right?
So, for me it would be better if they were per virthost so we could split them out and see if say bodhi was getting a lot of traffic, but koschei wasn't, etc.
Or does the global one also report per virthost, just on the same page?
I think we can do per-virthost, so long as the actual definitions are outside the virthost. I 'll test it on STG, I can't see any harm if the changes are in managed files, we can always re-run the playbook
Alright, I did some experiments on staging, and this seems fairly achievable. Basically, it's:
This means we can keep our existing loops/tasks over the list of ocp apps, and just change the hardcoded "ocp-apps" balancer to "$virthost-balancer" or something. Here's the actial change I made to both proxy01.stg and proxy02.stg
Here's a screenshot of the rendered HTML for
curl -kL 'http://127.0.0.1/balancer-status'That still doesn't make it super parseable by Zabbix, but I guess we can something with the
<td>entries ...Yeah, the info there doesn't look super great either... just 'to' and 'from'. I guess thats requests?
Yeah, it's not great, but I think we can work with it, if we decide to.
The interesting info appears to be:
That seems enough to track things like failed backends (assuming we define a HC), problem workers, and balancing info. The only wrinkle is parsing the data in Zabbix, but I think I can do that.
Shall I work up a PR we can try in stg?
yeah, thats nearly not the interesting info we get from haproxy. ;(
Lets ponder on it, and perhaps discuss in the meeting thursday.
We may want to see how hard it would be to just convert all the apache balancers over to haproxy and reuse the haproxy monitoring on them. The hard part is the seperate port for each service.
Looks like we're not going to go this way - the change is large and the return on it is not great.
I'll close this, but I'll open a new spike for looking at migrating things to HAProxy, and refer back here.