mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 08:36:55 +03:00
Compare commits
2 Commits
hide-remot
...
vmalert-pa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1a938cf1a | ||
|
|
eb75135d0f |
@@ -249,9 +249,12 @@ func (c *Client) setPrometheusRangeReqParams(r *http.Request, query string, star
|
||||
if c.appendTypePrefix {
|
||||
r.URL.Path += "/prometheus"
|
||||
}
|
||||
if !*disablePathAppend {
|
||||
r.URL.Path += "/api/v1/query_range"
|
||||
}
|
||||
|
||||
// deliberately ignore *disablePathAppend
|
||||
// if we don't append path, then newQueryRangeRequest and newQueryRequest will produce the same URL path and will become
|
||||
// indistinguishable for remote datasource. This may lead to confusion as in https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9779
|
||||
r.URL.Path += "/api/v1/query_range"
|
||||
|
||||
q := r.URL.Query()
|
||||
q.Add("start", start.Format(time.RFC3339))
|
||||
q.Add("end", end.Format(time.RFC3339))
|
||||
|
||||
@@ -566,6 +566,22 @@ func TestRequestParams(t *testing.T) {
|
||||
checkEqualString(t, "/prometheus/api/v1/query_range", r.URL.Path)
|
||||
})
|
||||
|
||||
// disable path append
|
||||
*disablePathAppend = true
|
||||
f(false, &Client{
|
||||
dataSourceType: datasourcePrometheus,
|
||||
}, func(t *testing.T, r *http.Request) {
|
||||
checkEqualString(t, "", r.URL.Path)
|
||||
})
|
||||
|
||||
f(true, &Client{
|
||||
dataSourceType: datasourcePrometheus,
|
||||
}, func(t *testing.T, r *http.Request) {
|
||||
// path expected to be present despite *disablePathAppend setting
|
||||
checkEqualString(t, "/api/v1/query_range", r.URL.Path)
|
||||
})
|
||||
*disablePathAppend = false
|
||||
|
||||
// graphite path
|
||||
f(false, &Client{
|
||||
dataSourceType: datasourceGraphite,
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
addr = flag.String("datasource.url", "", "Datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect endpoint. Required parameter. "+
|
||||
addr = flag.String("datasource.url", "", "Datasource compatible with Prometheus or VictoriaLogs HTTP API. It can be single node VictoriaMetrics, vmselect or VictoriaLogs endpoint. Required parameter. "+
|
||||
"Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. "+
|
||||
"See also -remoteRead.disablePathAppend and -datasource.showURL")
|
||||
appendTypePrefix = flag.Bool("datasource.appendTypePrefix", false, "Whether to add type prefix to -datasource.url based on the query type. Set to true if sending different query types to the vmselect URL.")
|
||||
|
||||
@@ -29,6 +29,7 @@ See also [LTS releases](https://docs.victoriametrics.com/victoriametrics/lts-rel
|
||||
* SECURITY: upgrade Go builder from Go1.25.0 to Go1.25.1. See [the list of issues addressed in Go1.25.1](https://github.com/golang/go/issues?q=milestone%3AGo1.25.1%20label%3ACherryPickApproved).
|
||||
|
||||
* FEATURE: [vmalert](https://docs.victoriametrics.com/victoriametrics/vmalert/): add `-rule.resultsLimit` command-line flag to allow limiting the number of alerts or recording results a single rule can produce. See [#5792](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5792).
|
||||
* FEATURE: [vmalert](https://docs.victoriametrics.com/victoriametrics/vmalert/): ignore `-remoteRead.disablePathAppend` setting during [rules backfilling](https://docs.victoriametrics.com/victoriametrics/vmalert/#rules-backfilling). See [#9779](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9779).
|
||||
* FEATURE: [vmauth](https://docs.victoriametrics.com/victoriametrics/vmauth/): stream responses from backends to clients without delays. Previously the backend data could be buffered at `vmauth` side for indefinite amounts of time. This was preventing from using `vmauth` for streaming the data from backends in [live tailing mode](https://docs.victoriametrics.com/victorialogs/querying/#live-tailing). See [VictoriaLogs#667](https://github.com/VictoriaMetrics/VictoriaLogs/issues/667).
|
||||
* FEATURE: [vmbackup](https://docs.victoriametrics.com/victoriametrics/vmbackup/), [vmrestore](https://docs.victoriametrics.com/victoriametrics/vmrestore/): push metrics to configured `-pushmetrics.url` on shutdown. Before, if `-pushmetrics.url` was configured, vmbackup or vmrestore might have skipped to report their metrics before shutdown.
|
||||
* FEATURE: [dashboards/operator](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/operator.json), [dashboards/query-stats](https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/dashboards/query-stats.json): add ad-hoc filters.
|
||||
|
||||
@@ -70,7 +70,7 @@ See the docs at https://docs.victoriametrics.com/victoriametrics/vmalert/ .
|
||||
-datasource.tlsServerName string
|
||||
Optional TLS server name to use for connections to -datasource.url. By default, the server name from -datasource.url is used
|
||||
-datasource.url string
|
||||
Datasource compatible with Prometheus HTTP API. It can be single node VictoriaMetrics or vmselect endpoint. Required parameter. Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. See also -remoteRead.disablePathAppend and -datasource.showURL
|
||||
Datasource compatible with Prometheus or VictoriaLogs HTTP API. It can be single node VictoriaMetrics, vmselect or VictoriaLogs endpoint. Required parameter. Supports address in the form of IP address with a port (e.g., http://127.0.0.1:8428) or DNS SRV record. See also -remoteRead.disablePathAppend and -datasource.showURL
|
||||
-defaultTenant.graphite string
|
||||
Default tenant for Graphite alerting groups. See https://docs.victoriametrics.com/victoriametrics/vmalert/#multitenancy .This flag is available only in Enterprise binaries. See https://docs.victoriametrics.com/victoriametrics/enterprise/
|
||||
-defaultTenant.prometheus string
|
||||
|
||||
Reference in New Issue
Block a user