move github-pages docs to the main repo (#1432)
* move github-pages docs to the main repo * rm github actions for copying docs to VictoriaMetrics/VictoriaMetrics.github.io
30
.github/workflows/github-pages.yml
vendored
|
@ -1,30 +0,0 @@
|
|||
name: github-pages
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'docs/*'
|
||||
- 'README.md'
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: publish
|
||||
shell: bash
|
||||
env:
|
||||
TOKEN: ${{secrets.CI_TOKEN}}
|
||||
run: |
|
||||
git clone https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.github.io.git gpages
|
||||
cp docs/* gpages
|
||||
cp README.md gpages
|
||||
cd gpages
|
||||
git config --local user.email "info@victoriametrics.com"
|
||||
git config --local user.name "Vika"
|
||||
git add .
|
||||
git commit -m "update github pages"
|
||||
remote_repo="https://vika:${TOKEN}@github.com/VictoriaMetrics/VictoriaMetrics.github.io.git"
|
||||
git push "${remote_repo}"
|
||||
cd ..
|
||||
rm -rf gpages
|
1
Makefile
|
@ -277,6 +277,7 @@ copy-docs:
|
|||
# Cluster docs are supposed to be ordered as 9th.
|
||||
# For The rest of docs is ordered manually.t
|
||||
docs-sync:
|
||||
cp README.md docs/README.md
|
||||
SRC=README.md DST=docs/Single-server-VictoriaMetrics.md ORDER=1 $(MAKE) copy-docs
|
||||
SRC=app/vmagent/README.md DST=docs/vmagent.md ORDER=3 $(MAKE) copy-docs
|
||||
SRC=app/vmalert/README.md DST=docs/vmalert.md ORDER=4 $(MAKE) copy-docs
|
||||
|
|
1
docs/CNAME
Normal file
|
@ -0,0 +1 @@
|
|||
docs.victoriametrics.com
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
@ -6,7 +6,7 @@ sort: 19
|
|||
|
||||
***The per-tenant statistic is a part of [enterprise package](https://victoriametrics.com/enterprise.html)***
|
||||
|
||||
<img alt="cluster-per-tenant-stat" src="per-tenant-stats.jpg">
|
||||
<img alt="cluster-per-tenant-stat" src="PerTenantStatistic-stats.jpg">
|
||||
|
||||
VictoriaMetrics cluster for enterprise provides various metrics and statistics usage per tenant:
|
||||
- `vminsert`
|
||||
|
|
1857
docs/README.md
Normal file
18
docs/_config.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
title: VictoriaMetrics
|
||||
author: VictoriaMetrics
|
||||
email: info@victoriametrics.com
|
||||
description: >
|
||||
The High Performance Open Source Time Series Database & Monitoring Solution
|
||||
|
||||
remote_theme: rundocs/jekyll-rtd-theme
|
||||
|
||||
readme_index:
|
||||
with_frontmatter: true
|
||||
|
||||
google:
|
||||
gtag: UA-129683199-1
|
||||
|
||||
plugins:
|
||||
- github-pages
|
||||
|
||||
|
17
docs/_includes/extra/script.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* When in mobile layout, the anchor navigation for submenus
|
||||
* doesn't work due to fixed body height when menu is toggled.
|
||||
* This script intercepts clicks on links, toggles the menu off
|
||||
* and performs the anchor navigation. */
|
||||
$(document).on("click", '.shift li.toc a', function(e) {
|
||||
let segments = this.href.split('#');
|
||||
if (segments.length < 2) {
|
||||
/* ignore links without anchor */
|
||||
return true;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
$("#toggle").click();
|
||||
setTimeout(function () {
|
||||
location.hash = segments.pop();
|
||||
},1)
|
||||
});
|
46
docs/_includes/extra/styles.scss
Normal file
|
@ -0,0 +1,46 @@
|
|||
* {
|
||||
box-sizing: border-box !important;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
@media (min-width: 1280px) {
|
||||
.content-wrap {
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Logo
|
||||
.fa-home{
|
||||
vertical-align: middle;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.fa-home:before {
|
||||
content: url(../assets/images/vm_logo.svg);
|
||||
}
|
||||
|
||||
// Navigation
|
||||
.header {
|
||||
background: black;
|
||||
}
|
||||
|
||||
.toctree .caption {
|
||||
color: #fc5d20 !important;
|
||||
}
|
||||
|
||||
.toctree .fa {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
// Footer
|
||||
.status .branch .name{
|
||||
color: #b35cec !important;
|
||||
}
|
||||
|
||||
// Content
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4 {
|
||||
font-family: 'Lato', sans-serif !important;
|
||||
}
|
30
docs/assets/images/favicon.svg
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#110F0F;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M6.81,7.04c0.27,0.23,0.72,0.4,1.17,0.41v0c0.01,0,0.02,0,0.02,0c0.01,0,0.02,0,0.02,0v0
|
||||
c0.45-0.01,0.9-0.18,1.17-0.41c1.41-1.2,5.5-4.95,5.5-4.95c1.1-1.02-1.95-2.03-6.67-2.04v0c0,0-0.01,0-0.01,0
|
||||
c-0.01,0-0.01,0-0.02,0c-0.01,0-0.01,0-0.02,0c0,0-0.01,0-0.01,0v0C3.26,0.06,0.21,1.07,1.31,2.09C1.31,2.09,5.39,5.84,6.81,7.04z
|
||||
"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M9.19,9.07C8.93,9.3,8.48,9.47,8.02,9.48v0c-0.01,0-0.02,0-0.02,0v0c0,0,0,0,0,0c0,0,0,0,0,0v0
|
||||
c-0.01,0-0.02,0-0.02,0v0C7.52,9.47,7.07,9.3,6.81,9.07C5.83,8.24,2.38,5.11,1.09,3.93c0,0.77,0,1.41,0,1.81
|
||||
c0,0.2,0.08,0.46,0.21,0.59c0.88,0.81,4.28,3.92,5.51,4.97c0.27,0.23,0.72,0.4,1.17,0.41v0c0.01,0,0.02,0,0.02,0
|
||||
c0.01,0,0.02,0,0.02,0v0c0.45-0.01,0.9-0.18,1.17-0.41c1.22-1.04,4.63-4.16,5.51-4.97c0.14-0.12,0.21-0.39,0.21-0.59
|
||||
c0-0.4,0-1.04,0-1.81C13.62,5.11,10.17,8.24,9.19,9.07z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path class="st0" d="M9.19,13.32c-0.27,0.23-0.72,0.4-1.17,0.41v0c-0.01,0-0.02,0-0.02,0v0c0,0,0,0,0,0c0,0,0,0,0,0v0
|
||||
c-0.01,0-0.02,0-0.02,0v0c-0.45-0.01-0.9-0.18-1.17-0.41c-0.98-0.83-4.42-3.96-5.72-5.14c0,0.77,0,1.41,0,1.81
|
||||
c0,0.2,0.08,0.46,0.21,0.59c0.88,0.81,4.28,3.92,5.51,4.97c0.27,0.23,0.72,0.4,1.17,0.41v0c0.01,0,0.02,0,0.02,0
|
||||
c0.01,0,0.02,0,0.02,0v0c0.45-0.01,0.9-0.18,1.17-0.41c1.22-1.04,4.63-4.16,5.51-4.97c0.14-0.12,0.21-0.39,0.21-0.59
|
||||
c0-0.4,0-1.04,0-1.81C13.62,9.36,10.17,12.48,9.19,13.32z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.8 KiB |
1
docs/assets/images/vm_logo.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg id="VM_logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 464.61 533.89"><defs><style>.cls-1{fill:#fff;}</style></defs><path class="cls-1" d="M459.86,467.77c9,7.67,24.12,13.49,39.3,13.69v0h1.68v0c15.18-.2,30.31-6,39.3-13.69,47.43-40.45,184.65-166.24,184.65-166.24,36.84-34.27-65.64-68.28-223.95-68.47h-1.68c-158.31.19-260.79,34.2-224,68.47C275.21,301.53,412.43,427.32,459.86,467.77Z" transform="translate(-267.7 -233.05)"/><path class="cls-1" d="M540.1,535.88c-9,7.67-24.12,13.5-39.3,13.7h-1.6c-15.18-.2-30.31-6-39.3-13.7-32.81-28-148.56-132.93-192.16-172.7v60.74c0,6.67,2.55,15.52,7.09,19.68,29.64,27.18,143.94,131.8,185.07,166.88,9,7.67,24.12,13.49,39.3,13.69v0h1.6v0c15.18-.2,30.31-6,39.3-13.69,41.13-35.08,155.43-139.7,185.07-166.88,4.54-4.16,7.09-13,7.09-19.68V363.18C688.66,403,572.91,507.9,540.1,535.88Z" transform="translate(-267.7 -233.05)"/><path class="cls-1" d="M540.1,678.64c-9,7.67-24.12,13.49-39.3,13.69v0h-1.6v0c-15.18-.2-30.31-6-39.3-13.69-32.81-28-148.56-132.94-192.16-172.7v60.73c0,6.67,2.55,15.53,7.09,19.69,29.64,27.17,143.94,131.8,185.07,166.87,9,7.67,24.12,13.5,39.3,13.7h1.6c15.18-.2,30.31-6,39.3-13.7,41.13-35.07,155.43-139.7,185.07-166.87,4.54-4.16,7.09-13,7.09-19.69V505.94C688.66,545.7,572.91,650.66,540.1,678.64Z" transform="translate(-267.7 -233.05)"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
BIN
docs/assets/k8s/grafana-dashboards-clsuter-vs-agent.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
docs/assets/k8s/grafana-dashboards.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
docs/assets/k8s/k8s-vm-single-scheme.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
docs/assets/k8s/vmagent-grafana.png
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
docs/assets/k8s/vmcluster-grafana-k8s-dashboard.png
Normal file
After Width: | Height: | Size: 149 KiB |
BIN
docs/assets/k8s/vmcluster-grafana.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
docs/assets/k8s/vmsingle-grafana-k8s-dashboard.png
Normal file
After Width: | Height: | Size: 171 KiB |
BIN
docs/assets/k8s/vmsingle-grafana.png
Normal file
After Width: | Height: | Size: 151 KiB |
1
docs/googlec3812dcf278679ec.html
Normal file
|
@ -0,0 +1 @@
|
|||
google-site-verification: googlec3812dcf278679ec.html
|
7
docs/guides/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
sort: 21
|
||||
---
|
||||
|
||||
# Guides
|
||||
|
||||
1. [Kubernetes monitoring with VictoriaMetrics Single](k8s-monitoring-with-vm-single.html)
|
225
docs/guides/k8s-monitoring-with-vm-single.md
Normal file
|
@ -0,0 +1,225 @@
|
|||
# Kubernetes monitoring with VictoriaMetrics Single
|
||||
|
||||
|
||||
**This guide covers:**
|
||||
|
||||
* The setup of VictoriaMetrics single node in Kubernetes via helm charts
|
||||
* How to store metrics
|
||||
* How to scrape metrics from k8s components using service discovery
|
||||
* How to Visualize stored data
|
||||
|
||||
|
||||
**Precondition**
|
||||
|
||||
|
||||
We will use:
|
||||
* [Kubernetes cluster 1.19.10-gke.1600](https://cloud.google.com/kubernetes-engine)
|
||||
> We use GKE cluster from GCP but feel free to use any kubernetes setup eg [Amazon EKS](https://aws.amazon.com/ru/eks/)
|
||||
* [helm 3 ](https://helm.sh/docs/intro/install)
|
||||
* [kubectl 1.21](https://kubernetes.io/docs/tasks/tools/install-kubectl)
|
||||
|
||||
<p align="center">
|
||||
<img src="../assets/k8s/k8s-vm-single-scheme.png">
|
||||
</p>
|
||||
|
||||
**1. VictoriaMetrics helm repository**
|
||||
|
||||
> For this guide we will use helm 3 but if you already use helm 2 please see this [https://github.com/VictoriaMetrics/helm-charts#for-helm-v2](https://github.com/VictoriaMetrics/helm-charts#for-helm-v2)
|
||||
|
||||
You need to add the VictoriaMetrics helm repository to install VictoriaMetrics components. We’re going to use VictoriaMetrics single-node. You can do this by running the following command:
|
||||
|
||||
```bash
|
||||
helm repo add vm https://victoriametrics.github.io/helm-charts/
|
||||
```
|
||||
|
||||
Update helm repositories:
|
||||
|
||||
```bash
|
||||
helm repo update
|
||||
```
|
||||
|
||||
To verify that everything is set up correctly you may run this command:
|
||||
|
||||
```bash
|
||||
helm search repo vm/
|
||||
```
|
||||
|
||||
The expected output is:
|
||||
|
||||
```bash
|
||||
NAME CHART VERSION APP VERSION DESCRIPTION
|
||||
vm/victoria-metrics-agent 0.7.20 v1.62.0 Victoria Metrics Agent - collects metrics from ...
|
||||
vm/victoria-metrics-alert 0.3.34 v1.62.0 Victoria Metrics Alert - executes a list of giv...
|
||||
vm/victoria-metrics-auth 0.2.23 1.62.0 Victoria Metrics Auth - is a simple auth proxy ...
|
||||
vm/victoria-metrics-cluster 0.8.30 1.62.0 Victoria Metrics Cluster version - high-perform...
|
||||
vm/victoria-metrics-k8s-stack 0.2.8 1.16.0 Kubernetes monitoring on VictoriaMetrics stack....
|
||||
vm/victoria-metrics-operator 0.1.15 0.15.1 Victoria Metrics Operator
|
||||
vm/victoria-metrics-single 0.7.4 1.62.0 Victoria Metrics Single version - high-performa...
|
||||
```
|
||||
|
||||
|
||||
**2. Install VictoriaMetrics Single from helm Chart**
|
||||
|
||||
Run this command in your terminal:
|
||||
|
||||
```yaml
|
||||
cat <<EOF | helm install victoria-metrics vm/victoria-metrics-single -f -
|
||||
server:
|
||||
scrape:
|
||||
enabled: true
|
||||
EOF
|
||||
```
|
||||
|
||||
* By running `helm install victoria-metrics vm/victoria-metrics-single` we will install `VictoriaMetrics Single` to default namespace inside your cluster
|
||||
* By adding `scrape: enable: true` we add and enable autodiscovery scraping from kubernetes cluster to `VictoriaMetrics Single`
|
||||
|
||||
|
||||
As a result of the command you will see the following output:
|
||||
|
||||
```bash
|
||||
NAME: victoria-metrics
|
||||
LAST DEPLOYED: Fri Jun 25 12:06:13 2021
|
||||
NAMESPACE: default
|
||||
STATUS: deployed
|
||||
REVISION: 1
|
||||
TEST SUITE: None
|
||||
NOTES:
|
||||
The VictoriaMetrics write api can be accessed via port 8428 on the following DNS name from within your cluster:
|
||||
victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local
|
||||
|
||||
|
||||
Metrics Ingestion:
|
||||
Get the Victoria Metrics service URL by running these commands in the same shell:
|
||||
export POD_NAME=$(kubectl get pods --namespace default -l "app=server" -o jsonpath="{.items[0].metadata.name}")
|
||||
kubectl --namespace default port-forward $POD_NAME 8428
|
||||
|
||||
Write url inside the kubernetes cluster:
|
||||
http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428/api/v1/write
|
||||
|
||||
Metrics Scrape:
|
||||
Pull-based scrapes are enabled
|
||||
Scrape config can be displayed by running this command:
|
||||
kubectl get cm victoria-metrics-victoria-metrics-single-server-scrapeconfig -n default
|
||||
|
||||
The target’s information is accessible via api:
|
||||
Inside cluster:
|
||||
http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428/atargets
|
||||
Outside cluster:
|
||||
You need to port-forward service (see instructions above) and call
|
||||
http://<service-host-port>/targets
|
||||
|
||||
Read Data:
|
||||
The following url can be used as the datasource url in Grafana:
|
||||
http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428
|
||||
|
||||
```
|
||||
|
||||
For us it’s important to remember the url for the datasource (copy lines from output).
|
||||
|
||||
Verify that VictoriaMetrics pod is up and running by executing the following command:
|
||||
|
||||
```bash
|
||||
kubectl get pods
|
||||
```
|
||||
|
||||
The expected output is:
|
||||
|
||||
```bash
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
victoria-metrics-victoria-metrics-single-server-0 1/1 Running 0 22s
|
||||
```
|
||||
|
||||
|
||||
**3. Install and connect Grafana to VictoriaMetrics with helm**
|
||||
|
||||
Add the Grafana helm repository.
|
||||
|
||||
```bash
|
||||
helm repo add grafana https://grafana.github.io/helm-charts
|
||||
helm repo update
|
||||
```
|
||||
See more info on Grafana ArtifactHUB [https://artifacthub.io/packages/helm/grafana/grafana](https://artifacthub.io/packages/helm/grafana/grafana)
|
||||
By installing the Chart with the release name `my-grafana`, you add the VictoriaMetrics datasource with official dashboard and kubernetes dashboard:
|
||||
|
||||
```yaml
|
||||
cat <<EOF | helm install my-grafana grafana/grafana -f -
|
||||
datasources:
|
||||
datasources.yaml:
|
||||
apiVersion: 1
|
||||
datasources:
|
||||
- name: victoriametrics
|
||||
type: prometheus
|
||||
orgId: 1
|
||||
url: http://victoria-metrics-victoria-metrics-single-server.default.svc.cluster.local:8428
|
||||
access: proxy
|
||||
isDefault: true
|
||||
updateIntervalSeconds: 10
|
||||
editable: true
|
||||
|
||||
dashboardProviders:
|
||||
dashboardproviders.yaml:
|
||||
apiVersion: 1
|
||||
providers:
|
||||
- name: 'default'
|
||||
orgId: 1
|
||||
folder: ''
|
||||
type: file
|
||||
disableDeletion: true
|
||||
editable: true
|
||||
options:
|
||||
path: /var/lib/grafana/dashboards/default
|
||||
|
||||
dashboards:
|
||||
default:
|
||||
victoriametrics:
|
||||
gnetId: 10229
|
||||
revision: 19
|
||||
datasource: victoriametrics
|
||||
kubernetes:
|
||||
gnetId: 14205
|
||||
revision: 1
|
||||
datasource: victoriametrics
|
||||
EOF
|
||||
```
|
||||
By running this command we:
|
||||
* Install Grafana from helm repository.
|
||||
* Provision VictoriaMetrics datasource with the url from the output above which we copied before.
|
||||
* Add this [https://grafana.com/grafana/dashboards/10229](https://grafana.com/grafana/dashboards/10229) dashboard for VictoriaMetrics.
|
||||
* Add this [https://grafana.com/grafana/dashboards/14205](https://grafana.com/grafana/dashboards/14205) dashboard to see Kubernetes cluster metrics.
|
||||
|
||||
|
||||
See the output log in your terminal. Copy, paste and run these commands.
|
||||
The first one will show `admin` password for Grafana admin.
|
||||
The second and the third will forward Grafana to `127.0.0.1:3000`:
|
||||
|
||||
```bash
|
||||
kubectl get secret --namespace default my-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
|
||||
|
||||
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=my-grafana" -o jsonpath="{.items[0].metadata.name}")
|
||||
|
||||
kubectl --namespace default port-forward $POD_NAME 3000
|
||||
```
|
||||
|
||||
**4. Check the obtained result in your browser**
|
||||
|
||||
To check that VictoriaMetrics has collected metrics from the k8s cluster open in browser [http://127.0.0.1:3000/dashboards](http://127.0.0.1:3000/dashboards) and choose `Kubernetes Cluster Monitoring (via Prometheus)` dashboard. Use `admin` for login and `password` that you previously obtained from kubectl.
|
||||
|
||||
<p align="center">
|
||||
<img src="../assets/k8s/grafana-dashboards.png" width="800" alt="">
|
||||
</p>
|
||||
|
||||
You will see something like this:
|
||||
<p align="center">
|
||||
<img src="../assets/k8s/vmsingle-grafana-k8s-dashboard.png" width="800" alt="">
|
||||
</p>
|
||||
|
||||
VictoriaMetrics dashboard also available to use:
|
||||
<p align="center">
|
||||
<img src="../assets/k8s/vmsingle-grafana.png" width="800" alt="">
|
||||
</p>
|
||||
|
||||
**5. Final thoughts**
|
||||
|
||||
* We have set up TimeSeries Database for your k8s cluster.
|
||||
* We collected metrics from all running pods, nodes, … and stored them in VictoriaMetrics database.
|
||||
* We can visualize the resources used in your Kubernetes cluster by using Grafana dashboards.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |