Repository navigation
bind: query the zones resource only for the view group - #306
Open
vignesh2027 wants to merge 1 commit into
Open
vignesh2027 wants to merge 1 commit into
vignesh2027 wants to merge 1 commit into
Conversation
The zone serials come from the view collector, but both clients fetched the zones resource on every scrape. With server or tasks as the only enabled group the extra request was wasted work on servers with many zones, and any failure of it turned bind_up to 0 and dropped the server metrics too. Only request the resource when the view group is enabled. The failure test now enables the groups explicitly, since it relied on the zones request to fail with no groups at all. Signed-off-by: vigneshwar <applemacbook6sep2004@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The zone serials are exported by the view collector, but both the JSON and the XML client requested the zones resource on every scrape, whatever
--bind.stats-groupssaid. With onlyserverortasksenabled that was an extra request per scrape, which is costly on servers with thousands of zones (see #210). If that request failed,bind_upwent to 0 and the server metrics were dropped as well.This only queries the zones resource when the
viewgroup is enabled. Default behaviour is unchanged, since the default groups areserver,view. One visible difference: with--bind.stats-groupsset to an empty list the exporter now makes no requests at all and reportsbind_up 1, where before the zones request alone decidedbind_up.TestBindExporterBindFailurehad no groups set and only sawbind_up 0because the zones request failed. It now enables server and view explicitly. New tests make the zones resource answer with a 500 and check that the server and tasks groups still work for both clients, and that the view group still reportsbind_up 0. They fail without the change.