mirror of https://github.com/grafana/grafana
prometheushacktoberfestmetricsmonitoringalertinggrafanagoinfluxdbmysqlpostgresanalyticsdata-visualizationdashboardbusiness-intelligenceelasticsearch
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
7.4 KiB
102 lines
7.4 KiB
|
3 years ago
|
---
|
||
|
|
aliases:
|
||
|
3 years ago
|
- ../features/datasources/phlare/
|
||
|
3 years ago
|
- ../features/datasources/grafana-pyroscope/
|
||
|
3 years ago
|
description: Horizontally-scalable, highly-available, multi-tenant continuous profiling
|
||
|
|
aggregation system. OSS profiling solution from Grafana Labs.
|
||
|
3 years ago
|
keywords:
|
||
|
|
- grafana
|
||
|
|
- phlare
|
||
|
|
- guide
|
||
|
|
- profiling
|
||
|
3 years ago
|
- pyroscope
|
||
|
3 years ago
|
title: Grafana Pyroscope
|
||
|
3 years ago
|
weight: 1150
|
||
|
|
---
|
||
|
|
|
||
|
3 years ago
|
# Grafana Pyroscope data source
|
||
|
3 years ago
|
|
||
|
3 years ago
|
Formerly Phlare data source, it supports both Phlare and Pyroscope, a horizontally scalable, highly-available, multi-tenant, OSS, continuous profiling aggregation systems. Add it as a data source, and you are ready to query your profiles in [Explore]({{< relref "../explore" >}}).
|
||
|
3 years ago
|
|
||
|
3 years ago
|
## Configure the Grafana Pyroscope data source
|
||
|
3 years ago
|
|
||
|
3 years ago
|
To configure basic settings for the data source, complete the following steps:
|
||
|
|
|
||
|
|
1. Click **Connections** in the left-side menu.
|
||
|
|
1. Under Your connections, click **Data sources**.
|
||
|
3 years ago
|
1. Enter `Grafana Pyroscope` in the search bar.
|
||
|
|
1. Click **Grafana Pyroscope**.
|
||
|
3 years ago
|
|
||
|
|
The **Settings** tab of the data source is displayed.
|
||
|
|
|
||
|
|
1. Set the data source's basic configuration options:
|
||
|
|
|
||
|
3 years ago
|
| Name | Description |
|
||
|
|
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||
|
|
| `Name` | A name to specify the data source in panels, queries, and Explore. |
|
||
|
|
| `Default` | The default data source will be pre-selected for new panels. |
|
||
|
3 years ago
|
| `URL` | The URL of the Grafana Pyroscope or Phlare instance, e.g., `http://localhost:4100` |
|
||
|
|
| `Basic Auth` | Enable basic authentication to the data source. |
|
||
|
3 years ago
|
| `User` | User name for basic authentication. |
|
||
|
|
| `Password` | Password for basic authentication. |
|
||
|
|
| `Minimal step` | Used for queries returning timeseries data. Phlare backend, similar to Prometheus, scrapes profiles at certain intervals. To prevent querying at smaller interval use Minimal step same or higher than your Phlare scrape interval. For Pyroscope backend this prevents returning too many data points to the front end. |
|
||
|
|
| `Backend type` | Select a backend type between Phlare and Pyroscope. It is autodetected if not set but once set you have to change it manually. |
|
||
|
3 years ago
|
|
||
|
|
## Querying
|
||
|
|
|
||
|
|
### Query Editor
|
||
|
|
|
||
|
|

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

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

|
||
|
|
|
||
|
3 years ago
|
Use the labels selector input to filter by labels. Phlare and Pyroscope uses similar syntax to Prometheus to filter labels. Refer to [Phlare documentation](https://grafana.com/docs/phlare/latest/) for available operators and syntax.
|
||
|
3 years ago
|
|
||
|
|

|
||
|
|
|
||
|
|
Options section contains a switch for Query Type and Group by.
|
||
|
|
|
||
|
|
Select a query type to return the profile data which can be shown in the [Flame Graph]({{< relref "../panels-visualizations/visualizations/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.
|
||
|
|
|
||
|
|
Group by allows you to group metric data by a specified label. Without any Group by label, metric data is aggregated over all the labels into single time series. You can use multiple labels to group by. Group by has only an effect on the metric data and does not change the profile data results.
|
||
|
|
|
||
|
|
### Profiles query results
|
||
|
|
|
||
|
|
Profiles can be visualized in a flame graph. See the [Flame Graph documentation]({{< relref "../panels-visualizations/visualizations/flame-graph" >}}) to learn about the visualization and its features.
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
3 years ago
|
Phlare and Pyroscope 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 scrape interval.
|
||
|
3 years ago
|
|
||
|
|
### Metrics query results
|
||
|
|
|
||
|
|
Metrics results represent the aggregated sum value over time of the selected profile type.
|
||
|
|
|
||
|
|

|
||
|
|
|
||
|
|
This allows you to quickly see any spikes in the value of the scraped profiles and zoom in to a particular time range.
|
||
|
|
|
||
|
3 years ago
|
## Provision the Grafana Pyroscope data source
|
||
|
3 years ago
|
|
||
|
3 years ago
|
You can modify the Grafana configuration files to provision the Grafana Pyroscope data source. To learn more, and to view the available provisioning settings, see [provisioning documentation]({{< relref "../administration/provisioning/#datasources" >}}).
|
||
|
3 years ago
|
|
||
|
|
Here is an example config:
|
||
|
|
|
||
|
|
```yaml
|
||
|
|
apiVersion: 1
|
||
|
|
|
||
|
|
datasources:
|
||
|
3 years ago
|
- name: Grafana Pyroscope
|
||
|
3 years ago
|
type: phlare
|
||
|
|
url: http://localhost:4100
|
||
|
|
jsonData:
|
||
|
|
minStep: '15s'
|
||
|
3 years ago
|
backendType: 'pyroscope'
|
||
|
3 years ago
|
```
|