Categorygithub.com/silkeh/matrix_irc_ping_exporter
repository
0.0.0-20240728153301-92b5c01c03d3
Repository: https://github.com/silkeh/matrix_irc_ping_exporter.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

Matrix/IRC ping bot and Prometheus exporter

This little project rolls three things into one:

  • A Matrix bot that responds to ping messages.
  • An IRC bot that responds to ping messages.
  • A prometheus exporter that sends a message from the Matrix bot to the IRC bot, and measures the latency.

Usage

Matrix

The Matrix bot responds to the following command:

!ping [message]

The response is human-readable, with the metadata set in the message. This command mirrors the functionality of maubot/echo.

IRC

The IRC bot responds to ping commands of the following format:

ping [id] [unix time in ns]

The response is of the format:

pong <id> <unix time in ns> [delay in ns] [human-readable delay]

The default id is unixnano.

Prometheus

Installation

Download and build the program using:

go get -u github.com/silkeh/matrix_irc_ping_exporter/cmd/matrix_irc/ping_exporter

See config.dist.yaml for an example configuration.