Back to articles
AI & Cloud

Agentless Multi-Cloud Monitoring with VictoriaMetrics and vmagent on a Central VPS

A detailed guide on setting up agentless infrastructure monitoring using VictoriaMetrics and vmagent on a central VPS. Covers installation, configuration, testing, and performance...

DPTCloud Engineering4 min read
Agentless Multi-Cloud Monitoring with VictoriaMetrics and vmagent on a Central VPS

Introduction to Agentless Infrastructure Monitoring

Infrastructure monitoring is essential for ensuring system stability, especially in multi-cloud environments. Instead of installing agents on each server, you can use vmagent—a lightweight data collector from VictoriaMetrics—to gather metrics from sources like Prometheus, SNMP, or HTTP endpoints without installing software on the target machines. This guide walks you through configuring multi-cloud infrastructure monitoring on a central VPS using VictoriaMetrics and vmagent, completely agentless.

Prerequisites

To follow this guide, you need:

  • A central VPS (High-RAM Cloud VPS) with root access.
  • At least two servers or devices to monitor (can be VPS, physical servers, or cloud services).
  • Public IP addresses or network connectivity from the central VPS to monitored devices.
  • Cloud VPS RAM lớn for self-hosting LLMs and API gateways (if required).

Install and Configure VictoriaMetrics

VictoriaMetrics is a time-series data storage and query engine. Install it on the central VPS using Docker:

docker run -d --name vmstorage -p 8428:8428 -p 8429:8429 victoriametrics/vmstorage:latest

Then deploy the VictoriaMetrics single server:

docker run -d --name vmsingle -p 8428:8428 victoriametrics/vmsingle:latest

Access http://:8428 to verify the system is running.

Configure vmagent for Data Collection

vmagent collects data without requiring agents. To monitor a remote server, create a vmagent.yml configuration file:

scrape_configs:
  - job_name: 'remote_server'
    static_configs:
      - targets: ['192.168.1.100:9100']  # Target server IP and port
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance

Start vmagent with the configuration:

docker run -d --name vmagent -p 8429:8429 -v /path/to/vmagent.yml:/etc/vmagent/config.yml victoriametrics/vmagent:latest

vmagent will collect metrics and send them to VictoriaMetrics via port 8429.

Testing and Optimization

To validate the setup:

Optimization tips:

  • Reduce scrape frequency if not needed.
  • Use relabel_configs to filter out unnecessary data.
  • Set memory and CPU limits for Docker containers.

Troubleshooting

If vmagent fails to send data:

  • Verify VictoriaMetrics is running and listening on port 8429.
  • Ensure vmagent.yml is correctly formatted.
  • Confirm the target server allows port 9100 (or your configured port).
  • Check vmagent logs: docker logs vmagent.

References

Related infrastructure & engineering guides: High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478