VictoriaMetrics Cluster

VictoriaMetrics Cluster is a free, open source time series database (TSDB) and monitoring solution, designed to collect, store and process real-time metrics.

It supports the Prometheus pull model and various push protocols (Graphite, InfluxDB, OpenTSDB) for data ingestion. It is optimized for storage with high-latency IO, low IOPS and time series with high churn rate.

For reading the data and evaluating alerting rules, VictoriaMetrics supports the PromQL, MetricsQL and Graphite query languages. VictoriaMetrics Cluster is fully autonomous and can be used as a long-term storage for time series. It supports all features of VictoriaMetrics Single; capacity scales horizontally, multiple independent namespaces for time series data (aka multi-tenancy) and replication.

This stack deploys the VictoriaMetrics Kubernetes operator and manages VictoriaMetrics Cluster using native Kubernetes Custom Resources. This removes the complexity of operating VictoriaMetrics Cluster and simplifies working with it.

Software Included

Package Version License
VictoriaMetrics Cluster 1.96.0 Apache License 2.0
vmgent 1.96.0 Apache License 2.0
vmoperator v0.40.0 Apache License 2.0

Creating an App using the Control Panel

Click the Deploy to DigitalOcean button to install a Kubernetes 1-Click Application. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.

Deploy to DO

Creating an App using the API

In addition to creating VictoriaMetrics Cluster using the control panel, you can also use the DigitalOcean API. As an example, to create a 3 node DigitalOcean Kubernetes cluster made up of Basic Droplets in the SFO2 region, you can use the following doctl command. You need to authenticate with doctl with your API access token) and replace the $CLUSTER_NAME variable with the chosen name for your cluster in the command below.

doctl kubernetes clusters create --size s-4vcpu-8gb $CLUSTER_NAME --1-clicks victoria-metrics-cluster

Getting Started After Deploying VictoriaMetrics Cluster

The VictoriaMetrics Cluster database requires at least two replicas to function effectively. The operator will make it’s best effort to spread all components across nodes to ensure availability.

VictoriaMetrics Cluster = Highly available horizontally scalable monitoring solution optimized for high performance. Supports multiple independent namespaces (aka multi-tenancy) and replication. Cluster version is preferable for large or rapidly growing environments.

vmgent = Lightweight agent that helps users collect metrics from various sources and store them in VictoriaMetrics or any other Prometheus-compatible storage systems.

vmperator = Kubernetes operator for Victoria Metrics = is a tool that creates/configures/manages VictoriaMetrics Cluster’s atop Kubernetes.

Getting started after deploying VictoriaMetrics Cluster

After you have downloaded your kube config file, and are able to successfully connect to your Kubernetes cluster (see if you haven’t connected to your cluster) follow the instructions below to start using VictoriaMetrics Cluster.

Verify that VictoriaMetrics Cluster and vmagent pods are up and running by executing the following commands:

kubectl get vmclusters
kubectl get vmagents

To remove VictoriaMetrics Cluster and vmagent from your Kubernetes Cluster run the following commands:

kubectl delete vmclusters --all-namespaces --all
kubectl delete vmagents --all-namespaces --all

Access the Database from outside the Kubernetes cluster

Run the following command to make vmselect’s port accessible from the local machine:

kubectl port-forward svc/vmselect-vmcluster 8481:8481

Run the following command to query and retrieve a result from vmselect:

curl -sg '' | jq

VictoriaMetrics provides a User Interface (UI) for query troubleshooting and exploration. The UI is available at http://vmselect:8481/select/0/vmui/. The UI lets users explore query results via graphs and tables.To check it, run the following command to make vmselect’s port accessible from the local machine:

kubectl port-forward svc/vmselect-vmcluster 8481:8481

Then open in browser , enter vm_app_uptime_seconds to the Query Field and Execute Query.

For further documentation visit: