Giter VIP home page Giter VIP logo

mqtt_blackbox_exporter's Introduction

MQTT Blackbox Exporter

Build Status Go Report Card Docker Pulls

Tests MQTT messaging roundtrips (publish/subscribe on same topic).

Definition of roundtrip:

  • start subscriber on $topic
  • start publisher on $topic
  • publish $messages on $topic
  • receive $message on $topic

Build

$ mkdir -p ${GOPATH}/src/github.com/inovex/
$ git clone https://github.com/inovex/mqtt_blackbox_exporter.git ${GOPATH}/src/github.com/inovex/mqtt_blackbox_exporter/
$ cd ${GOPATH}/src/github.com/inovex/mqtt_blackbox_exporter/
$ make

This will build the mqtt_blackbox_exporter for all target platforms and write them to the build/ directory.

Binaries are provided on Github, see https://github.com/inovex/mqtt_blackbox_exporter.

Install

Place the binary somewhere in a PATH directory and make it executable (chmod +x mqtt_blackbox_exporter).

Configure

See config.yaml.dist for a configuration example.

Run

Native:

$ ./mqtt_blackbox_exporter -config.file config.yaml

Using Docker:

docker run --rm -it -p 9214:9214 -v ${PWD}/:/data/ inovex/mqtt_blackbox_exporter:<VERSION> -config.file /data/config.yaml
$ curl -s http://127.0.0.1:9214/metrics
...
# HELP probe_mqtt_completed_total Number of completed probes.
# TYPE probe_mqtt_completed_total counter
probe_mqtt_completed_total{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL"} 64

...

# HELP probe_mqtt_duration_seconds Time taken to execute probe.
# TYPE probe_mqtt_duration_seconds histogram
probe_mqtt_duration_seconds_bucket{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL",le="0.005"} 0
probe_mqtt_duration_seconds_bucket{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL",le="0.01"} 0
probe_mqtt_duration_seconds_sum{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL"} 50.09346619300002
probe_mqtt_duration_seconds_count{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL"} 64
...

# HELP probe_mqtt_messages_published_total Number of published messages.
# TYPE probe_mqtt_messages_published_total counter
probe_mqtt_messages_published_total{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL"} 640
...

# HELP probe_mqtt_messages_received_total Number of received messages.
# TYPE probe_mqtt_messages_received_total counter
probe_mqtt_messages_received_total{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL"} 640
...

# HELP probe_mqtt_started_total Number of started probes.
# TYPE probe_mqtt_started_total counter
probe_mqtt_started_total{broker="ssl://mqtt.example.net:8883",name="mqtt broker SSL"} 64
...

Release

The release is done automatically by goreleaser. To release a new version, just set a git tag. Goreleaser run by Github Actions will create the binaries and upload them to the according Github release.

mqtt_blackbox_exporter's People

Contributors

arnisoph avatar invadersmustdie avatar hikhvar avatar frittentheke avatar allineer avatar gdhgdhgdh avatar pmundt avatar robinatherton 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.