mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
This commit is contained in:
commit
db85f4a1cb
14 changed files with 700 additions and 205 deletions
|
@ -527,7 +527,7 @@ The shortlist of configuration flags is the following:
|
|||
-datasource.queryStep duration
|
||||
queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead.
|
||||
-datasource.queryTimeAlignment
|
||||
Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true)
|
||||
Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true)
|
||||
-datasource.roundDigits int
|
||||
Adds "round_digits" GET param to datasource requests. In VM "round_digits" limits the number of digits after the decimal point in response values.
|
||||
-datasource.tlsCAFile string
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"files": {
|
||||
"main.css": "./static/css/main.098d452b.css",
|
||||
"main.js": "./static/js/main.a292ed17.js",
|
||||
"main.js": "./static/js/main.523bd341.js",
|
||||
"static/js/27.939f971b.chunk.js": "./static/js/27.939f971b.chunk.js",
|
||||
"index.html": "./index.html"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.098d452b.css",
|
||||
"static/js/main.a292ed17.js"
|
||||
"static/js/main.523bd341.js"
|
||||
]
|
||||
}
|
|
@ -1 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="VM-UI is a metric explorer for Victoria Metrics"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"><link rel="manifest" href="./manifest.json"/><title>VM UI</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><script defer="defer" src="./static/js/main.a292ed17.js"></script><link href="./static/css/main.098d452b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="VM-UI is a metric explorer for Victoria Metrics"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png"><link rel="manifest" href="./manifest.json"/><title>VM UI</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"/><script defer="defer" src="./static/js/main.523bd341.js"></script><link href="./static/css/main.098d452b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
2
app/vmselect/vmui/static/js/main.523bd341.js
Normal file
2
app/vmselect/vmui/static/js/main.523bd341.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
808
app/vmui/packages/vmui/package-lock.json
generated
808
app/vmui/packages/vmui/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -6,12 +6,12 @@
|
|||
"dependencies": {
|
||||
"@date-io/dayjs": "^2.13.1",
|
||||
"@emotion/styled": "^11.8.1",
|
||||
"@mui/icons-material": "^5.4.2",
|
||||
"@mui/lab": "^5.0.0-alpha.70",
|
||||
"@mui/material": "^5.4.3",
|
||||
"@mui/styles": "^5.4.2",
|
||||
"@mui/icons-material": "^5.5.1",
|
||||
"@mui/lab": "^5.0.0-alpha.73",
|
||||
"@mui/material": "^5.5.1",
|
||||
"@mui/styles": "^5.5.1",
|
||||
"@testing-library/jest-dom": "^5.16.2",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react": "^12.1.4",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@types/jest": "^27.4.1",
|
||||
"@types/lodash.debounce": "^4.0.6",
|
||||
|
@ -19,16 +19,16 @@
|
|||
"@types/lodash.throttle": "^4.1.6",
|
||||
"@types/node": "^17.0.21",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@types/react": "^17.0.39",
|
||||
"@types/react": "^17.0.40",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@types/react-measure": "^2.0.8",
|
||||
"dayjs": "^1.10.7",
|
||||
"dayjs": "^1.11.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"preact": "^10.6.6",
|
||||
"qs": "^6.10.3",
|
||||
"typescript": "~4.5.5",
|
||||
"typescript": "~4.6.2",
|
||||
"uplot": "^1.6.19",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
|
@ -60,10 +60,10 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.12.1",
|
||||
"@typescript-eslint/parser": "^5.12.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.15.0",
|
||||
"@typescript-eslint/parser": "^5.15.0",
|
||||
"customize-cra": "^1.0.0",
|
||||
"eslint-plugin-react": "^7.29.2",
|
||||
"eslint-plugin-react": "^7.29.4",
|
||||
"react-app-rewired": "^2.2.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,9 @@ The following tip changes can be tested by building VictoriaMetrics components f
|
|||
* FEATURE: [vmalert](https://docs.victoriametrics.com/vmalert.html): add `-rule.resendDelay` command-line flag, which specifies the minumum amount of time to wait before resending an alert to Alertmanager (e.g. this is equivalent to `-rules.alert.resend-delay` option from Prometheus. See [this feature request](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1665).
|
||||
|
||||
* BUGFIX: [Graphite Render API](https://docs.victoriametrics.com/#graphite-render-api-usage): return an additional point after `until` timestamp in the same way as Graphite does. Previously VictoriaMetrics didn't return this point, which could result in missing last point on the graph.
|
||||
* BUGFIX: properly locate series with the given `name` and without the given `label` when using the `name{label=~"foo|"}` series selector. Previously such series could be skipped. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2255). Thanks to @jduncan0000 for discovering and fixing the issue.
|
||||
* BUGFIX: properly free up memory occupied by deleted cache entries for the following caches: `indexdb/dataBlocks`, `indexdb/indexBlocks`, `storage/indexBlocks`. This should reduce the increased memory usage starting from v1.73.0. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2242) and [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2007) issue.
|
||||
* BUGFIX: reduce the interval for checking for free disk space from 30 seconds to 1 second. This should reduce the probability of `no space left on device` panics when `-storage.minFreeDiskSpaceBytes` is set to too low values. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2305).
|
||||
|
||||
|
||||
## [v1.74.0](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.74.0)
|
||||
|
|
|
@ -531,7 +531,7 @@ The shortlist of configuration flags is the following:
|
|||
-datasource.queryStep duration
|
||||
queryStep defines how far a value can fallback to when evaluating queries. For example, if datasource.queryStep=15s then param "step" with value "15s" will be added to every query.If queryStep isn't specified, rule's evaluationInterval will be used instead.
|
||||
-datasource.queryTimeAlignment
|
||||
Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true)
|
||||
Whether to align "time" parameter with evaluation interval.Alignment supposed to produce deterministic results despite of number of vmalert replicas or time they were started. See more details here https://github.com/VictoriaMetrics/VictoriaMetrics/pull/1257 (default true)
|
||||
-datasource.roundDigits int
|
||||
Adds "round_digits" GET param to datasource requests. In VM "round_digits" limits the number of digits after the decimal point in response values.
|
||||
-datasource.tlsCAFile string
|
||||
|
@ -778,6 +778,8 @@ The shortlist of configuration flags is the following:
|
|||
Interval for checking for changes in '-rule' files. By default the checking is disabled. Send SIGHUP signal in order to force config check for changes. DEPRECATED - see '-configCheckInterval' instead
|
||||
-rule.maxResolveDuration duration
|
||||
Limits the maximum duration for automatic alert expiration, which is by default equal to 3 evaluation intervals of the parent group.
|
||||
-rule.resendDelay duration
|
||||
Minimum amount of time to wait before resending an alert to notifier
|
||||
-rule.validateExpressions
|
||||
Whether to validate rules expressions via MetricsQL engine (default true)
|
||||
-rule.validateTemplates
|
||||
|
|
|
@ -265,14 +265,10 @@ func (c *cache) cleanByTimeout() {
|
|||
defer c.mu.Unlock()
|
||||
|
||||
for len(c.lah) > 0 {
|
||||
e := c.lah[0]
|
||||
if lastAccessTime < e.lastAccessTime {
|
||||
if lastAccessTime < c.lah[0].lastAccessTime {
|
||||
break
|
||||
}
|
||||
c.updateSizeBytes(-e.b.SizeBytes())
|
||||
pes := c.m[e.k.Part]
|
||||
delete(pes, e.k.Offset)
|
||||
heap.Pop(&c.lah)
|
||||
c.removeLeastRecentlyAccessedItem()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -333,14 +329,23 @@ func (c *cache) PutBlock(k Key, b Block) {
|
|||
c.updateSizeBytes(e.b.SizeBytes())
|
||||
maxSizeBytes := c.getMaxSizeBytes()
|
||||
for c.SizeBytes() > maxSizeBytes && len(c.lah) > 0 {
|
||||
e := c.lah[0]
|
||||
c.updateSizeBytes(-e.b.SizeBytes())
|
||||
pes := c.m[e.k.Part]
|
||||
delete(pes, e.k.Offset)
|
||||
heap.Pop(&c.lah)
|
||||
c.removeLeastRecentlyAccessedItem()
|
||||
}
|
||||
}
|
||||
|
||||
func (c *cache) removeLeastRecentlyAccessedItem() {
|
||||
e := c.lah[0]
|
||||
c.updateSizeBytes(-e.b.SizeBytes())
|
||||
p := e.k.Part
|
||||
pes := c.m[p]
|
||||
delete(pes, e.k.Offset)
|
||||
if len(pes) == 0 {
|
||||
// Remove reference to p from c.m in order to free up memory occupied by p.
|
||||
delete(c.m, p)
|
||||
}
|
||||
heap.Pop(&c.lah)
|
||||
}
|
||||
|
||||
func (c *cache) Len() int {
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
|
@ -396,6 +401,10 @@ func (lah *lastAccessHeap) Push(x interface{}) {
|
|||
func (lah *lastAccessHeap) Pop() interface{} {
|
||||
h := *lah
|
||||
e := h[len(h)-1]
|
||||
|
||||
// Remove the reference to deleted entry, so Go GC could free up memory occupied by the deleted entry.
|
||||
h[len(h)-1] = nil
|
||||
|
||||
*lah = h[:len(h)-1]
|
||||
return e
|
||||
}
|
||||
|
|
|
@ -2152,14 +2152,20 @@ func matchTagFilters(mn *MetricName, tfs []*tagFilter, kb *bytesutil.ByteBuffer)
|
|||
tagMatched = true
|
||||
break
|
||||
}
|
||||
if !tagSeen && tf.isNegative && !tf.isEmptyMatch {
|
||||
if !tagSeen && (!tf.isNegative && tf.isEmptyMatch || tf.isNegative && !tf.isEmptyMatch) {
|
||||
// tf contains positive empty-match filter for non-existing tag key, i.e.
|
||||
// {non_existing_tag_key=~"foobar|"}
|
||||
//
|
||||
// OR
|
||||
//
|
||||
// tf contains negative filter for non-exsisting tag key
|
||||
// and this filter doesn't match empty string, i.e. {non_existing_tag_key!="foobar"}
|
||||
// Such filter matches anything.
|
||||
//
|
||||
// Note that the filter `{non_existing_tag_key!~"|foobar"}` shouldn't match anything,
|
||||
// since it is expected that it matches non-empty `non_existing_tag_key`.
|
||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/546 for details.
|
||||
// See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/546 and
|
||||
// https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2255 for details.
|
||||
continue
|
||||
}
|
||||
if tagMatched {
|
||||
|
|
|
@ -1182,6 +1182,19 @@ func TestMatchTagFilters(t *testing.T) {
|
|||
t.Fatalf("Should match")
|
||||
}
|
||||
|
||||
// Positive empty match by non-existing tag
|
||||
tfs.Reset()
|
||||
if err := tfs.Add([]byte("non-existing-tag"), []byte("foobar|"), false, true); err != nil {
|
||||
t.Fatalf("cannot add regexp, positive filter: %s", err)
|
||||
}
|
||||
ok, err = matchTagFilters(&mn, toTFPointers(tfs.tfs), &bb)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
if !ok {
|
||||
t.Fatalf("Should match")
|
||||
}
|
||||
|
||||
// Negative match by non-existing tag
|
||||
tfs.Reset()
|
||||
if err := tfs.Add([]byte("non-existing-tag"), []byte("foobar"), false, false); err != nil {
|
||||
|
|
|
@ -620,7 +620,7 @@ func (s *Storage) startFreeDiskSpaceWatcher() {
|
|||
s.freeDiskSpaceWatcherWG.Add(1)
|
||||
go func() {
|
||||
defer s.freeDiskSpaceWatcherWG.Done()
|
||||
ticker := time.NewTicker(30 * time.Second)
|
||||
ticker := time.NewTicker(time.Second)
|
||||
defer ticker.Stop()
|
||||
for {
|
||||
select {
|
||||
|
|
Loading…
Reference in a new issue