Hi all -
We have a monitoring/stats-collecting service curling a
"/haproxy?stats" URI rather frequently. In order to stop these
requests from spamming the logs, I tried a few different approaches,
and I think that their failure to achieve what I needed point towards
some possible enhancements that others may find useful. Here's what I
tried, with the change I'd like to propose:
1) Declare "monitor-net $stats-server/32". This resulted in the "only
respond with a 200/5xx" behaviour of monitor-net taking precedence
over the "stats uri" setting. Any chance of changing this ordering for
the single stats-uri only? It would seem to make more sense --
especially as stats is only a single path whereas monitor-net requests
can hit any other path -- but I totally appreciate it may not be that
simple behind the scenes.
2) Set up a dedicated stats-listener listen stanza with "option
dontlog-normal". This didn't have any effect - even though 200s are
returned, their logs aren't silenced by this setting. I suggest they
should be.
3) Use a dedicated stats-listener with no logging configured. This
ultimately worked, but I encountered some global/default interactions
which forced me to change more of the configuration than I had hoped.
The config included:
global
log 127.0.0.1 local0 info
defaults
log global
... which is, I believe, a commonly recommended pattern to ensure that
logging isn't forgotten for any front-/back-end.
Unfortunately I then couldn't *disable* logging from the dedicated
stats listener. I had to remove "log global" from defaults, and add it
to every listener individually *except* the stats listener.
I could still use the common logging config pattern if "log global",
or perhaps individual "log <server> <etc> <etc>" lines could be
negated at the listener level when inherited from the defaults
section. Any chance of this being possible?
In an unrelated question, could I ask if there's any plan to increase
the number of subnets passable to monitor-net; or perhaps just an
increase in the number of times it can be specified incrementally
without overriding the last setting?
Many thanks,
Jonathan
--
Jonathan Matthews
London, UK
http://www.jpluscplusm.com/contact.html