-```bash
+```console
curl http://0.0.0.0:8429/debug/pprof/heap > mem.pprof
```
@@ -728,7 +728,7 @@ curl http://0.0.0.0:8429/debug/pprof/heap > mem.pprof
-```bash
+```console
curl http://0.0.0.0:8429/debug/pprof/profile > cpu.pprof
```
diff --git a/app/vmalert/README.md b/app/vmalert/README.md
index 384267a5a..9ad7f661e 100644
--- a/app/vmalert/README.md
+++ b/app/vmalert/README.md
@@ -36,7 +36,7 @@ implementation and aims to be compatible with its syntax.
To build `vmalert` from sources:
-```bash
+```console
git clone https://github.com/VictoriaMetrics/VictoriaMetrics
cd VictoriaMetrics
make vmalert
@@ -58,7 +58,7 @@ To start using `vmalert` you will need the following things:
Then configure `vmalert` accordingly:
-```bash
+```console
./bin/vmalert -rule=alert.rules \ # Path to the file with rules configuration. Supports wildcard
-datasource.url=http://localhost:8428 \ # PromQL compatible datasource
-notifier.url=http://localhost:9093 \ # AlertManager URL (required if alerting rules are used)
@@ -1038,7 +1038,7 @@ It is recommended using
You can build `vmalert` docker image from source and push it to your own docker repository.
Run the following commands from the root folder of [the repository](https://github.com/VictoriaMetrics/VictoriaMetrics):
-```bash
+```console
make package-vmalert
docker tag victoria-metrics/vmalert:version my-repo:my-version-name
docker push my-repo:my-version-name
diff --git a/app/vmauth/README.md b/app/vmauth/README.md
index d14ee5551..6cf88ce96 100644
--- a/app/vmauth/README.md
+++ b/app/vmauth/README.md
@@ -10,7 +10,7 @@ The `-auth.config` can point to either local file or to http url.
Just download `vmutils-*` archive from [releases page](https://github.com/VictoriaMetrics/VictoriaMetrics/releases), unpack it
and pass the following flag to `vmauth` binary in order to start authorizing and routing requests:
-```bash
+```console
/path/to/vmauth -auth.config=/path/to/auth/config.yml
```
@@ -129,7 +129,7 @@ It is expected that all the backend services protected by `vmauth` are located i
Do not transfer Basic Auth headers in plaintext over untrusted networks. Enable https. This can be done by passing the following `-tls*` command-line flags to `vmauth`:
-```bash
+```console
-tls
Whether to enable TLS (aka HTTPS) for incoming requests. -tlsCertFile and -tlsKeyFile must be set if -tls is set
-tlsCertFile string
@@ -181,7 +181,7 @@ The `
` may be manually set via `PKG_TAG=foobar make package-vmauth`.
The base docker image is [alpine](https://hub.docker.com/_/alpine) but it is possible to use any other base image
by setting it via `` environment variable. For example, the following command builds the image on top of [scratch](https://hub.docker.com/_/scratch) image:
-```bash
+```console
ROOT_IMAGE=scratch make package-vmauth
```
@@ -193,7 +193,7 @@ ROOT_IMAGE=scratch make package-vmauth
-```bash
+```console
curl http://0.0.0.0:8427/debug/pprof/heap > mem.pprof
```
@@ -203,7 +203,7 @@ curl http://0.0.0.0:8427/debug/pprof/heap > mem.pprof
-```bash
+```console
curl http://0.0.0.0:8427/debug/pprof/profile > cpu.pprof
```
@@ -217,7 +217,7 @@ The collected profiles may be analyzed with [go tool pprof](https://github.com/g
Pass `-help` command-line arg to `vmauth` in order to see all the configuration options:
-```bash
+```console
./vmauth -help
vmauth authenticates and authorizes incoming requests and proxies them to VictoriaMetrics.
diff --git a/app/vmbackup/README.md b/app/vmbackup/README.md
index a3f960b9f..a28c057d5 100644
--- a/app/vmbackup/README.md
+++ b/app/vmbackup/README.md
@@ -28,7 +28,7 @@ creation of hourly, daily, weekly and monthly backups.
Regular backup can be performed with the following command:
-```bash
+```console
vmbackup -storageDataPath= -snapshot.createURL=http://localhost:8428/snapshot/create -dst=gs://
/
```
@@ -43,7 +43,7 @@ vmbackup -storageDataPath= -snapshot.createURL=h
If the destination GCS bucket already contains the previous backup at `-origin` path, then new backup can be sped up
with the following command:
-```bash
+```console
./vmbackup -storageDataPath= -snapshot.createURL=http://localhost:8428/snapshot/create -dst=gs:/// -origin=gs:///
```
@@ -54,7 +54,7 @@ It saves time and network bandwidth costs by performing server-side copy for the
Incremental backups are performed if `-dst` points to an already existing backup. In this case only new data is uploaded to remote storage.
It saves time and network bandwidth costs when working with big backups:
-```bash
+```console
./vmbackup -storageDataPath= -snapshot.createURL=http://localhost:8428/snapshot/create -dst=gs:///
```
@@ -64,7 +64,7 @@ Smart backups mean storing full daily backups into `YYYYMMDD` folders and creati
* Run the following command every hour:
-```bash
+```console
./vmbackup -storageDataPath= -snapshot.createURL=http://localhost:8428/snapshot/create -dst=gs:///latest
```
@@ -73,7 +73,7 @@ The command will upload only changed data to `gs:///latest`.
* Run the following command once a day:
-```bash
+```console
vmbackup -storageDataPath= -snapshot.createURL=http://localhost:8428/snapshot/create -dst=gs:/// -origin=gs:///latest
```
@@ -129,7 +129,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time-
for s3 (aws, minio or other s3 compatible storages):
- ```bash
+ ```console
[default]
aws_access_key_id=theaccesskey
aws_secret_access_key=thesecretaccesskeyvalue
@@ -155,7 +155,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time-
* Usage with s3 custom url endpoint. It is possible to use `vmbackup` with s3 compatible storages like minio, cloudian, etc.
You have to add a custom url endpoint via flag:
-```bash
+```console
# for minio
-customS3Endpoint=http://localhost:9000
@@ -165,7 +165,7 @@ See [this article](https://medium.com/@valyala/speeding-up-backups-for-big-time-
* Run `vmbackup -help` in order to see all the available options:
-```bash
+```console
-concurrency int
The number of concurrent workers. Higher concurrency may reduce backup duration (default 10)
-configFilePath string
@@ -280,6 +280,6 @@ The `` may be manually set via `PKG_TAG=foobar make package-vmbackup`.
The base docker image is [alpine](https://hub.docker.com/_/alpine) but it is possible to use any other base image
by setting it via `` environment variable. For example, the following command builds the image on top of [scratch](https://hub.docker.com/_/scratch) image:
-```bash
+```console
ROOT_IMAGE=scratch make package-vmbackup
```
diff --git a/app/vmctl/README.md b/app/vmctl/README.md
index 2fca7b184..8488f0cc1 100644
--- a/app/vmctl/README.md
+++ b/app/vmctl/README.md
@@ -15,7 +15,7 @@ Features:
To see the full list of supported modes
run the following command:
-```bash
+```console
$ ./vmctl --help
NAME:
vmctl - VictoriaMetrics command-line tool
@@ -527,7 +527,7 @@ and specify `accountID` param.
In this mode, `vmctl` allows verifying correctness and integrity of data exported via [native format](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#how-to-export-data-in-native-format) from VictoriaMetrics.
You can verify exported data at disk before uploading it by `vmctl verify-block` command:
-```bash
+```console
# export blocks from VictoriaMetrics
curl localhost:8428/api/v1/export/native -g -d 'match[]={__name__!=""}' -o exported_data_block
# verify block content
@@ -650,7 +650,7 @@ The `` may be manually set via `PKG_TAG=foobar make package-vmctl`.
The base docker image is [alpine](https://hub.docker.com/_/alpine) but it is possible to use any other base image
by setting it via `` environment variable. For example, the following command builds the image on top of [scratch](https://hub.docker.com/_/scratch) image:
-```bash
+```console
ROOT_IMAGE=scratch make package-vmctl
```
diff --git a/app/vmgateway/README.md b/app/vmgateway/README.md
index 51e71b723..9214edb2e 100644
--- a/app/vmgateway/README.md
+++ b/app/vmgateway/README.md
@@ -54,7 +54,7 @@ Where:
Start the single version of VictoriaMetrics
-```bash
+```console
# single
# start node
./bin/victoria-metrics --selfScrapeInterval=10s
@@ -62,19 +62,19 @@ Start the single version of VictoriaMetrics
Start vmgateway
-```bash
+```console
./bin/vmgateway -eula -enable.auth -read.url http://localhost:8428 --write.url http://localhost:8428
```
Retrieve data from the database
-```bash
+```console
curl 'http://localhost:8431/api/v1/series/count' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ2bV9hY2Nlc3MiOnsidGVuYW50X2lkIjp7fSwicm9sZSI6MX0sImV4cCI6MTkzOTM0NjIxMH0.5WUxEfdcV9hKo4CtQdtuZYOGpGXWwaqM9VuVivMMrVg'
```
A request with an incorrect token or without any token will be rejected:
-```bash
+```console
curl 'http://localhost:8431/api/v1/series/count'
curl 'http://localhost:8431/api/v1/series/count' -H 'Authorization: Bearer incorrect-token'
@@ -124,7 +124,7 @@ limits:
cluster version of VictoriaMetrics is required for rate limiting.
-```bash
+```console
# start datasource for cluster metrics
cat << EOF > cluster.yaml
diff --git a/app/vmrestore/README.md b/app/vmrestore/README.md
index dae554c7b..c0ceb3f4a 100644
--- a/app/vmrestore/README.md
+++ b/app/vmrestore/README.md
@@ -10,7 +10,7 @@ when restarting `vmrestore` with the same args.
VictoriaMetrics must be stopped during the restore process.
-```bash
+```console
vmrestore -src=gs:/// -storageDataPath=
```
@@ -36,7 +36,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q
for s3 (aws, minio or other s3 compatible storages):
- ```bash
+ ```console
[default]
aws_access_key_id=theaccesskey
aws_secret_access_key=thesecretaccesskeyvalue
@@ -62,7 +62,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q
* Usage with s3 custom url endpoint. It is possible to use `vmrestore` with s3 api compatible storages, like minio, cloudian and other.
You have to add custom url endpoint with a flag:
-```bash
+```console
# for minio:
-customS3Endpoint=http://localhost:9000
@@ -72,7 +72,7 @@ i.e. the end result would be similar to [rsync --delete](https://askubuntu.com/q
* Run `vmrestore -help` in order to see all the available options:
-```bash
+```console
-concurrency int
The number of concurrent workers. Higher concurrency may reduce restore duration (default 10)
-configFilePath string
@@ -180,6 +180,6 @@ The `` may be manually set via `PKG_TAG=foobar make package-vmrestore`.
The base docker image is [alpine](https://hub.docker.com/_/alpine) but it is possible to use any other base image
by setting it via `` environment variable. For example, the following command builds the image on top of [scratch](https://hub.docker.com/_/scratch) image:
-```bash
+```console
ROOT_IMAGE=scratch make package-vmrestore
```
diff --git a/deployment/marketplace/digitialocean/one-click-droplet/README.md b/deployment/marketplace/digitialocean/one-click-droplet/README.md
index 2a6126474..5b7229b10 100644
--- a/deployment/marketplace/digitialocean/one-click-droplet/README.md
+++ b/deployment/marketplace/digitialocean/one-click-droplet/README.md
@@ -42,7 +42,7 @@ To check it, open the following in your browser `http://your_droplet_public_ipv4
Run the following command to query and retrieve a result from VictoriaMetrics Single with `curl`:
-```bash
+```console
curl -sg http://your_droplet_public_ipv4:8428/api/v1/query_range?query=vm_app_uptime_seconds | jq
```
@@ -50,6 +50,6 @@ curl -sg http://your_droplet_public_ipv4:8428/api/v1/query_range?query=vm_app_up
Once the Droplet is created, you can use DigitalOcean's web console to start a session or SSH directly to the server as root:
-```bash
+```console
ssh root@your_droplet_public_ipv4
```
diff --git a/deployment/marketplace/digitialocean/one-click-droplet/RELEASE_GUIDE.md b/deployment/marketplace/digitialocean/one-click-droplet/RELEASE_GUIDE.md
index 0813eec44..d33216d2c 100644
--- a/deployment/marketplace/digitialocean/one-click-droplet/RELEASE_GUIDE.md
+++ b/deployment/marketplace/digitialocean/one-click-droplet/RELEASE_GUIDE.md
@@ -6,13 +6,13 @@
2. API Token can be generated on [https://cloud.digitalocean.com/account/api/tokens](https://cloud.digitalocean.com/account/api/tokens) or use already generated from OnePassword.
3. Set variable `DIGITALOCEAN_API_TOKEN` for environment:
-```bash
+```console
export DIGITALOCEAN_API_TOKEN="your_token_here"
```
or set it by with make:
-```bash
+```console
make release-victoria-metrics-digitalocean-oneclick-droplet DIGITALOCEAN_API_TOKEN="your_token_here"
```
diff --git a/snap/local/README.md b/snap/local/README.md
index 101890a6b..fe55d355c 100644
--- a/snap/local/README.md
+++ b/snap/local/README.md
@@ -10,7 +10,7 @@ Install snapcraft or docker
build snap package with command
- ```bash
+ ```console
make build-snap
```
@@ -21,7 +21,7 @@ You can install it with command: `snap install victoriametrics_v1.46.0+git1.1beb
installation and configuration:
-```bash
+```console
# install
snap install victoriametrics
# logs
@@ -34,7 +34,7 @@ Configuration management:
Prometheus scrape config can be edited with your favorite editor, its located at
-```bash
+```console
vi /var/snap/victoriametrics/current/etc/victoriametrics-scrape-config.yaml
```
@@ -42,7 +42,7 @@ after changes, you can trigger config reread with `curl localhost:8248/-/reload`
Configuration tuning is possible with editing extra_flags:
-```bash
+```console
echo 'FLAGS="-selfScrapeInterval=10s -search.logSlowQueryDuration=20s"' > /var/snap/victoriametrics/current/extra_flags
snap restart victoriametrics
```