vmetrics // vmagent setup

grab latest VMUTILS release

cd /opt/
mkdir vmutils/
cd vmutils/

ver=1.102.1

wget https://github.com/VictoriaMetrics/VictoriaMetrics/releases/download/v$ver/vmutils-linux-amd64-v$ver.tar.gz
tar xzf vmutils-linux-amd64-v$ver.tar.gz
chown root:root *
vi scrape.yml # new file
global:
  scrape_interval: 5s

scrape_configs:

  - job_name: HOSTNAME-metrics
    static_configs:
      - targets: ['localhost:9100']
        labels:
          sensor: vmagent@HOSTNAME
          host: HOSTNAME

DRAFT FAILS - need to use relabelling instead?

  metric_relabel_configs:
    - source_labels: [name]
      action: keep
      regex: '^node_load'
server=VMETRICS-SERVER

nmap -p 8480 $server

# cluster mode target address sample
/opt/vmutils/vmagent-prod -promscrape.config /opt/vmutils/scrape.yml \
    -promscrape.config.strictParse=true \
    -remoteWrite.url=http://$server:8480/insert/0/prometheus/api/v1/write

resources

https://docs.victoriametrics.com/vmagent/


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun