Will haproxy reload lost stats?


#1

Hi

Did HAProxy reload let stats info to reset ? In our infra, we reload HAProxy continuously due to our cloud nature of apps onboarding. am seeing uptime on haproxy stats reset to seconds and total sessions count doesn’t represent sum of all sessions?

Srinivas Kotaru


#2

Hi Srinivas,

Yes it will, I suppose you could export the stats using the CSV method and use something else to monitor it or maybe use SNMP…


#3

@AaronWest. Thanks for quick info. Not sure that is desired behaviour. We currently pulling haproxy stats using monitoring agents. Due to this behaviour, we are not getting expected to results. for example how many 503 over the period of time etc…


#4

I assume if you gather it using an agent it’s so you can send this data to a monitoring system?

Can it not aggregate that data over time?

You can retrieve the data in a few ways, stats page, stats socket, SNMP or in CSV format. All methods can get the desired information I believe so it’s up to your monitoring solution to track this data properly.