How can i read a .prom file and scrape it with prometheus to send It to grafana Cloud?
I tried this:
local.file "stats" {
filename = "/etc/metrics_stats/stats.prom"
}
prometheus.scrape "stats" {
targets = [local.file.stats.content]
forward_to = [prometheus.relabel.stats.receiver]
}
But It gives the error:
Error: /etc/alloy/config.alloy:27:14: local.file.stats.content target::ConvertFrom: conversion from 'alloytypes.OptionalSecret' is not supported