docs-mintlify/admin/monitoring/monitoring-integrations/grafana-cloud.mdx
Grafana Cloud is a popular fully managed observability service. This guide demonstrates how to set up Cube Cloud to export logs to Grafana Cloud.
First, enable monitoring integrations in Cube Cloud.
To export logs to Grafana Cloud, go to your account and get credentials for Loki, the logging service in Grafana Cloud:
<Frame> </Frame>Then, configure the loki sink in your vector.toml
configuration file.
Example configuration:
[sinks.loki]
type = "loki"
inputs = [
"cubejs-server",
"refresh-scheduler",
"warmup-job",
"cubestore"
]
endpoint = "https://logs-prod-012.grafana.net"
[sinks.loki.auth]
strategy = "basic"
user = "$CUBE_CLOUD_MONITORING_GRAFANA_CLOUD_USER"
password = "$CUBE_CLOUD_MONITORING_GRAFANA_CLOUD_PASSWORD"
[sinks.loki.encoding]
codec = "json"
[sinks.loki.cubestore]
levels = [
"trace",
"info",
"debug",
"error"
]
[sinks.loki.labels]
app = "cube-cloud"
env = "production"
Commit the configuration for Vector, it should take effect in a minute. Then, navigate to Logs in Grafana Cloud and watch the logs coming.
<Frame> </Frame>To export metrics to Grafana Cloud, go to your account and get credentials for Prometheus, the metrics service in Grafana Cloud:
<Frame> </Frame>Then, configure the prometheus_remote_write sink in
your vector.toml configuration file.
Example configuration:
[sinks.prometheus]
type = "prometheus_remote_write"
inputs = [
"metrics"
]
endpoint = "https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/push"
[sinks.prometheus.auth]
strategy = "basic"
user = "1033221"
password = "eyJrIjoiYTg1OTQ2OGY4Yzg3MTQxODc5OTA4NDUxMGM4NTA2ZDQ3ZjliYWZjOCIsIm4iOiJwcnciLCJpZCI6ODc1NzE5fQ=="
Commit the configuration for Vector, it should take effect in a minute. Then, navigate to Explore in Grafana Cloud, select metrics from the drop down:
<Frame> </Frame>Then, you can create visualizations and add them to a dashboard:
<Frame> </Frame>