DAHDI statistics prometheus exporter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Harald Welte 3198b7d802 initial checkin 1 month ago
COPYING initial checkin 1 month ago
README.md initial checkin 1 month ago
dahdi2prometheus.go initial checkin 1 month ago
go.mod initial checkin 1 month ago

README.md

dahid2prometheus - a prometheus exporter for DAHDI

This is a small project in the go programming language, obtaining DAHDI statistic via the DAHDI_SPANSTAT ioctl() and exposing the data in prometheus exporter syntax over HTTP for prometheus to collect/scrape them.

It's almost my first go project, and I had the basics put together in about 30mins. Your mileage may vary!

Usage

Usage of dahdi2prometheus:
  -http string
        local HTTP listen host:port (default ":2113")

So you simply run the dahdi2prometheus somewhere and

  • tell it on which HTTP port to listen for prometheus to scrape
  • configure prometheus to actually scrape with a section as stated below
scrape_configs:
  - job_name: dahdi
    static_configs:
      - targets: ['hostname:2113']

Grafana

There's a sample grafana dashboard

sample grafana dashboard

Credits

All the real workhorse code behind this project is in the following upstream libraries I'm using:

This project is just gluing together the above two libraries.

License

I'm usually much more in favor of copyleft licenses, but given the two libraries I use are MIT and Apache 2.0, I decided to go for a permissive license in this project, too. So the code is released under Apache 2.0, see the COPYING file for details.