Read metrics from a Message Queue in Json format and expose them in a Prometheus compatible format

mq2prom

tests

Read metrics from a Message Queue in Json format and expose them in a Prometheus compatible format.

Currently only works for MQTT compatible MQs.

Installing

make build

builds the mq2prom binary which can be run directly. By default metrics are exposed on port 9641.

Testing

Make sure that a MQTT compatible MQ is running at the port specified in the config file config.yaml. Run this binary.

Submit a message of the form '[{"name": "simple_metric", "value": 10, "labels": {"label1": "value1"}}]' onto the MQ.

Now, check that the metric is showing up in the metrics:

curl localhost:9641/metrics | grep "simple_metric"

Why not Mqtt2prometheus?

Mqtt2prometheus is the inspiration for this project, but falls short on several fronts:

  1. Focused on Sensor devices.
  2. Works with data coming in from multiple topics - which is a counter-feature.
  3. Does not allow generic labelling of metrics.
  4. Does not support Histogram and Summary metric types.

License

Licensed under Apache License 2.0.

Owner
International Business Machines
International Business Machines
Similar Resources

A robust and easy to use MQTT rule engine

A robust and easy to use MQTT rule engine

⚙ MQTT COMMANDER A robust and easy to use MQTT rule engine Configure your MQTT Rules via easy to use YML Files Supports JSON encoded MQTT Messages Sup

Sep 21, 2022

A opinionated multi-tenant hyperscale Internet of Things platform to connect IoT devices fast and securely with minimal TCO

infinimesh IoT Platform infinimesh is a opinionated multi-tenant hyperscale Internet of Things platform to connect IoT devices fast and securely with

Feb 14, 2022

Exploring and comparing different IOT messaging protocols / transports.

IOT Messaging Protocols Blynk https://blynk.io/ A fully integrated suite of IoT software Device provisioning Sensor data visualization Remote control

Jan 2, 2022

IoT platform with things/user management and visualization, in Go with Docker using microservices

BARIOT IoT platform to Manage Users and their Things and visualize their data. Microservices services architecture build with Go and docker (compose).

Jun 22, 2022

lirc.go - a library to send and receive via lircd

LIRC Go client for Linux Infrared Remote Control (LIRC) package Usage package main import ( "github.com/chbmuc/lirc" "log" "time" ) func keyPo

Oct 24, 2022

Prometheus Common Data Exporter can parse JSON, XML, yaml or other format data from various sources (such as HTTP response message, local file, TCP response message and UDP response message) into Prometheus metric data.

Prometheus Common Data Exporter can parse JSON, XML, yaml or other format data from various sources (such as HTTP response message, local file, TCP response message and UDP response message) into Prometheus metric data.

Prometheus Common Data Exporter Prometheus Common Data Exporter 用于将多种来源(如http响应报文、本地文件、TCP响应报文、UDP响应报文)的Json、xml、yaml或其它格式的数据,解析为Prometheus metric数据。

May 18, 2022

This library provides a metrics package which can be used to instrument code, expose application metrics, and profile runtime performance in a flexible manner.

This library provides a metrics package which can be used to instrument code, expose application metrics, and profile runtime performance in a flexible manner.

Jan 18, 2022

A tool to run queries in defined frequency and expose the count as prometheus metrics. Supports MongoDB and SQL

A tool to run queries in defined frequency and expose the count as prometheus metrics. Supports MongoDB and SQL

query2metric A tool to run db queries in defined frequency and expose the count as prometheus metrics. Why ? Product metrics play an important role in

Jul 1, 2022

A tool to run queries in defined frequency and expose the count as prometheus metrics.

A tool to run queries in defined frequency and expose the count as prometheus metrics.

A tool to run queries in defined frequency and expose the count as prometheus metrics. Supports MongoDB and SQL

Jul 1, 2022

Capture sensor data from Xiaomi thermometers (via BLE) and expose it as prometheus metrics

sensor-probe Sensor Probe is a small utility that reads advertisement data sent by the Xiaomi Thermometer LYWSD03MMC via Bluetooth LE and expose them

Oct 13, 2022

A Multi Consumer per Message Queue with persistence and Queue Stages.

 A Multi Consumer per Message Queue with persistence and Queue Stages.

CrimsonQ A Multi Consumer per Message Queue with persistence and Queue Stages. Under Active Development Crimson Queue allows you to have multiple cons

Jul 30, 2022

Priority queue with message-group based partitioning and equal attention guarantee for each message group based on Redis

redis-ordered-queue-go Priority queue with message-group based partitioning and equal attention guarantee for each message group based on Redis What i

