Skip to main content

📊 Package Metrics

DAppNode supports an integrated metrics framework based on Prometheus and Grafana, powered by the DMS package.

This framework enables package developers to expose useful metrics and provide prebuilt dashboards to monitor their services.

tip

🧠 What is DMS? The DMS (DAppNode Monitoring Stack) package collects metrics using Prometheus and visualizes them through Grafana. It automatically discovers and injects metrics configurations from installed packages.

⚙️ How It Works

To use the metrics framework in your package:

  1. The DMS package must be installed by the user.

  2. Your package must include:

    • One or more Grafana dashboard files
    • A Prometheus targets file

🧱 File Structure & Naming Convention

These files must follow specific naming conventions and formats:

  • Grafana dashboard files:
    • Name: Must follow this naming pattern /.*grafana-dashboard.json$/ and be placed in the root directory of your package (or within the variant directory).
    • Max size: 10MB
    • Multiple files: You can include multiple dashboard files, and they will be merged into a single dashboard in Grafana.
  • Prometheus targets file:
    • Name: Must follow this naming pattern /.*prometheus-targets.(json|yaml|yml)$/ and be placed in the root directory of your package (or within the variant directory).
    • Max size: 1MB
    • Only one file: You can only include one targets file.
tip

💡 Need the DNS name of a service to configure Prometheus targets? Refer to the Package DNS documentation to learn how to reference services within your Prometheus targets.

📦 Single vs Multi-Variant Package Configuration

Single Variant For packages with a single variant:

  • Place 1 Prometheus targets file in the root of the package.
  • Add as many Grafana dashboard files as needed in the same root directory.

Multi-Variant For multi-variant packages:

  • Place Grafana dashboard files in the root of the package, as they are usually shared. See example.

    tip

    📁 Example: geth-grafana-dashboard.json

  • Place Prometheus targets files in each variant directory, as the data source may differ per variant. See example.

    tip

    📁 Example: mainnet/prometheus-targets.json

📊 Default Dashboards

The DMS package includes default dashboards and Prometheus targets for cadvisor and node_exporter. These dashboards provide metrics about the host and Docker containers running on the host.