For the complete documentation index, see llms.txt. This page is also available as Markdown.

Datasource API Keys (Legacy)

groundcover provides a robust user interface that allows you to view and analyze all your observability data from inside the platform. However, there may be cases in which you need to query the data from outside our platform using API communication.

Our proprietary eBPF sensor automatically captures granular observability data, which is stored via our integrations with two best-of-breed technologies. VictoriaMetrics for metrics storage, and ClickHouse for storage of logs, traces, and Kubernetes events.

Read more about our architecture here.

Generate the API key

Run the following command in your CLI, and select tenant:

groundcover auth get-datasources-api-key

Querying ClickHouse

Example for querying ClickHouse database using POST HTTP Request:

curl 'https://ds.groundcover.com/' \
        --header "X-ClickHouse-Key: ${API_KEY}" \
        --data "SELECT count() from traces where start_timestamp > now() - interval '15 minutes' "

Command parameters

  • X-ClickHouse-Key (header): API Key you retrieved from the groundcover CLI. Replace ${API_KEY} with your actual API key, or set API_KEY as env parameter.

  • SELECT count() FROM traces WHERE start_timestamp > now() - interval '15 minutes' (data): The SQL query to execute. This query counts the number of traces where the start_timestamp is within the last 15 minutes.

Learn more about the ClickHouse query language here.

Querying VictoriaMetrics

Example for querying the VictoriaMetrics database using the query_range API:

Command parameters

  • apikey (header): API Key you retrieved from the groundcover CLI. Replace ${API_KEY} with your actual API key, or set API_KEY as env parameter.

  • query (data): The MetricsQL query to execute. In this case, it calculates the sum of the 5-minute rate of groundcover_container_cpu_throttled_seconds_total with the namespace set to default. MetricsQL is PromQL-compatible, so plain PromQL works too.

  • start (data): The start timestamp for the query range in Unix time (seconds since epoch). Example: 1715760000.

  • end (data): The end timestamp for the query range in Unix time (seconds since epoch). Example: 1715763600.

Learn more about the MetricsQL syntax, or the PromQL syntax it builds on.

Learn more about VictoriaMetrics HTTP API here.

Last updated