0

I have an Kotlin application instrumented with Micrometer running AWS AppRunner and I want to send the metrics to Amazon Managed Prometheus (AMP).

Can I use Victoria Metrics agent or Grafana agent to do this for me? Or is there another way to perform remote write to AMP directly from my Kotlin application?

  • 2
    vmagent can be used as a drop-in replacement for Prometheus. It can be used to scrape metrics or to recieve metrics and then push them to remote write url (see https://docs.victoriametrics.com/vmagent.html#features). So you can just push metrics to vmagent via prometheus remote write protocol, Telegraf, StatsD or even [Datadog agent](https://docs.victoriametrics.com/#how-to-send-data-from-datadog-agent). BTW: we have [Java lightweight library](https://github.com/VictoriaMetrics/metrics-java) for exporting metrics in Prometheus format. – Denys Holius Jun 23 '23 at 09:42
  • 1
    _Or is there another way to perform remote write to AMP directly from my Kotlin application?_ Yes, you can push metrics to AMP without using agent but you may loose pushed data in case of network or receiver availability problems. By pushing to vagent and then to AMP you can safe metrics in vmagent queue until the recipient is will be available again. – Denys Holius Jun 23 '23 at 09:48
  • 1
    FYI: you will need to use Sigv4 for vmagent, so use these flags https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1287#issuecomment-1118375202 – Denys Holius Jun 26 '23 at 08:22
  • Thanks for the insights, I'll give this a try. – Piyush Nahar Jun 27 '23 at 10:33
  • Is there any benchmarking on how much CPU and memory the vmagent needs for handling ~100 metrics from a single node? I'm trying to run this on AWS Apprunner where CPU is throttled between external requests. – Piyush Nahar Jun 27 '23 at 10:34
  • 2
    According to https://victoriametrics.com/blog/benchmark-100m/ vmagent needs 128vCPU to process 100Mil time series per second. So for 100 metrics (I assume it is time series) per-second you'd likely need `100*128/100e6=0.000128 vCPU`. See the difference between [metric](https://docs.victoriametrics.com/keyConcepts.html#what-is-a-metric) and [time series](https://docs.victoriametrics.com/keyConcepts.html#time-series). – hagen1778 Jun 28 '23 at 12:21

0 Answers0