2020-11-18 00:00:06 +00:00
|
|
|
### Snap integration
|
|
|
|
|
2022-03-22 11:40:55 +00:00
|
|
|
<https://snapcraft.io/>
|
2020-11-18 00:00:06 +00:00
|
|
|
|
2022-03-22 11:40:55 +00:00
|
|
|
snap link: <https://snapcraft.io/victoriametrics>
|
2020-11-18 00:00:06 +00:00
|
|
|
|
|
|
|
#### develop
|
|
|
|
|
2021-12-08 11:05:35 +00:00
|
|
|
Install snapcraft or docker
|
|
|
|
|
|
|
|
build snap package with command
|
|
|
|
|
2022-06-19 20:00:37 +00:00
|
|
|
```console
|
2021-12-08 11:05:35 +00:00
|
|
|
make build-snap
|
2020-11-18 00:00:06 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
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`
|
|
|
|
|
2022-03-22 11:40:55 +00:00
|
|
|
#### usage
|
2020-11-18 00:00:06 +00:00
|
|
|
|
|
|
|
installation and configuration:
|
|
|
|
|
2022-06-19 20:00:37 +00:00
|
|
|
```console
|
2020-11-18 00:00:06 +00:00
|
|
|
# install
|
|
|
|
snap install victoriametrics
|
|
|
|
# logs
|
|
|
|
snap logs victoriametrics
|
|
|
|
# restart
|
|
|
|
snap restart victoriametrics
|
|
|
|
```
|
|
|
|
|
|
|
|
Configuration management:
|
|
|
|
|
|
|
|
Prometheus scrape config can be edited with your favorite editor, its located at
|
2022-03-22 11:40:55 +00:00
|
|
|
|
2022-06-19 20:00:37 +00:00
|
|
|
```console
|
2020-11-18 00:00:06 +00:00
|
|
|
vi /var/snap/victoriametrics/current/etc/victoriametrics-scrape-config.yaml
|
|
|
|
```
|
2022-03-22 11:40:55 +00:00
|
|
|
|
2023-03-17 05:06:35 +00:00
|
|
|
after changes, you can trigger config reread with `curl localhost:8428/-/reload`.
|
2020-11-18 00:00:06 +00:00
|
|
|
|
|
|
|
Configuration tuning is possible with editing extra_flags:
|
2022-03-22 11:40:55 +00:00
|
|
|
|
2022-06-19 20:00:37 +00:00
|
|
|
```console
|
2020-11-18 00:00:06 +00:00
|
|
|
echo 'FLAGS="-selfScrapeInterval=10s -search.logSlowQueryDuration=20s"' > /var/snap/victoriametrics/current/extra_flags
|
|
|
|
snap restart victoriametrics
|
|
|
|
```
|
|
|
|
|
2021-12-08 11:05:35 +00:00
|
|
|
Data folder located at `/var/snap/victoriametrics/current/var/lib/victoriametrics/`
|