Giter Club home page Giter Club logo

mqtt-exporter's Introduction

mqtt-exporter

Publishes Prometheus metrics for last received message on a given MQTT topic.

Usage

Docker image is built and published to radhus/mqtt-exporter on Docker Hub.

docker run -p 8080:8080 radhus/mqtt-exporter:latest -url mqtt-server.domain:1883 -topic-pattern 'topic/+/pattern'

Then scrape http://localhost:8080/metrics to get:

# HELP mqtt_last_message MQTT topic time
# TYPE mqtt_last_message gauge
mqtt_last_message{topic="topic/11/pattern"} 1.5825474109081864e+09
mqtt_last_message{topic="topic/12/pattern"} 1.5825474109117537e+09

Simple Prometheus alert may look like:

- alert: NoIOTStateUpdate
  expr: (time() - mqtt_last_message{topic="topic/11/pattern"}) / 60 > 5
  for: 5m
  annotations:
    description: "IOT state has not updated in {{ $value }} minutes!"
    summary: "IOT state stopped updating"

mqtt-exporter's People

Contributors

radhus avatar renovate-bot avatar

Stargazers

Hussein Marah avatar

Watchers

James Cloos avatar  avatar  avatar

mqtt-exporter's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • golang 1.15
gomod
go.mod
  • go 1.13
  • github.com/eclipse/paho.mqtt.golang v1.2.0
  • github.com/prometheus/client_golang v1.8.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.