using vmagent to collect victoriametrics stats

 vmagent is part of victoriametrics, and is a lightweight prometheus scraper.

create a basic prometheus.yml file that defines a host to scrape, in this example it's using SSL and basic auth



global:
  scrape_interval:     15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: vmetrics
    static_configs:
      - targets:
         - host.to.scrape:443
    scheme: https
    basic_auth:
          username: user1
          password: password1

then run vmagent to use this and send to a victoriametrics node to store the metrics it scrapes



./vmagent-prod -httpListenAddr 127.0.0.1:8240 -remoteWrite.basicAuth.username user2
  -remoteWrite.basicAuth.password 'password2' 
  -remoteWrite.url=https://host.to.send.to:443/api/v1/write 
  -promscrape.config=prometheus.dsch.yml

if using the cluster version, the url in the command line might be



-remoteWrite.url=https://host.to.send.to:443/insert/0/prometheus/api/v1/write

Comments

Popular posts from this blog

Baileys liquor Chocolate Chip and Cream desert

using t1n1wall, opnsense or pfsense on Google Compute Engine GCE

nginx decode base64 url for use with imgproxy