mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
do not print redundant error logs when failed to scrape consul or no… (#5239)
* do not print redundant error logs when failed to scrape consul or nomad target
prometheus performs the same because it uses consul lib which just drops the error(1806bcb38c/api/api.go (L1134)
)
This commit is contained in:
parent
53b2e6aa50
commit
836cccdbd8
3 changed files with 7 additions and 0 deletions
|
@ -12,6 +12,7 @@ The following `tip` changes can be tested by building VictoriaMetrics components
|
|||
## v1.93.x long-time support release (LTS)
|
||||
|
||||
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): properly drop samples if `-streamAggr.dropInput` command-line flag is set and `-remoteWrite.streamAggr.config` contains an empty file. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5207).
|
||||
* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): do not print redundant error logs when failed to scrape consul or nomad target. See [this pull request](https://github.com/VictoriaMetrics/VictoriaMetrics/pull/5239).
|
||||
|
||||
## [v1.93.6](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.93.6)
|
||||
|
||||
|
|
|
@ -173,6 +173,9 @@ func getBlockingAPIResponse(ctx context.Context, client *discoveryutils.Client,
|
|||
path += "&index=" + strconv.FormatInt(index, 10)
|
||||
path += "&wait=" + fmt.Sprintf("%ds", int(maxWaitTime().Seconds()))
|
||||
getMeta := func(resp *http.Response) {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return
|
||||
}
|
||||
ind := resp.Header.Get("X-Consul-Index")
|
||||
if len(ind) == 0 {
|
||||
logger.Errorf("cannot find X-Consul-Index header in response from %q", path)
|
||||
|
|
|
@ -121,6 +121,9 @@ func getBlockingAPIResponse(ctx context.Context, client *discoveryutils.Client,
|
|||
path += "&index=" + strconv.FormatInt(index, 10)
|
||||
path += "&wait=" + fmt.Sprintf("%ds", int(maxWaitTime().Seconds()))
|
||||
getMeta := func(resp *http.Response) {
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return
|
||||
}
|
||||
ind := resp.Header.Get("X-Nomad-Index")
|
||||
if len(ind) == 0 {
|
||||
logger.Errorf("cannot find X-Nomad-Index header in response from %q", path)
|
||||
|
|
Loading…
Reference in a new issue