mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
docs: clarify docs after 5ee344824f
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4183
This commit is contained in:
parent
079875a127
commit
e2358d3bd5
3 changed files with 12 additions and 11 deletions
|
@ -30,7 +30,7 @@ The following tip changes can be tested by building VictoriaMetrics components f
|
|||
* FEATURE: [vmbackup](https://docs.victoriametrics.com/vmbackup.html): store backup creation and completion time in `backup_complete.ignore` file of backup contents. This is useful to determine point in time when backup was created and completed.
|
||||
* FEATURE: [vmbackupmanager](https://docs.victoriametrics.com/vmbackupmanager.html): add `created_at` field to the output of `/api/v1/backups` API and `vmbackupmanager backup list` command. See this [doc](https://docs.victoriametrics.com/vmbackupmanager.html#api-methods) for data format details.
|
||||
* FEATURE: deprecate `-bigMergeConcurrency` command-line flag, since improper configuration for this flag frequently led to uncontrolled growth of unmerged parts, which, in turn, could lead to queries slowdown and increased CPU usage. The concurrency for [background merges](https://docs.victoriametrics.com/#storage) can be controlled via `-smallMergeConcurrency` command-line flag, though it isn't recommended to do in general case.
|
||||
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): support new filtering options `filter` and `node_filter` for [consul service discovery](https://docs.victoriametrics.com/sd_configs.html#consul_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4183) for details.
|
||||
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): support the ability to filter [consul_sd_configs](https://docs.victoriametrics.com/sd_configs.html#consul_sd_configs) targets in more optimal way via new `filter` option. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4183).
|
||||
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): support new [consulagent service discovery](https://docs.victoriametrics.com/sd_configs.html#consulagent_sd_configs). See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3953) for details.
|
||||
* FEATURE: [vmagent](https://docs.victoriametrics.com/vmagent.html): emit a warning if `-remoteWrite.maxDiskUsagePerURL` command-line flag has too small value. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4195).
|
||||
* FEATURE: [vmctl](https://docs.victoriametrics.com/vmctl.html): add support for [different time formats](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#timestamp-formats) for `--vm-native-filter-time-start` and `--vm-native-filter-time-end` command-line flags. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4091).
|
||||
|
|
|
@ -163,11 +163,11 @@ scrape_configs:
|
|||
# Individual tags are also available via __meta_consul_tag_<tagname> labels - see below.
|
||||
# tag_separator: "..."
|
||||
|
||||
# filter is optional filter for service nodes discovery request.
|
||||
# Replaces tags and node_metadata options.
|
||||
# consul supports it since 1.14 version
|
||||
# list of supported filters https://developer.hashicorp.com/consul/api-docs/catalog#filtering-1
|
||||
# syntax examples https://developer.hashicorp.com/consul/api-docs/features/filtering
|
||||
# filter is an optional filter for service discovery.
|
||||
# Replaces tags and node_meta options.
|
||||
# Consul supports it since 1.14 version.
|
||||
# See the list of supported filters at https://developer.hashicorp.com/consul/api-docs/catalog#filtering-1
|
||||
# See filter examples at https://developer.hashicorp.com/consul/api-docs/features/filtering
|
||||
# filter: "..."
|
||||
|
||||
# allow_stale is an optional config, which allows stale Consul results.
|
||||
|
|
|
@ -64,19 +64,20 @@ func newConsulWatcher(client *discoveryutils.Client, sdc *SDConfig, datacenter,
|
|||
}
|
||||
|
||||
serviceNodesQueryArgs := baseQueryArgs
|
||||
// tag is supported only by /v1/health/service/... and isn't supported by /v1/catalog/services
|
||||
for _, tag := range sdc.Tags {
|
||||
serviceNodesQueryArgs += "&tag=" + url.QueryEscape(tag)
|
||||
}
|
||||
|
||||
// filter could be added only for baseQuery requests for /v1/catalog/services
|
||||
// serviceNodesQueryArgs doesn't support it
|
||||
serviceNamesQueryArgs := baseQueryArgs
|
||||
// filter is supported only by /v1/catalog/services and isn't supported by /v1/health/service/...
|
||||
if len(sdc.Filter) > 0 {
|
||||
baseQueryArgs += "&filter=" + url.QueryEscape(sdc.Filter)
|
||||
serviceNamesQueryArgs += "&filter=" + url.QueryEscape(sdc.Filter)
|
||||
}
|
||||
|
||||
cw := &consulWatcher{
|
||||
client: client,
|
||||
serviceNamesQueryArgs: baseQueryArgs,
|
||||
serviceNamesQueryArgs: serviceNamesQueryArgs,
|
||||
serviceNodesQueryArgs: serviceNodesQueryArgs,
|
||||
watchServices: sdc.Services,
|
||||
watchTags: sdc.Tags,
|
||||
|
|
Loading…
Reference in a new issue