grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.41k stars 205 forks source link

Docs feedback: Error in prometheus.exporter.snmp component documentation #2013

Open clayton-cornell opened 1 week ago

clayton-cornell commented 1 week ago

URL

https://grafana.com/docs/alloy/latest/reference/components/prometheus/prometheus.exporter.snmp/

Feedback

Slack discussion: https://raintank-corp.slack.com/archives/C5PG2JK8W/p1730395307519059

There is an error with this alloy doc for snmp. The line targets = encoding.from_yaml(local.file.targets.content) is wrong. encoding.from_yaml does not return an array ( as you can see from here), which is what targets expect. Instead, file based discovery should be used here.

ptodev commented 1 week ago

I do think encoding.from_yaml should produce an array actually, since the yaml example file also has an array. Are we sure this is a problem?