mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
Merge branch 'public-single-node' into pmm-6401-read-prometheus-data-files
This commit is contained in:
commit
5db9e82e54
5 changed files with 64 additions and 11 deletions
4
Makefile
4
Makefile
|
@ -49,6 +49,10 @@ vmutils: \
|
|||
vmbackup \
|
||||
vmrestore
|
||||
|
||||
release-snap:
|
||||
snapcraft
|
||||
snapcraft upload "victoriametrics_$(PKG_TAG)_multi.snap" --release beta,edge,candidate
|
||||
|
||||
release: \
|
||||
release-victoria-metrics \
|
||||
release-vmutils
|
||||
|
|
23
README.md
23
README.md
|
@ -104,6 +104,7 @@ Alphabetically sorted links to case studies:
|
|||
|
||||
* [How to start VictoriaMetrics](#how-to-start-victoriametrics)
|
||||
* [Environment variables](#environment-variables)
|
||||
* [Configuration with snap package](#configuration-with-snap-package)
|
||||
* [Prometheus setup](#prometheus-setup)
|
||||
* [Grafana setup](#grafana-setup)
|
||||
* [How to upgrade VictoriaMetrics](#how-to-upgrade-victoriametrics)
|
||||
|
@ -197,6 +198,26 @@ Each flag value can be set via environment variables according to these rules:
|
|||
* For repeating flags an alternative syntax can be used by joining the different values into one using `,` char as separator (for example `-storageNode <nodeA> -storageNode <nodeB>` will translate to `storageNode=<nodeA>,<nodeB>`)
|
||||
* It is possible setting prefix for environment vars with `-envflag.prefix`. For instance, if `-envflag.prefix=VM_`, then env vars must be prepended with `VM_`
|
||||
|
||||
### Configuration with snap package
|
||||
|
||||
|
||||
Command-line flags can be changed with following command:
|
||||
|
||||
```text
|
||||
echo 'FLAGS="-selfScrapeInterval=10s -search.logSlowQueryDuration=20s"' > $SNAP_DATA/var/snap/victoriametrics/current/extra_flags
|
||||
snap restart victoriametrics
|
||||
```
|
||||
Or add needed command-line flags to the file `$SNAP_DATA/var/snap/victoriametrics/current/extra_flags`.
|
||||
|
||||
Note you cannot change value for `-storageDataPath` flag, for safety snap package has limited access to host system.
|
||||
|
||||
|
||||
Changing scrape configuration is possible with text editor:
|
||||
```text
|
||||
vi $SNAP_DATA/var/snap/victoriametrics/current/etc/victoriametrics-scrape-config.yaml
|
||||
```
|
||||
After changes was made, trigger config re-read with command `curl 127.0.0.1:8248/-/reload`.
|
||||
|
||||
|
||||
## Prometheus setup
|
||||
|
||||
|
@ -544,8 +565,10 @@ Additionally VictoriaMetrics provides the following handlers:
|
|||
* the most frequently executed queries - `topByCount`
|
||||
* queries with the biggest average execution duration - `topByAvgDuration`
|
||||
* queries that took the most time for execution - `topBySumDuration`
|
||||
|
||||
The number of returned queries can be limited via `topN` query arg. Old queries can be filtered out with `maxLifetime` query arg.
|
||||
For example, request to `/api/v1/status/top_queries?topN=5&maxLifetime=30s` would return up to 5 queries per list, which were executed during the last 30 seconds.
|
||||
VictoriaMetrics tracks the last `-search.queryStats.lastQueriesCount` queries with durations at least `-search.queryStats.minQueryDuration`.
|
||||
|
||||
|
||||
## Graphite API usage
|
||||
|
|
|
@ -10,6 +10,19 @@ Release process guidance
|
|||
5. Push release tag to https://github.com/VictoriaMetrics/VictoriaMetrics : `git push origin v1.xx.y`.
|
||||
6. Go to https://github.com/VictoriaMetrics/VictoriaMetrics/releases , create new release from the pushed tag on step 5 and upload `*.tar.gz` archive with the corresponding `_checksums.txt` from step 2.
|
||||
|
||||
## Building snap package.
|
||||
|
||||
pre-requirements:
|
||||
- snapcraft binary, can be installed with commands:
|
||||
for MacOS `brew install snapcraft` and [install mutipass](https://discourse.ubuntu.com/t/installing-multipass-on-macos/8329),
|
||||
for Ubuntu - `sudo snap install snapcraft --classic`
|
||||
- login with `snapcraft login`
|
||||
- already created release at github (it operates `git describe` version, so git tag must be annotated).
|
||||
|
||||
0. checkout to the latest git tag for single-node version.
|
||||
1. execute `make release-snap` - it must build and upload snap package.
|
||||
2. promote release to current, if needed manually at release page [snapcraft-releases](https://snapcraft.io/victoriametrics/releases)
|
||||
|
||||
### Public Announcement
|
||||
|
||||
1. Publish message in slack (victoriametrics.slack.com, general channel)
|
||||
|
|
|
@ -104,6 +104,7 @@ Alphabetically sorted links to case studies:
|
|||
|
||||
* [How to start VictoriaMetrics](#how-to-start-victoriametrics)
|
||||
* [Environment variables](#environment-variables)
|
||||
* [Configuration with snap package](#configuration-with-snap-package)
|
||||
* [Prometheus setup](#prometheus-setup)
|
||||
* [Grafana setup](#grafana-setup)
|
||||
* [How to upgrade VictoriaMetrics](#how-to-upgrade-victoriametrics)
|
||||
|
@ -197,6 +198,26 @@ Each flag value can be set via environment variables according to these rules:
|
|||
* For repeating flags an alternative syntax can be used by joining the different values into one using `,` char as separator (for example `-storageNode <nodeA> -storageNode <nodeB>` will translate to `storageNode=<nodeA>,<nodeB>`)
|
||||
* It is possible setting prefix for environment vars with `-envflag.prefix`. For instance, if `-envflag.prefix=VM_`, then env vars must be prepended with `VM_`
|
||||
|
||||
### Configuration with snap package
|
||||
|
||||
|
||||
Command-line flags can be changed with following command:
|
||||
|
||||
```text
|
||||
echo 'FLAGS="-selfScrapeInterval=10s -search.logSlowQueryDuration=20s"' > $SNAP_DATA/var/snap/victoriametrics/current/extra_flags
|
||||
snap restart victoriametrics
|
||||
```
|
||||
Or add needed command-line flags to the file `$SNAP_DATA/var/snap/victoriametrics/current/extra_flags`.
|
||||
|
||||
Note you cannot change value for `-storageDataPath` flag, for safety snap package has limited access to host system.
|
||||
|
||||
|
||||
Changing scrape configuration is possible with text editor:
|
||||
```text
|
||||
vi $SNAP_DATA/var/snap/victoriametrics/current/etc/victoriametrics-scrape-config.yaml
|
||||
```
|
||||
After changes was made, trigger config re-read with command `curl 127.0.0.1:8248/-/reload`.
|
||||
|
||||
|
||||
## Prometheus setup
|
||||
|
||||
|
@ -544,8 +565,10 @@ Additionally VictoriaMetrics provides the following handlers:
|
|||
* the most frequently executed queries - `topByCount`
|
||||
* queries with the biggest average execution duration - `topByAvgDuration`
|
||||
* queries that took the most time for execution - `topBySumDuration`
|
||||
|
||||
The number of returned queries can be limited via `topN` query arg. Old queries can be filtered out with `maxLifetime` query arg.
|
||||
For example, request to `/api/v1/status/top_queries?topN=5&maxLifetime=30s` would return up to 5 queries per list, which were executed during the last 30 seconds.
|
||||
VictoriaMetrics tracks the last `-search.queryStats.lastQueriesCount` queries with durations at least `-search.queryStats.minQueryDuration`.
|
||||
|
||||
|
||||
## Graphite API usage
|
||||
|
|
|
@ -9,23 +9,13 @@ snap link: https://snapcraft.io/victoriametrics
|
|||
|
||||
Install snapcraft and multipass:
|
||||
```text
|
||||
snap install snapcraft
|
||||
snap install multipass
|
||||
sudo snap install snapcraft --classic
|
||||
```
|
||||
|
||||
build victoria-metrics prod binary and run snapcraft ```snapcraft --debug```.
|
||||
It produces snap package with current git version - `victoriametrics_v1.46.0+git1.1bebd021a-dirty_all.snap`.
|
||||
You can install it with command: `snap install victoriametrics_v1.46.0+git1.1bebd021a-dirty_all.snap --dangerous`
|
||||
|
||||
package and publish:
|
||||
|
||||
```text
|
||||
make victoria-metrics-package-snap
|
||||
snap login
|
||||
snap_file=$(ls | grep -e '_multi.snap$')
|
||||
snapcraft upload --release=latest/edge "$snap_file"
|
||||
rm "$snap_file"
|
||||
```
|
||||
|
||||
#### usage
|
||||
|
||||
|
|
Loading…
Reference in a new issue