Git Product home page Git Product logo

kannel_exporter's Introduction

Kannel Exporter

GitHub Actions status

Kannel exporter for Prometheus. Exposes metrics collected from the kannel status page.

Works with Kannel 1.4.4 or greater.

โš ๏ธ Consider disabling smsc metrics collection by using the --filter-smscs flag or by dropping metrics on Prometheus server. On big setups, high cardinality metrics will be produced.

Usage

kannel_exporter.py [-h] [--target TARGET] [--port PORT]
                   [--filter-smscs] [--collect-wdp]
                   [--collect-box-uptime] [--collect-smsc-uptime]
                   [--box-connection-types BOX_CONNECTIONS [BOX_CONNECTIONS ...]]
                   [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v]
                   [--password PASSWORD | --password-file PASSWORD_FILE]

Arguments

  -h, --help             show this help message and exit
  --target TARGET        Target kannel server, PROTO:HOST:PORT
                         (default http://127.0.0.1:13000)
  --port PORT            Exporter port. (default 9390)
  --filter-smscs         Filter out SMSC metrics
  --collect-wdp          Collect WDP metrics
  --collect-box-uptime   Collect boxes uptime metrics
  --collect-smsc-uptime  Collect SMSCs uptime metrics
  --box-connection-types List of box connection types. (default wapbox, smsbox)
  --log-level LEVEL      Define the logging level
  -v, --version          Display version information and exit
  --password PASSWORD    Password of the kannel status page
  --password-file FILE   File contains the kannel status password

Environment Variables

Instead of command line arguments, values can be passed using environment variables.

--target    KANNEL_HOST
--password  KANNEL_STATUS_PASSWORD
--port      KANNEL_EXPORTER_PORT

Install

Collector is written in Python3. It is not compatible with Python2.

git clone https://github.com/apostvav/kannel_exporter.git
cd kannel_exporter
pip install -r requirements.txt

Docker

Run exporter using docker.

docker pull apostvav/kannel_exporter
docker run -d -p 9390:9390 apostvav/kannel_exporter

Run as a service

If you're on a systemd distro, create file /etc/systemd/system/kannel_exporter.service with content:

[Unit]
Description=Kannel Exporter
Wants=network-online.target
After=network-online.target

[Service]
User=<USER>
Group=<GROUP>
ExecStart=/path/to/kannel_exporter.py --password-file /path/to/secret

[Install]
WantedBy=multi-user.target

and then run the commands:

systemctl daemon-reload
systemctl start kannel_exporter.service
systemctl enable kannel_exporter.service

Contribute

Any contribution is welcome. Feel free to open issues and pull requests.

For any scraping issues you may have, please open an issue and attach the status xml file.
Don't forget to strip any information that should not be shared.

kannel_exporter's People

Contributors

apostvav avatar arpuplus avatar cytram avatar neuroxdnb avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.