Integration with Grafana Cloud
Grafana Cloud (opens in a new tab) 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:
[sinks.loki] type = "loki" inputs = [ "cubejs-server", "refresh-scheduler", "ext-db", "warmup-job", "cubestore" ] endpoint = "https://logs-prod-012.grafana.net" [sinks.loki.auth] strategy = "basic" user = "618504" password = "eyJrIjoiMDVmMzE4MTk4ZDY1NGE5NWQ3Y2M2Yjk0MzE0M2JkZmJjNTMzMzU5ZCIsIm4iOiJrZXkiLCJpZCI6ODc1NzE5fQ==" [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.
To export metrics to Grafana Cloud, go to your account and get credentials for Prometheus, the metrics service in Grafana Cloud:
[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:
Then, you can create visualizations and add them to a dashboard: