a lightweight Prometheus metrics aggregation service
  • Rust 77.3%
  • Nix 14.5%
  • Dockerfile 8.2%
Find a file
2026-02-23 15:10:13 -06:00
.forgejo/actions make it compile 2026-02-23 15:10:13 -06:00
src make it compile 2026-02-23 15:10:13 -06:00
.dockerignore make it compile 2026-02-23 15:10:13 -06:00
.gitignore Initial commit 2026-02-22 21:44:33 -06:00
Cargo.lock make it compile 2026-02-23 15:10:13 -06:00
Cargo.toml make it compile 2026-02-23 15:10:13 -06:00
Dockerfile make it compile 2026-02-23 15:10:13 -06:00
flake.lock make it compile 2026-02-23 15:10:13 -06:00
flake.nix make it compile 2026-02-23 15:10:13 -06:00
LICENSE.md Initial commit 2026-02-22 21:44:33 -06:00
README.md add The Funny™️ 2026-02-22 21:46:06 -06:00

birdcage

Prometheus was punished by the gods for giving the gift of knowledge to man. He was cast into the bowels of the earth and pecked by birds.

- Oracle Turret, Portal 2

birdcage is a lightweight Prometheus metrics aggregation service. If you point your Prometheus or Grafana instance at birdcage, it will forward every scrape request to a list of Prometheus metrics endpoints and return them as a single response.

This is primarily intended for multiple services that run within the same container / behind a proxy with a lighter memory footprint than using a full Prometheus instance.

flowchart LR
    PROM[(Prometheus)]
    subgraph CNT[Container]
        BIRD[/birdcage/]
        SVC1[Service 1]
        SVC2[Service 2]
        SVC3[Service 3]
        SVCN[Service N]
    end

    PROM -.->|"/metrics\nScrape Request"| BIRD -.->|"/metrics\nScrape Request"| SVC1 & SVC2 & SVC3 & SVCN

Usage

First, create a birdcage.toml file with the metrics endpoints you want to aggregate:

sources = [
    "http://localhost:9090/metrics",
    "http://localhost:9091/metrics",
    "http://localhost:9092/metrics"
]

Then, run the application (using cargo run or a prebuilt binary), then set Prometheus to scrape the exposed port on birdcage (defaults to port 8000).

License

This program is licensed under the GNU General Public License, Version 3.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.