Menu

This is documentation for the next version of Grafana. For the latest stable release, go to the latest version.

Grafana Cloud Enterprise Open source

Parca data source

Grafana ships with built-in support for Parca, a continuous profiling OSS database for analysis of CPU and memory usage, down to the line number and throughout time. Add it as a data source, and you are ready to query your profiles in Explore.

Supported Parca versions

This data source supports these versions of Parca:

  • v0.19+

Configure the Parca data source

To configure basic settings for the data source, complete the following steps:

  1. Click Connections in the left-side menu.

  2. Under Your connections, click Data sources.

  3. Enter Parca in the search bar.

  4. Click Parca.

    The Settings tab of the data source is displayed.

  5. Set the data source’s basic configuration options:

    NameDescription
    NameA name to specify the data source in panels, queries, and Explore.
    DefaultThe default data source will be pre-selected for new panels.
    URLThe URL of the Parca instance, e.g., http://localhost:4100
    Basic AuthEnable basic authentication to the Parca data source.
    UserUser name for basic authentication.
    PasswordPassword for basic authentication.

Querying

Query Editor

Query editor

Query editor gives you access to a profile type selector, a label selector, and collapsible options.

Profile selector

Select a profile type from the drop-down menu. While the label selector can be left empty to query all profiles without filtering by labels, the profile type must be selected for the query to be valid. Grafana does not show any data if the profile type isn’t selected when a query is run.

Labels selector

Use the labels selector input to filter by labels. Parca uses similar syntax to Prometheus to filter labels. Refer to Parca documentation for available operators and syntax.

Options section

Select a query type to return the profile data which can be shown in the Flame Graph, metric data visualized in a graph, or both. You can only select both options in a dashboard, because panels allow only one visualization.

Profiles query results

Profiles can be visualized in a flame graph. See the Flame Graph documentation to learn about the visualization and its features.

Flame graph

Parca returns profiles aggregated over a selected time range, and the absolute values in the flame graph grow as the time range gets bigger while keeping the relative values meaningful. You can zoom in on the time range to get a higher granularity profile up to the point of a single Parca scrape interval.

Metrics query results

Metrics results represent the aggregated value, over time, of the selected profile type. Parca returns ungrouped data with a series for each label combination.

Metrics graph

This allows you to quickly see any spikes in the value of the scraped profiles and zoom in to a particular time range.

Provision the Parca data source

You can modify the Grafana configuration files to provision the Parca data source. To learn more, and to view the available provisioning settings, see provisioning documentation.

Here is an example config:

yaml
apiVersion: 1

datasources:
  - name: Parca
    type: parca
    url: http://localhost:3100