Commit graph

3140 commits

Author SHA1 Message Date
Aliaksandr Valialkin
5d92fafc40 app/vmselect: add -search.noStaleMarkers command-line flag for disabling stale markers handling in queries
This option allows reducing CPU usage a bit when VictoriaMetrics is used
for collecting and processing non-Prometheus data. For example, InfluxDB line protocol, Graphite, OpenTSDB, CSV, etc.
2021-08-18 13:58:06 +03:00
Aliaksandr Valialkin
f21fad53b4 lib/promscrape: add ability to disable sending Prometheus staleness markers with -promscrape.disableStaleMarkers command-line flag
This option can be useful when vmagent consumes too much additional memory
for staleness markers functionality and when staleness markers aren't needed.
2021-08-18 13:58:05 +03:00
Aliaksandr Valialkin
3ba7a875f3 deployment/docker: upgrade Alpine base docker image from v3.14.0 to v3.14.1
See https://www.alpinelinux.org/posts/Alpine-3.14.1-released.html

This fixes https://vuldb.com/?source_cve.180051
See also https://vuldb.com/?id.180051 and https://snyk.io/vuln/SNYK-ALPINE314-APKTOOLS-1533752
2021-08-18 11:04:03 +03:00
Aliaksandr Valialkin
49886ecbc8 app/vmselect/promql: add bitmap_and(), bitmap_or() and bitmap_xor() functions to MetricsQL
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1541
2021-08-17 13:22:15 +03:00
Aliaksandr Valialkin
130a5cab7e docs/Single-server-VictoriaMetrics.md: mention that vmctl can migrate data from OpenTSDB to VictoriaMetrics 2021-08-17 11:17:38 +03:00
Aliaksandr Valialkin
38065bec7b app/vmselect/promql: move common condition to dropStaleNaNs in order to improve code maintainability 2021-08-17 11:00:58 +03:00
Aliaksandr Valialkin
db34c40aec lib/promscrape: stop scrapers for the removed targets before starting scrapers for the added targets
This should prevent from possible time series overlap when old target is substituted by new target (for example, during Kubernetes deployments).

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1526
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1530
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/748
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1509
2021-08-17 01:00:40 +03:00
Aliaksandr Valialkin
fe8c462044 app/vmalert: mention -remoteWrite.disablePathAppend in the description for -remoteWrite.url 2021-08-16 15:23:39 +03:00
Aliaksandr Valialkin
21974cb571 app/vmalert: follow-up for 2400f85761 2021-08-16 15:20:35 +03:00
Aliaksandr Valialkin
a47c1a734a docs/CHANGELOG.md: update urls to Prometheus 2.29 release
Previously these urls were pointing to rc0 release
2021-08-16 14:58:05 +03:00
Aliaksandr Valialkin
f05e827757 docs/CHANGELOG.md: typo fix: satureated -> saturated 2021-08-16 14:58:05 +03:00
Alexander Rickardsson
d27dc3721b vmalert: enable configuring explicit path (#1536)
* vmalert: allow to disable automatically added path to remote write address via disablePathAppend flag
* docs: update docs to include remoteWrite.disablePathAppend
2021-08-16 14:58:05 +03:00
dependabot[bot]
a9813fa032 build(deps): bump github.com/aws/aws-sdk-go from 1.40.21 to 1.40.22 (#1539)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.40.21 to 1.40.22.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.40.21...v1.40.22)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-16 14:58:05 +03:00
dependabot[bot]
2a24e0740f build(deps): bump google.golang.org/api from 0.53.0 to 0.54.0 (#1538)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.53.0...v0.54.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-16 14:58:05 +03:00
Aliaksandr Valialkin
75a0345215 docs/CHANGELOG.md: cut v1.64.0 2021-08-15 23:52:24 +03:00
Aliaksandr Valialkin
5f13c519ee lib/promscrape: restore red highlighting for DOWN targets at /targets page
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1461
2021-08-15 16:04:33 +03:00
Aliaksandr Valialkin
175727dace docs/CHANGELOG.md: mention the bugfix when more than 27 time series are selected at /vmui 2021-08-15 15:11:13 +03:00
Aliaksandr Valialkin
b09b035d3e docs/CHANGELOG.md: mention that VMUI automatically fills Server URL field
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1506
2021-08-15 14:45:59 +03:00
Artem Navoiev
c0420634ff add dependency chekcs for (#1535)
- ruby (for docs)
- gomod for monorepo
- npm for vmui
- gomod go small webserver in  vmui
2021-08-15 14:45:53 +03:00
Aliaksandr Valialkin
48920bdef8 app/vmagent/remotewrite: expose vmagent_remotewrite_send_duration_seconds_total metric
This metric can be used for determining high saturation of every connection to remote storage with
an alerting query `rate(vmagent_remotewrite_send_duration_seconds_total) > 0.9s`.
This query triggers when a connection is satureated by more than 90%
2021-08-15 13:34:07 +03:00
Aliaksandr Valialkin
5420c3d967 app/vmselect/promql: drop staleness marks before calling rollupConfig.Do
This allows dropping staleness marks only once and then calculate multiple rollup functions on the result.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1526
2021-08-15 13:22:26 +03:00
Aliaksandr Valialkin
6c4c54eaad Revert "app/vmselect/promql: properly handle Prometheus staleness marks in removeCounterResets functions"
This reverts commit 94dfcb6747a3b29a11d14e71bea21a2312bb6346.

It is better to remove staleness marks (decimal.StaleNaN) before calling rollupConfig.Do, e.g. in preFunc
2021-08-15 13:22:24 +03:00
Aliaksandr Valialkin
af4a306d7b app/vmselect/promql: properly handle Prometheus staleness marks in removeCounterResets functions
Prometheus stalenss marks shouldn't be changed in removeCounterResets. Otherwise they will be converted to an ordinary NaN values,
which couldn't be removed in dropStaleNaNs() function later. This may result in incorrect calculations for rollup functions.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1526
2021-08-14 12:45:31 +03:00
Aliaksandr Valialkin
7d0e64dcc0 vendor: make vendor-update 2021-08-13 13:03:03 +03:00
Aliaksandr Valialkin
c1f81f08d4 all: add support for Prometheus staleness markers
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1526
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/748
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1509
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1530
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/845
2021-08-13 12:13:15 +03:00
Aliaksandr Valialkin
7feb62eea9 docs/Cluster-VictoriaMetrics.md: meniton that vmagent can be used for replicating the data among multiple clusters
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1491
2021-08-12 12:47:08 +03:00
Aliaksandr Valialkin
60aa9cc1e6 vendor: update github.com/klauspost/compress from v1.13.1 to v1.13.4 2021-08-12 12:40:49 +03:00
Denys Holius
1491767a9e added guide for HA monitoring setup in K8s via VM Cluster (#1523)
* added guide for HA monitoring setup in K8s via VM Cluster

* fixed missed divs

* fixed different typos

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

* Update docs/guides/k8s-ha-monitoring-via-vm-cluster.md

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>

Co-authored-by: Roman Khavronenko <hagen1778@gmail.com>
2021-08-11 13:42:53 +03:00
Aliaksandr Valialkin
b35ae791f1 app/vmselect: make vmui-update after the commit 4ae14df864a7e327955f44941295a286175423b3 2021-08-11 13:42:53 +03:00
Aliaksandr Valialkin
f60ff85dbe app/vmui: actualize Dockerfiles 2021-08-11 13:42:53 +03:00
Aliaksandr Valialkin
9eb828b2c2 app/vminsert: add vm_rpc_send_duration_seconds_total metric per each vminsert->vmstorage link
This metric is useful for determining high link saturation with the following alerting rule:

rate(vm_rpc_send_duration_seconds_total) > 0.9s
2021-08-11 11:42:33 +03:00
Aliaksandr Valialkin
3df6550153 docs/Cluster-VictoriaMetrics.md: update -help output for cluster components after the d375d9b878 2021-08-11 11:39:09 +03:00
Aliaksandr Valialkin
518d0aba18 docs: make docs-sync after e0ee69797d 2021-08-11 10:54:28 +03:00
Aliaksandr Valialkin
90efb5831b lib/envflag: add a link to docs for -envflag.enable 2021-08-11 10:32:40 +03:00
Aliaksandr Valialkin
3823dab820 deployment/dm: update Go builder from Go1.16.6 to Go1.16.7
See https://github.com/golang/go/issues?q=milestone%3AGo1.16.7+label%3ACherryPickApproved
2021-08-06 12:16:54 +03:00
Yury Molodov
aca2cb245e vmui: fix layout and add server url by default (#1519)
* fix: change layout for correctly display big query

* fix: set default server from url

* fix: change get default server url
2021-08-06 12:16:53 +03:00
Aliaksandr Valialkin
d5ca07bd71 docs/CHANGELOG.md: document new metrics added to vmalert at 7416fdaa8b 2021-08-05 10:12:53 +03:00
Roman Khavronenko
d5ba8248cc vmalert: expose new metrics for tracking number of produced samples during last evaluation (#1518)
* vmalert: expose new metrics for tracking number of produced samples during last evaluation

Two new metrics were added to track the number of samples produced during the last evaluation:
* vmalert_recording_rules_last_evaluation_samples
* vmalert_alerting_rules_last_evaluation_samples

The gauge type is used to remain consistent with Prometheus metric
`prometheus_rule_group_last_evaluation_samples` which is on the group level.
However, the counter type was considered as well.

Two metrics instead of one are used to make it easier to separate recording and
alerting rules. It is likely, number of samples produced by recording rules is
more important so people will refer to it more frequently.

The expected usage of the new metric is the following:
```
   - alert: RecordingRuleReturnsEmptyResults
        expr: sum(vmalert_recording_rules_last_evaluation_samples) by(recording) < 1
        annotations:
          summary: Recording rule {{$labels.recording}} returns empty results.
            Please verify expression correctness.
```

Addresses https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1494

* vmalert: rename `vmalert_alerts_error` to `vmalert_alerting_rules_error` to remain consistent with recording rules metrics
2021-08-05 10:02:35 +03:00
Aliaksandr Valialkin
13d438d808 app/vmagent: typo fix in the description for -remoteWrite.queues 2021-08-05 10:00:58 +03:00
Aliaksandr Valialkin
b877538622 app/vmagent: follow-up after fe445f753b
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1491
2021-08-05 09:51:00 +03:00
Omar Ghader
fe445f753b
feature: Add multitenant for vmagent (#1505)
* feature: Add multitenant for vmagent

* Minor fix

* Fix rcs index out of range

* Minor fix

* Fix multi Init

* Fix multi Init

* Fix multi Init

* Add default multi

* Adjust naming

* Add TenantInserted metrics

* Add TenantInserted metrics

* fix: remove unused metrics for vmagent

* fix: remove unused metrics for vmagent

Co-authored-by: mghader <marc.ghader@ubisoft.com>
Co-authored-by: Sebastian YEPES <syepes@gmail.com>
2021-08-05 09:44:29 +03:00
Qifei Wan
095bb90879 app/vmalert: update config state metrics if config parsed failed (#1507) 2021-08-03 16:12:48 +03:00
Aliaksandr Valialkin
44bf4cabea docs/Articles.md: actualize links and re-order some links 2021-08-03 16:11:30 +03:00
Aliaksandr Valialkin
77bb9e1656 lib/promscrape/discovery/gce: add __meta_gce_interface_ipv4_<name> labels as in Prometheus 2.29
See https://github.com/prometheus/prometheus/pull/8978
2021-08-03 15:51:45 +03:00
Aliaksandr Valialkin
336a2aa2e0 lib/promscrape/discovery/ec2: add __meta_ec2_availability_zone_id label as Prometheus 2.29 does 2021-08-03 13:28:13 +03:00
Aliaksandr Valialkin
60cfa5f100 app/vmselect/promql: add present_over_time(m[d]) function, which will be available starting from Prometheus 2.29.0
See https://github.com/prometheus/prometheus/releases/tag/v2.29.0-rc.0 and https://github.com/prometheus/prometheus/pull/9097
2021-08-03 12:21:53 +03:00
Roman Khavronenko
51329d9e1e docs: add "Scaling to trillions of metric data points" to articles (#1517) 2021-08-03 11:14:57 +03:00
wusphinx
511e5c2e68 Update TimeSelector.tsx (#1515)
delete garbled code
2021-08-03 11:14:56 +03:00
Roman Khavronenko
d63842cdbe
Cluster alerts (#1513)
* alerts: move `ProcessNearFDLimits` to `vm-health` group since it is relevant for all services

* alerts: add new `TooHighMemoryUsage` alerting rule
2021-08-02 17:54:24 +03:00
Nikolay
3f3ad13753 adds /rules and /alerts api for grafana (#1504)
Co-authored-by: Aliaksandr Valialkin <valyala@gmail.com>
2021-08-02 17:29:49 +03:00