GithubHelp home page GithubHelp logo

matrix-org / matrixmon Goto Github PK

View Code? Open in Web Editor NEW
10.0 39.0 3.0 32 KB

A small end-to-end prober and Prometheus stats exporter for a Matrix homeserver

License: Apache License 2.0

Perl 91.39% Dockerfile 8.61%
matrix prometheus monitoring bot

matrixmon's Introduction

matrixmon

A small end-to-end prober and Prometheus stats exporter for a Matrix homeserver.

Running

Make a copy of the configuration template:

cp mon.yaml.example mon.yaml

Edit mon.yaml with the correct details regarding your homeserver, monitor user, access token and room ID.

Optionally edit the port and other values, if needed.

By default, Matrixmon expects the config file to be found in the same path where it runs. A custom config file location (full path to file including file name) can be set with the environment variable MATRIXMON_CONFIG_PATH.

Using Docker

docker run -ti matrixdotorg/matrixmon -v $PWD/mon.yaml:/app/mon.yaml -p 9091:9091

Manually

On Debian/Ubuntu, example:

To build:

sudo apt-get install perl cpanminus build-essential libssl-dev zlib1g-dev
./install-deps.pl

To run:

perl mon.pl

Metrics

Prometheus metrics are by default exposed at http://localhost:9091/metrics.

License

Apache 2.0

matrixmon's People

Contributors

benbz avatar jaywink avatar leonerd avatar michaelkaye avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mikelb pa0ti

matrixmon's Issues

Emergency "Slow mode"

In normal operation the defaults are interval=30s, send_deadline=5s, recv_deadline=20s. This gives a good granularity on the graphs.

During high-stress scenarios, such as near-outage, it may be useful that the monitor can switch to a different mode of much higher interval and longer deadlines, so we get at least some visibility if the server is making progress just very slowly; trading off longer deadlines before giving up, with reduced granularity of time.

Transaction IDs start at zero and are incremented.

This has a possible failure mode if:

12:00 : matrixmon is started, sending trx_id 0 through (say 720)
18:00 : matrixmon is restarted, losing the local trx_id, causing it to start again at trx_id 0.

The next 6 hours of events will be accepted with a 200 OK by the server (because their transaction ID matches one that has already been accepted) but will not be received by the receiver, showing up as an outage.

When the restarted matrixmon reaches transactionID 721, it will start functioning again.

We should consider initalizing the transaction ID to a timestamp based value here:

https://github.com/matrix-org/matrixmon/blob/master/mon.pl#L152

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.