Hello! I am relatively new to metrics collection systems. I have read readme and docs here but still i have some unclear points. Thanks in advance for addressing this. So:
/api/v1/import and /api/v1/export) endpoints to get and put (push strategy, not pull) into VM ?/import method or any other ingestion way), right? Thanks in advance. Sure that there are simple answers for this.
what is the right strategy for using VM: in what cases we need vmagent, and is it necessary at all?
The following docs describe cases for vmagent - https://victoriametrics.github.io/vmagent.html#use-cases .
can we use just JSON HTTP API import and export (/api/v1/import and /api/v1/export) endpoints to get and put (push strategy, not pull) into VM ?
yes.
what is the simplest use case? Just VM (no vmagent) + pushing app (an app which will use /import method or any other ingestion way), right?
yes.
what is the right way to configure VM for pulling (scraping) metric endpoints from app? Documentation says a lot about Prometheus configuration file but how it relates to VM?
Single-node VictoriaMetrics can scrape Prometheus-compatible exporters. It accepts the path to Prometheus configuration file via -promscrape.config command-line flag. The Prometheus configuration file should contain configs for scrape targets according to this specification. See more details at https://victoriametrics.github.io/#how-to-scrape-prometheus-exporters-such-as-node-exporter .
@valyala Oh thank you! Docs are very cool but a bit confusing for first-time experience with metrics gathering solution.
So to have full picture of things (in simple case) in our Grafana we need, as i understood, the following (except the VM and Grafana itself):
Is my understanding right? Thank you.
Yes, your understandings are correct. I'd recommend taking a look at https://github.com/VictoriaMetrics/metrics instead of https://github.com/prometheus/client_golang for exporting app metrics.
Hi @mtfelian! Here's a how-to article for collecting metrics if you're writing a Go application. It includes VM and Grafana configuration https://victoriametrics.medium.com/how-to-monitor-go-applications-with-victoriametrics-c04703110870
Finally, after e.g. having configured vmagent, how can one verify, whether it sends the right data to the vmdb?
I.e. an easy way to make sure, that certain labels/values get replaced/inserted/modified on the right metrics?
Most helpful comment
Hi @mtfelian! Here's a how-to article for collecting metrics if you're writing a Go application. It includes VM and Grafana configuration https://victoriametrics.medium.com/how-to-monitor-go-applications-with-victoriametrics-c04703110870