Monitoring Cells with Prometheus & Grafana

Created on 2022/10/14, cells, configuration, dataviz, enterprise edition, grafana, metrics, prometheus

This tutorial introduces how to set up and run Prometheus and Grafana to gather and display metrics for your Pydio Cells instance.

Please note that this feature is only available in the Enterprise Distribution.

Enabling metrics

The backend code is instrumented with gauges and counters. We use an interface for various metrics systems (uber-go/tally), using a no-op implementation by default.

Using the --enable_metrics flag upon startup registers a Prometheus compatible collector instead of the no-op implementation. Same goal is achieved by using the CELLS_ENABLE_METRICS environment variable, typically in your systemd file you can add:


It basically achieves three things:

  • Exposes metrics as HTTP on a random port under the /metrics endpoint for each Cells process (only one per process, not per service)
  • Gathers info about these exposed endpoints for all processes via the registry and lists all these endpoints as Prometheus compatible targets.
  • Dynamically updates a JSON file under <cells root dir>/services/pydio.grpc.metrics/prom_clients.json. This file is watched by Prometheus so that the endpoints can be dynamically discovered (see below).

In a distributed environment (that is if you have split your microservices on various nodes), you must install and run Prometheus on the same node where the pydio.gateway.metrics service is running.


You can download Prometheus and Grafana binaries for your platform. Both websites also provide a complete documentation and some best practices to install these tools.

Another (and easier) way to go is to directly use the Docker images that can be found on Docker Hub.

Configure Prometheus

Edit prometheus.yml to add a new job in the scrape_config section, using the embedded file_sd_configs Prometheus discovery mechanism. This tool allows Prometheus to watch for a specific JSON (or YAML) file and thus know from where to load scraping targets.

YAML section should look like (the first job is set by default by Prometheus to monitor itself):

# A scrape configuration containing exactly one endpoint to scrape:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'
    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.
    - targets: ['localhost:9090']

  - job_name: 'cells'
      - files:
        - {PATH_TO_CELLS_CONFIG_FOLDER}/services/pydio.gateway.metrics/prom_clients.json

You can configure Prometheus to start on the port you wish, default is 9090.

With Cells ED running, you can check that all processes are correctly detected by visiting http://localhost:9090/targets.


First Start Grafana. By default, it is accessible at port 3000. You can define your own specific port using the GF_SERVER_HTTP_PORT environnement variable.

Choose an admin/password and perform basic install steps.

Add a Prometheus DataSource in Grafana pointing to the Prometheus instance defined in the previous step.

The Grafana Dashboard

A simple dashboard has been published on the Grafana website.
It can be simply imported with the Grafana UI by following steps:

  • In the left menu, select Dashboard > Import
  • In the " Dashboard" text field, enter the dashboard ID 9817

The new dashboard should be available and show something like the image below.

Advanced Dashboard

For power users who want to gather and display more info about their server, we have also prepared a dashboard with additional gauges.

This section describes the required configuration to display them in a more complete Grafana dashboard.


  • Download and install the Node Exporter application,
  • Import this Dashboard (ID: 15153) in your Grafana instance.

System metrics

Append this configuration to your prometheus.yml to enable prometheus to collect and scrape the metrics.

  - job_name: 'node_exporter'
    - targets: ['localhost:9100']

To run the node_exporter, it is advised to create a service file and use systemd.

Here is a simple template:

Description=Node Exporter