Skip to main content
Cube Cloud allows exporting logs and metrics to external monitoring tools so you can leverage your existing monitoring stack and retain logs and metrics for the long term.
Available as an add-on on the Enterprise plan.
Monitoring integrations suspend their work when a deployment goes to auto-suspension.
Monitoring integrations are only available for production environments. Under the hood, Cube Cloud uses Vector, an open-source tool for collecting and delivering monitoring data. It supports a wide range of destinations, also known as sinks.

Guides

Monitoring integrations work with various popular monitoring tools. Check the following guides and configuration examples to get tool-specific instructions:

Amazon CloudWatch

Export logs and metrics to Amazon CloudWatch.

Amazon S3

Archive logs to an Amazon S3 bucket.

Datadog

Export logs and metrics to Datadog.

Grafana Cloud

Export logs and metrics to Grafana Cloud.

New Relic

Export logs and metrics to New Relic.

Configuration

To enable monitoring integrations, navigate to Settings → Monitoring Integrations and click Enable Vector to add a Vector agent to your deployment.
Under Metrics export, you will see credentials for the prometheus_exporter sink, in case you’d like to setup metrics export. Additionally, create a vector.toml configuration file next to your cube.js file. This file is used to keep sinks configuration. You have to commit this file to the main branch of your deployment for Vector configuration to take effect.

Environment variables

You can use environment variables prefixed with CUBE_CLOUD_MONITORING_ to reference configuration parameters securely in the vector.toml file. Example configuration for exporting logs to Datadog:

Inputs for logs

Sinks accept the inputs option that allows to specify which components of a Cube Cloud deployment should export their logs: Example configuration for exporting logs to Datadog:
When exporting Cube Store logs using the cubestore input, you can filter logs by providing an array of their severity levels via the levels option. If not specified, only error and info logs will be exported.
If you’d like to adjust severity levels of logs from API instances and the refresh scheduler, use the CUBEJS_LOG_LEVEL environment variable.

Sinks for logs

You can use a wide range of destinations for logs, including the following ones: Example configuration for exporting all logs, including all Cube Store logs to Azure Blob Storage:

Inputs for metrics

Metrics are exported using the metrics input. Metrics will have their respective metric names and_types: gauge or counter. All metrics of the counter type reset to zero at the midnight (UTC) and increment during the next 24 hours. You can filter metrics by providing an array of input names via the list option. You can further filter exported metrics by providing an array of inputs. It applies to metics only. Example configuration for exporting all metrics from cubejs-server to Prometheus using the prometheus_remote_write sink:

Sinks for metrics

Metrics are exported in the Prometheus format which is compatible with the following sinks: Example configuration for exporting all metrics from cubejs-server to Prometheus using the prometheus_exporter sink:
Navigate to Settings → Monitoring Integrations to take the credentials prometheus_exporter under Metrics export:
You can also customize the user name and password for prometheus_exporter by setting CUBE_CLOUD_MONITORING_METRICS_USER and CUBE_CLOUD_MONITORING_METRICS_PASSWORD environment variables, respectively.

Query History export

With Query History export, you can bring Query History data to an external monitoring solution for further analysis, for example:
  • Detect queries that do not hit pre-aggregations.
  • Set up alerts for queries that exceed a certain duration.
  • Attribute usage to specific users and implement chargebacks.
Query History export is part of the Monitoring Integrations add-on, available on the Enterprise plan.
To configure Query History export, add the query-history input to the inputs option of the sink configuration. Example configuration for exporting Query History data to the standard output of the Vector agent:
Exported data includes the following fields:
See this recipe for an example of analyzing data from Query History export.