Menu

Send data to Grafana Federal Cloud

When onboarding to Federal Cloud, a tenant is provisioned for you in each of the Grafana Enterprise Logs, Grafana Enterprise Metrics, and Grafana Enterprise Traces plugins. Each plugin tenant has separate read and write access policies. Before you can send logs, metrics, or traces, you must generate an access token for that type of data. Each access token is associated with an access policy. You can use the initially created access policy, or create a new one.

To create access policies and tokens, refer to the following documentation.

Send logs, metrics, and traces

You can use Grafana Alloy to send logs, metrics, and traces to Grafana Federal Cloud. You can use the following code to get started configuring Alloy.

Send logs to Grafana Federal Cloud using Grafana Alloy

alloy
loki.write "grafanafedcloud" {
  endpoint {
    url = "https://grafana-fed-1.fedstart.com/<myorganization>/logs/api/v1/push"
    basic_auth {
      username = "1206133"
      password = "<LOGS_ACCESS_TOKEN>"
    }
  }
}

Remember to update the URL, username, and password values according to your stack and access token. Refer to Create an access policy.

Send traces to Grafana Federal Cloud using Grafana Alloy

alloy
otelcol.receiver.otlp "otlp_receiver" {
  grpc {
    endpoint = "0.0.0.0:4317"
  }
  http {
    endpoint = "0.0.0.0:4318"
  }
  output {
    traces = [otelcol.exporter.otlp.grafanacloud.input]
  }
}
otelcol.exporter.otlp "grafanafedcloud" {
  client {
    endpoint = "grafana-fed-1.fedstart.com/<myorganization>/traces:443"
    auth = otelcol.auth.basic.grafanacloud.handler
  }
}
otelcol.auth.basic "grafanafedcloud" {
  username = "1200444"
  password = "<TRACES_ACCESS_TOKEN>"
}

Remember to update the endpoint, username, and password values according to your stack and access token. Refer to Create an access policy.

Send metrics to Grafana Federal Cloud using Grafana Alloy

alloy
prometheus.remote_write "grafanafedcloud" {
  endpoint {
    url = "https://grafana-fed-1.fedstart.com/<myorganization>/metrics/api/v1/push"
    basic_auth {
      username = "2420913"
      password = "<METRICS_ACCESS_TOKEN>"
    }
  }
}

Remember to update the URL, username, and password values according to your stack and access token. Refer to Create an access policy.

Send metrics to Grafana Federal Cloud with Prometheus

alloy
remote_write:
- url: https://grafana-fed-1.fedstart.com/<myorganization>/metrics/api/v1/push
  basic_auth:
    username: 2420913
    password: <METRICS_ACCESS_TOKEN>

Remember to update the URL, username, and password values according to your stack and access token. Refer to Create an access policy.