Get started with Pyroscope
Choose one of the following options to get started with Pyroscope:
The written tutorial below provides a series of imperative commands to start a single Pyroscope process, or monolith, which is designed for users getting started with the project.
You can also use
docker-compose
to declaratively deploy Pyroscope and Grafana.
For more information on the different ways to deploy Pyroscope, see Pyroscope deployment modes.
Before you begin
Verify that you have installed Docker.
Download and configure Pyroscope
Download Pyroscope.
You can use Docker or download a binary to install Pyroscope.
To install with Docker, run the following command:
bashdocker pull grafana/pyroscope:latest
To use a local binary:
Download the appropriate release asset for your operating system and architecture and make it executable.
For example, for Linux with the AMD64 architecture:
bash# Download Pyroscope v1.0.0 and unpack it to the current folder curl -fL https://github.com/grafana/pyroscope/releases/download/v1.0.0/pyroscope_1.0.0_linux_amd64.tar.gz | tar xvz
Run Pyroscope.
In a terminal, run one of the following commands:
Using Docker:
bashdocker network create pyroscope-demo docker run --rm --name pyroscope --network=pyroscope-demo -p 4040:4040 grafana/pyroscope:latest
Using a local binary:
bash./pyroscope
Verify that Pyroscope is ready. Pyroscope listens on port
4040
.bashcurl localhost:4040/ready
Configure Pyroscope to scrape profiles.
By default, Pyroscope is configured to scrape itself. To collect more profiles, you must either instrument your application with an SDK or use the Grafana Agent.
To learn more about language integrations and the Pyroscope agent, refer to Pyroscope Agent.
Add a Pyroscope data source and query data
In a new terminal, run a local Grafana server using Docker:
bashdocker run --rm --name=grafana -p 3000:3000 -e "GF_FEATURE_TOGGLES_ENABLE=flameGraph" --network=pyroscope-demo grafana/grafana:main
In a browser, go to the Grafana server at http://localhost:3000/datasources.
Sign in using the default username
admin
and passwordadmin
.Use the following settings to configure a Pyroscope data source to query the local Pyroscope server:
Field Value Name Pyroscope URL http://pyroscope:4040/
To learn more about adding data sources, see Add a data source.
When you have completed the tasks in this getting started guide, you can query profiles in Grafana Explore and create dashboard panels using the newly configured Pyroscope data source. For more information on working with dashboards with Grafana, see Panels and visualizations in the Grafana documentation.
Was this page helpful?
Related resources from Grafana Labs
![Getting started with continuous profiling with Grafana Cloud Profiles](/media/webinar/cont-profiling-meta-2.png?w=200 200w, /media/webinar/cont-profiling-meta-2.png?w=400 400w)
![Continuous profiling with Grafana Pyroscope: developer experience, flame graphs, and more](/media/events/grafanacon/2023/meta-no-dates/GrafanaCON-2023-Session-Continuous-profiling.png?w=200 200w, /media/events/grafanacon/2023/meta-no-dates/GrafanaCON-2023-Session-Continuous-profiling.png?w=400 400w)
![Building scalable OSS observability with Mimir, Loki, Tempo, and Pyroscope](/media/events/obscon/2023/meta/obscon23-session-mi-10-Building-scalable-OSS-observability-with-Mimir,-Loki,-Tempo,-and-Pyroscope.png?w=200 200w, /media/events/obscon/2023/meta/obscon23-session-mi-10-Building-scalable-OSS-observability-with-Mimir,-Loki,-Tempo,-and-Pyroscope.png?w=400 400w)