OTLP + Alloy troubleshooting

  • What Grafana version and what operating system are you using?
    Grafana cloud (latest I think?) Installing Alloy on Asahi Linux

  • What are you trying to achieve?
    I’m trying to install Alloy to complete the installation of the OTLP connector

  • How are you trying to achieve it?
    via the grafana cloud dashboard walkthrough

  • What happened?
    The initial installation script worked and the connection test was green. When I added the provided block of config for the open telemetry (“Append this to your config”) I get the following errors when trying to restart Alloy:

Error: ./config.alloy:118:14: component "otelcol.exporter.prometheus.grafana_cloud_prometheus.input" does not exist or is out of scope

117 |     output {
118 |         metrics = [otelcol.exporter.prometheus.grafana_cloud_prometheus.input]
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119 |         logs    = [otelcol.exporter.loki.grafana_cloud_loki.input]

Error: ./config.alloy:130:25: component "prometheus.remote_write.grafana_cloud_prometheus.receiver" does not exist or is out of scope

129 |     add_metric_suffixes = false
130 |     forward_to          = [prometheus.remote_write.grafana_cloud_prometheus.receiver]
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 | }

interrupt received
Error: could not perform the initial load successfully
  • What did you expect to happen?
    Alloy starts successfully and the config given in the dashboard does not have errors.

  • Can you copy/paste the configuration(s) that you are having problems with?
    Some of it, but it is quite long and has secrets in it.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No

  • Did you follow any online instructions? If so, what is the URL?
    I’m following the instructions at <my Grafana cloud url>connections/add-new-connection/open-telemetry

Thanks in advance :smiley:

I think I found the issue: the resource name should be prometheus.remote_write.metrics_service.receiver
not
prometheus_remote_write.grafana_cloud_prometheus.reciever

Also worth noting is this doc which describes some other resources that must be present for the Alloy to work with otel: Application Observability with Grafana Alloy | Grafana Cloud documentation

I think these were already set for me in the config that was created by the Alloy install script, but it is good to know about them and it was not clear from my first look at that doc what was happening. I’m still new to Grafana and there is quite a lot to take in.

I hope this helps somebody else.