matrix-org / Matrix-NEB

N E Bot: Generic bot for Matrix with plugin support
Apache License 2.0
49 stars 31 forks source link

Prometheus #13

Closed negzi closed 8 years ago

negzi commented 8 years ago

This plugin makes it possible to redirect alert messages coming from prometheus to different rooms it also queues messages when the server is down and sends them when the server is up again.

kegsay commented 8 years ago

This looks really cool, thanks! Few small comments / queries but this is looking good.

It's worth noting that currently this plugin will accept requests from anyone, whether or not they are actually Prometheus. At worst, this could be a potential spam vector. It might be nice to add in some form of shared secret (as a query parameter) similar to the Jenkins plugin: https://github.com/matrix-org/Matrix-NEB/blob/master/plugins/jenkins.py#L198 - It's a little bit fiddly because you need to store the token somewhere on startup. I don't really mind too much about this, so don't feel like you have to do this in order for this PR to land. I'm more interested in the line comments I've left.

kegsay commented 8 years ago

LGTM, thanks!