VictoriaMetrics
Overview
VictoriaMetrics is a fast, cost-effective and scalable open-source time-series database and monitoring solution. It is a drop-in Prometheus replacement for long-term metrics storage. It speaks PromQL and the extended MetricsQL, ingests via Prometheus remote-write, InfluxDB, Graphite and OpenTSDB protocols, and uses a fraction of the RAM and disk of comparable systems.
The SecureAnyCloud image installs VictoriaMetrics single-node 1.145.0 at /opt/victoriametrics and runs it as a dedicated victoriametrics system user. It binds VictoriaMetrics to loopback behind an nginx reverse proxy on TCP 80 with HTTP Basic auth, and it persists all time-series data on a dedicated Azure data disk. A unique web password is generated on the first boot of every VM.
The image also self-scrapes its own metrics, so the database is useful the moment it boots. It is backed by 24/7 SecureAnyCloud support.
What you get:
- VictoriaMetrics single-node 1.145.0 at
/opt/victoriametrics - The vmui web UI and the Prometheus-compatible query and ingest API, fronted by nginx on
:80 - nginx HTTP Basic auth (VictoriaMetrics single-node has no built-in authentication) with a per-VM password in a root-only file
- A dedicated Azure data disk at
/var/lib/victoria-metricsholding all time-series data, separate from the OS disk and re-provisioned with every VM - Built-in self-monitoring (
-selfScrapeInterval) so the database has live metrics from first boot victoriametrics.serviceandnginx.serviceas systemd units, enabled and active- 24/7 SecureAnyCloud support
Prerequisites
Before you deploy this image you need:
- An active Azure subscription
- An SSH key pair
- A virtual network and subnet in the target region
- A network security group that allows inbound
22/tcpfrom your management network and80/tcpfor the web UI and API. Front the web UI with TLS for public exposure (see Enabling HTTPS).
Standard_B2ms (2 vCPU / 8 GiB RAM) is a good starting point. Scale up for higher ingestion rates and cardinality.
Step 1 - Deploy from the Azure Marketplace
- Sign in to the Azure Portal, choose Create a resource, search the Marketplace for VictoriaMetrics by SecureAnyCloud, and select Create.
- On Basics, pick your subscription, resource group, region and size.
- Under Administrator account, choose SSH public key and paste your key.
- Under Inbound port rules, allow SSH (22) and HTTP (80).
- Review the dedicated data disk on the Disks tab, then select Review + create and Create.
Step 2 - Deploy from the Azure CLI
Accept the Marketplace terms, create the VM, and open port 80. Replace the values in angle brackets with your own:
# Accept the Marketplace terms once per subscription (required before the first CLI deploy)
az vm image terms accept --urn sac1647283583153:victoriametrics-ubuntu-24-04:default:latest
az vm create \
--resource-group <your-rg> \
--name victoriametrics \
--image sac1647283583153:victoriametrics-ubuntu-24-04:default:latest \
--size Standard_B2ms \
--admin-username azureuser \
--ssh-key-values ~/.ssh/id_ed25519.pub \
--vnet-name <your-vnet> --subnet <your-subnet> \
--public-ip-sku Standard
az vm open-port --resource-group <your-rg> --name victoriametrics --port 80 --priority 1010Step 3 - Connect to your VM
Connect over SSH as the administrator user you configured:
ssh azureuser@<vm-public-ip>Step 4 - Confirm the services are running
Check that both services are active:
systemctl is-active victoriametrics.service nginx.serviceBoth services report active. VictoriaMetrics starts in seconds and begins self-scraping its own metrics immediately.
Step 5 - Retrieve your web password
The admin password is generated uniquely on the first boot of your VM and written to a root-only file. Read it as root:
sudo cat /root/victoriametrics-credentials.txtThe file contains VICTORIAMETRICS_ADMIN_USER (admin) and VICTORIAMETRICS_ADMIN_PASSWORD, plus the URLs for the web UI and API. Store the password somewhere safe.
Step 6 - Check the health endpoint
nginx serves an unauthenticated health endpoint for load balancers and probes. Query it:
curl -s http://localhost/healthIt returns ok.
Step 7 - Open the vmui web UI
Browse to http://<vm-public-ip>/vmui/ and sign in as admin with the password from Step 5.
vmui is the built-in query interface. Enter a PromQL or MetricsQL expression and run it as a graph, JSON or table. The image self-scrapes its own internals, so you can immediately graph metrics such as process_resident_memory_bytes or vm_rows.
The Table tab shows the instant value of each series returned by your query.
The Cardinality tool under Explore helps you find which metrics and label values consume the most storage.
Step 8 - Query from the command line
The Prometheus-compatible query API is available behind the same Basic auth. Confirm that VictoriaMetrics is serving and report its build version:
curl -s -u admin:<VICTORIAMETRICS_ADMIN_PASSWORD> 'http://localhost/api/v1/query?query=vm_app_version' | head -c 300; echoYou get a JSON response with "status":"success" and a vm_app_version series carrying the running version label.
Step 9 - Ingest your own metrics
VictoriaMetrics accepts Prometheus remote-write at /api/v1/write and also a simple line-import endpoint.
Push a sample data point with the Prometheus import API. It is accepted immediately and becomes queryable within a few seconds. Then query the total number of active time series the database is tracking:
printf 'example_metric{source="guide"} 42\n' | curl -s -u admin:<VICTORIAMETRICS_ADMIN_PASSWORD> -H 'Content-Type: text/plain' --data-binary @- http://localhost/api/v1/import/prometheus curl -s -u admin:<VICTORIAMETRICS_ADMIN_PASSWORD> 'http://localhost/api/v1/query?query=count(%7B__name__!=%22%22%7D)' | head -c 300; echoThe count query returns a "status":"success" response with the number of active series, which the image's built-in self-monitoring has already populated.
To ship real metrics, point Prometheus, Telegraf, Grafana Agent or any remote-write client at http://<vm-public-ip>/api/v1/write with the Basic-auth credentials. To visualize them, add VictoriaMetrics as a Prometheus data source in Grafana using the same URL.
Step 10 - Confirm data lives on the dedicated disk
All time-series data is stored on the dedicated Azure data disk, so it survives OS changes and can be resized independently. Confirm the mount:
findmnt /var/lib/victoria-metricsThe mount is backed by a separate Azure data disk captured into the image and re-provisioned on every VM.
Enabling HTTPS
The nginx reverse proxy terminates plain HTTP on port 80. For public exposure, put a certificate in front of it.
The simplest option is to add a DNS name for the VM and use the companion SecureAnyCloud nginx-ssl-certbot image as a TLS reverse proxy. Alternatively, install certbot and extend the existing nginx site with a listen 443 ssl; server block and your certificate paths.
Keep VictoriaMetrics itself bound to loopback, so the only public surface is the authenticated, TLS-terminated proxy.
Maintenance
- Retention: the image keeps 12 months of data by default (
-retentionPeriod=12). Adjust it in/etc/default/victoriametrics(theVM_ARGSline) and runsudo systemctl restart victoriametrics. - Backups: snapshot the
/var/lib/victoria-metricsdata disk, or usevmbackupfor incremental backups to Azure Blob Storage. - Upgrades: replace the
/opt/victoriametrics/victoria-metrics-prodbinary with a newer release and restart the service. The on-disk data format is forward-compatible. - Security patches: unattended-upgrades remains enabled so the OS continues to receive security updates automatically.
Support
SecureAnyCloud provides 24/7 expert support for this image. Contact sales@secureanycloud.com.
Deploy on Azure
Launch VictoriaMetrics on Ubuntu 24.04 LTS on Azure with 24/7 support from SecureAnyCloud.
View this image
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com
Overview
This image runs VictoriaMetrics, a fast, cost-effective and scalable open-source time-series database and monitoring solution. VictoriaMetrics is a drop-in replacement for Prometheus remote storage. It accepts metrics over the Prometheus remote-write protocol, the Influx line protocol, Graphite, OpenTSDB and its own JSON and CSV import APIs. It answers queries in MetricsQL, a backwards-compatible superset of PromQL.
The VictoriaMetrics single-node binary is installed under /opt/victoriametrics. It runs as a dedicated unprivileged victoriametrics system account under a systemd service that starts it on boot and restarts it on failure. The time-series database lives at /var/lib/victoria-metrics, a dedicated, independently resizable EBS data volume.
VictoriaMetrics ships with no built-in authentication, so the database binary binds to the loopback interface only and is never exposed directly. An nginx reverse proxy publishes the vmui web interface and the Prometheus-compatible read and write APIs on port 80 behind HTTP Basic authentication.
The admin password is generated on the first boot of every deployed instance, so two instances launched from the same Amazon Machine Image never share a password. It is written to /root/victoriametrics-credentials.txt with mode 0600, so only the root user can read it.
What you get:
- VictoriaMetrics single-node binary, running as a dedicated unprivileged system account
- A systemd service that starts on boot and restarts on failure
- A dedicated, independently resizable EBS data volume for the time-series database
- nginx on port 80 in front of the loopback-only database, with HTTP Basic authentication
- A per-instance admin password generated on first boot
Prerequisites
Before you deploy this image you need:
- An Amazon Web Services account where you can launch EC2 instances
- IAM permissions to launch instances, create security groups, and subscribe to AWS Marketplace products
- An EC2 key pair in the target Region for SSH access to the instance
- A VPC and subnet in the target Region, with a security group that allows inbound port 22 from your management network and port 80 for the vmui interface and the read and write APIs
- The AWS CLI (version 2) installed locally if you plan to deploy from the command line
Launch the Instance from the AWS Marketplace
Sign in to the AWS Management Console, open the EC2 service, and select Launch instance. Under Application and OS Images, choose AWS Marketplace AMIs and search for VictoriaMetrics. Select the SecureAnyCloud listing, choose Select, then choose Continue on the subscription summary.
Pick an instance type of t3.large or larger. Choose your EC2 key pair under Key pair (login).
Under Network settings, select your VPC and subnet. Create or select a security group that opens port 22 from your management network and port 80 for the vmui interface and the APIs. Leave the root volume at the default size or larger.
Select Launch instance. First-boot initialisation takes a few seconds after the instance state becomes Running and the status checks pass.
Launch the Instance from the AWS CLI
The following command launches an instance from the SecureAnyCloud VictoriaMetrics Marketplace AMI into an existing subnet and security group. Replace the values as follows:
- Replace <ami-id> with the AMI ID shown on the Marketplace listing.
- Replace <key-name> with your EC2 key pair name.
- Replace <subnet-id> with your subnet ID.
- Replace <security-group-id> with a security group that opens ports 22 and 80 as described above.
aws ec2 run-instances \
--image-id <ami-id> \
--instance-type t3.large \
--key-name <key-name> \
--subnet-id <subnet-id> \
--security-group-ids <security-group-id> \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=victoriametrics}]'When the instance reaches the Running state and its status checks pass, note its public IP address or DNS name. You can find it in the EC2 console or with aws ec2 describe-instances.
Connect to Your Instance
Connect over SSH using your key pair and the login user for your operating system variant.
OS variant SSH login user
Ubuntu 24.04 ubuntu
ssh -i <key-name>.pem ubuntu@<public-ip>Retrieve the Admin Password
The vmui admin password is unique to your instance and was generated on first boot. Read it as root:
sudo cat /root/victoriametrics-credentials.txtThe file lists the vmui URL, the admin user (admin) and the generated password, along with the ingestion endpoint URLs. Keep the password somewhere safe.
Sign In to the vmui Web Interface
The vmui web interface is served on port 80 by nginx behind HTTP Basic authentication. In a browser, go to:
http://<instance-public-ip>/You are prompted for credentials. Sign in as admin with the password from the credentials file. The bare root redirects to the vmui query interface, where you can enter a MetricsQL or PromQL expression and graph the result.
vmui graphs every matching time series. Switch the time range with the range picker, add more queries with Add Query, and toggle between the Graph, JSON and Table result views.
The Table view lists the instant value of every series returned by the query, which is useful for inspecting labels and current values.
Confirm VictoriaMetrics Is Running
Over SSH, confirm the database and the nginx proxy are active and that the ports are listening:
sudo systemctl is-active victoriametrics nginx
sudo ss -tlnp | grep -E ':(80|8428) 'You should see both services reported as active, the database listening on 127.0.0.1:8428 (loopback only), and nginx listening on port 80.
Ingest Metrics
VictoriaMetrics accepts metrics over several protocols on port 80 through the authenticating proxy. Point your existing agents at the instance using the admin credentials:
- Prometheus remote write: set the
remote_writeURL in your Prometheus or vmagent config tohttp://<instance-public-ip>/api/v1/writewith basic auth useradmin. - Influx line protocol: send to
http://<instance-public-ip>/influx/write. - Graphite and OpenTSDB: enable the corresponding listeners as described in the VictoriaMetrics documentation.
- Import APIs: push JSON, CSV or Prometheus exposition format to
http://<instance-public-ip>/api/v1/importand related endpoints.
The database also exposes its own internal metrics. List the metric names currently stored with a loopback query on the instance:
curl -s http://127.0.0.1:8428/api/v1/label/__name__/valuesQuery with MetricsQL and the HTTP API
Query VictoriaMetrics through the vmui interface, your Grafana dashboards, or the Prometheus-compatible HTTP API. Instant queries go to /api/v1/query and range queries go to /api/v1/query_range. On the instance, you can query over loopback without credentials:
curl -s 'http://127.0.0.1:8428/api/v1/query?query=vm_rows' | head -c 400; echoFrom outside the instance, send the same request to http://<instance-public-ip>/api/v1/query with basic auth user admin and the generated password.
Connect Grafana
Add VictoriaMetrics to Grafana as a Prometheus data source. Set the URL to http://<instance-public-ip>/, enable Basic auth, and enter user admin with the generated password. VictoriaMetrics answers the Prometheus query API, so existing Prometheus dashboards work unchanged. You can also use MetricsQL extensions in your panels.
The Data Volume
The time-series database lives on a dedicated EBS volume mounted at /var/lib/victoria-metrics. This keeps the metrics store off the operating system disk and lets you resize or snapshot it independently. Confirm the mount with:
df -h /var/lib/victoria-metricsTo grow the metrics store, expand the EBS volume in the AWS console, then grow the filesystem on the instance with sudo resize2fs on the underlying device. Retention is set to 12 months by default and can be changed with the -retentionPeriod flag in the victoriametrics.service unit.
Enable HTTPS
nginx serves the vmui interface and the APIs over plain HTTP on port 80. For production use, place them behind TLS.
Obtain a certificate for your domain, for example with a managed certificate on an Application Load Balancer in front of the instance, or with Certbot installed on the instance. Then configure nginx to listen on 443 with your certificate and proxy to 127.0.0.1:8428, exactly as the bundled site does for port 80. Keep the HTTP Basic authentication in place.
Restrict the security group so port 80 and 443 are reachable only from the networks that ingest and query metrics.
Backup and Maintenance
Back up the database by snapshotting the /var/lib/victoria-metrics EBS volume, which captures the entire time-series store. VictoriaMetrics also supports consistent backups with the vmbackup tool.
Apply operating system security updates with sudo apt-get update && sudo apt-get upgrade, and reboot when a new kernel is installed. VictoriaMetrics and nginx start automatically on boot.
Support
This image is published and supported by SecureAnyCloud. Support covers deployment, ingestion protocol configuration, retention and downsampling, MetricsQL queries, Grafana integration, TLS and storage tuning. Contact SecureAnyCloud through the support channel listed on the AWS Marketplace listing.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Deploy on AWS
Launch VictoriaMetrics on AWS with 24/7 support from SecureAnyCloud.
View on Marketplace
Need Help?
Our support team is available 24/7.
sales@secureanycloud.com