Grafana Phlare operator and user guideGet started with Grafana Phlare

Get started with Grafana Phlare

Choose one of the following options to get started with Grafana Phlare:

  • The written tutorial below provides a series of imperative commands to start a single Phlare process, or monolith, which is designed for users getting started with the project.

  • The following video tutorial uses docker-compose to declaratively deploy Phlare and Grafana.

For more information on the different ways to deploy Phlare, see Grafana Phlare deployment modes.

Before you begin

Verify that you have installed Docker.

Download and configure Phlare

  1. Download Grafana Phlare.

    You can use Docker or download a binary to install Phlare.

    • To install with Docker, run the following command:

      docker pull grafana/phlare: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:

      curl -fLo phlare https://github.com/grafana/phlare/releases/latest/download/phlare-linux-amd64
      chmod +x phlare
      
  2. Start Phlare.

    To run Grafana Phlare as a monolith and with local filesystem storage, you can create your own file, or use a demo configuration file.

    • To create your own file, write the following YAML configuration to a file called demo.yaml:

      # Do not use this configuration in production.
      # It is for demonstration purposes only.
      scrape_configs:
        - job_name: "default"
          scrape_interval: "15s"
          static_configs:
            - targets: ["127.0.0.1:4100"]
      
    • To use a demo file, download our demo configuration:

      curl -fLo demo.yaml https://raw.githubusercontent.com/grafana/phlare/main/cmd/phlare/phlare.yaml
      
  3. Run Phlare.

    In a terminal, run one of the following commands:

    • Using Docker:

      docker network create phlare-demo
      docker run --rm --name phlare --network=phlare-demo -p 4100:4100 --volume "$(pwd)"/demo.yaml:/etc/phlare/demo.yaml grafana/phlare:latest --config.file=/etc/phlare/demo.yaml
      
    • Using a local binary:

      ./phlare --config.file=./demo.yaml
      
  4. Verify that Phlare is ready. Grafana Phlare listens on port 4100.

    curl localhost:4100/ready
    
  5. Configure Phlare to scrape profiles.

    By default, Grafana Phlare is configured to scrape itself. To scrape more profiles, you must configure the scrape_configs section of the configuration file.

    To learn more about language integrations and the Phlare agent, refer to Grafana Phlare Agent.

Add a Phlare data source and query data

  1. In a new terminal, run a local Grafana server using Docker:

    docker run --rm --name=grafana -p 3000:3000 -e "GF_FEATURE_TOGGLES_ENABLE=flameGraph" --network=phlare-demo grafana/grafana:main
    
  2. In a browser, go to the Grafana server at http://localhost:3000/datasources.

  3. Sign in using the default username admin and password admin.

  4. Use the following settings to configure a Phlare data source to query the local Grafana Phlare server:

    FieldValue
    NamePhlare
    URLhttp://phlare:4100/

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 Grafana Phlare data source. For more information on working with dashboards with Grafana, see Panels and visualizations in the Grafana documentation.