Giter Club home page Giter Club logo

matrix-monitor-bot's Introduction

matrix-monitor-bot

#monitorbot:t2bot.io TravisCI badge

A bot to measure latency between homeservers, as perceived by users.

Installing

Assuming Go 1.9 is already installed on your PATH (also possible with vgo):

# Get it
go get github.com/silkeh/matrix-monitor-bot/cmd/...

# Configure it (edit monitor-bot.yaml to meet your needs)
cp config.sample.yaml monitor-bot.yaml

# Run it
bin/monitor_bot

Installing in Alpine Linux

The steps are almost the same as above. The only difference is that gb build will not work, so instead use the following lines:

go build -o bin/monitor_bot ./src/github.com/silkeh/matrix-monitor-bot/cmd/monitor_bot/

Docker

/path/to/matrix-monitor-bot should always be pointed to a folder that has your monitor-bot.yaml file in it. If the config file does not exist, one will be created for you (and promptly not work because it doesn't have a valid config). A folder named logs will also be created here (assuming you use the default configuration).

From Docker Hub:

docker run -p 8080:8080 -v /path/to/matrix-monitor-bot:/data silkeh/matrix-monitor-bot

Build the image yourself:

git clone https://github.com/silkeh/matrix-monitor-bot
cd matrix-monitor-bot
docker build -t matrix-monitor-bot .
docker run -p 8080:8080 -v /path/to/matrix-monitor-bot:/data matrix-monitor-bot

Prometheus Metrics

If metrics are enabled in your config, matrix-monitor-bot will serve up metrics for scraping by Prometheus. Every metric that is exported is a Histogram metric. The following metrics are exported:

  • monbot_ping_send_delay_seconds - Number of seconds for the origin to send a ping to their homeserver
  • monbot_ping_receive_delay_seconds - Number of seconds for a bot to receive a ping
  • monbot_ping_time_seconds - Total number of seconds for a ping to go through (from the remote bot to the receiver)

Architecture

TODO: This section

  • How the bot measures things
  • What the Prometheus metrics are
  • Why the bot uses m.room.message and not a custom event
  • Why the bot uses messages for pongs instead of read receipts
  • Why the display name gets overwritten and how it is used
  • Why someone should run this on their server

matrix-monitor-bot's People

Contributors

turt2live avatar silkeh avatar supersandro2000 avatar

Watchers

 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.