Oct 21, 2022

Machinery is an asynchronous task queue/job queue based on distributed message passing.

Machinery is an asynchronous task queue/job queue based on distributed message passing.

Machinery Machinery is an asynchronous task queue/job queue based on distributed message passing. V2 Experiment First Steps Configuration Lock Broker

Jan 7, 2023

Machinery is an asynchronous task queue/job queue based on distributed message passing.

Machinery is an asynchronous task queue/job queue based on distributed message passing.

Machinery Machinery is an asynchronous task queue/job queue based on distributed message passing. V2 Experiment First Steps Configuration Lock Broker

Dec 24, 2022

Alertmanager go message broker - A simple message broker made to integrate with alertmanager/prometheus

Alertmanager message broker Prerequisites Go 1.16+ Sqllite driver About: The alertmanager message broker is a project made to meet some of my needs to

Dec 27, 2021

The metrics-agent collects allocation metrics from a Kubernetes cluster system and sends the metrics to cloudability

metrics-agent The metrics-agent collects allocation metrics from a Kubernetes cluster system and sends the metrics to cloudability to help you gain vi

Jan 14, 2022

Sensu-go-postgres-metrics - The sensu-go-postgres-metrics is a sensu check that collects PostgreSQL metrics

sensu-go-postgres-metrics Table of Contents Overview Known issues Usage examples

Jan 12, 2022

Run Jobs on a schedule, supports fixed interval, timely, and cron-expression timers; Instrument your processes and expose metrics for each job.

A simple process manager that allows you to specify a Schedule that execute a Job based on a Timer. Schedule manage the state of this job allowing you to start/stop/restart in concurrent safe way. Schedule also instrument this Job and gather metrics and optionally expose them via uber-go/tally scope.

Dec 8, 2022

Prometheus metrics for Go database/sql via VictoriaMetrics/metrics

sqlmetrics Prometheus metrics for Go database/sql via VictoriaMetrics/metrics Features Simple API. Easy to integrate. Install Go version 1.16+ go get

Dec 16, 2022
Comments
  • Cleanup the Docker Image Github Action

    Cleanup the Docker Image Github Action

    1. Use major versions of the currently used actions.
    2. Include generation of "latest" Docker image tags.
    3. Generate Docker image tags from releases (git tags)
  • Panics on negative value for Counter

    Panics on negative value for Counter

    It is possible that a negative value is received in the message for the counter - due to upstream mistakes. Currently, the system panics.

    Add a check. Simplest option is to drop the message with a warning printed to the logs.

Generic Prometheus ⟷ MQTT Bridge

Promqtt: Prometheus ⟷ MQTT Bridge Promqtt makes Prometheus MQTT capable in a truly generic way. It has no assumptions on message payloads or topic lay

Sep 18, 2022
A project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol formatA project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol format

Intro This project outputs Bluetooth Low Energy (BLE) sensors data in InfluxDB line protocol format. It integrates nicely with the Telegraf execd inpu

Apr 15, 2022
A small program that serves BM**80 sensor info as JSON

ThermoServer This program was written for a Raspberry Pi using Pimoroni's BMP280 breakout. Chances are it'll also work with the BME280 and BME680, but

Jan 12, 2022
A realtime teenage driver behaviour monitoring system integrating OBII sensor, smart watch, smartphone, and Raspberry Pi, which examines over time novice teenage driving performance and risk

DriverMonitor A realtime teenage driver behaviour monitoring system integrating OBII sensor, smart watch, smartphone, and Raspberry Pi, which examines

Nov 27, 2021
Golang framework for robotics, drones, and the Internet of Things (IoT)
Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of

Dec 29, 2022
Industrial IoT Messaging and Device Management Platform
Industrial IoT Messaging and Device Management Platform

Mainflux Mainflux is modern, scalable, secure, open-source, and patent-free IoT cloud platform written in Go. It accepts user and thing (sensor, actua

Dec 31, 2022
Secure and Interoperable Internet of Things

plgd Cloud Internet of Things (IoT) technologies have evolved rapidly in recent years and continue to change how we interact with our surroundings. Fo

Dec 26, 2022
Securely access remote devices and servers
Securely access remote devices and servers

Deviceplane is an open source device management tool for embedded systems and edge computing. It solves various infrastructure problems related to rem

Dec 15, 2022
Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)
Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of Things.

Jan 8, 2023
Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors
Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors

pumpkin-pi ?? Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors to simulate it "watching" you. Inspired by Ryde

Sep 13, 2022