Skip to content

metskem/dhmb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dhmb - Dirty Harry Monitor Bot

Can monitor http resources at specified intervals, and optionally send Telegram updates if a threshold is exceeded.
Can partly be operated using Telegram.
Provides a prometheus exporter for response time metrics.

Resources

Supported Bot Commands

The following commands are supported (and can/should be configured with BotFather (Edit Commands) for convenience):

status - show the current status of all monitors
chart - <monname> - create a response time chart for monname
members - show active chats (users and groups)
usernames - show usernames (names and their role)
debug - [on|off] - dynamically turn Telegram Bot debugging on/off
restart - restart the bot to pick up DB updates
usernameadd - <username> [reader|admin] - add a username
usernamedelete - <username> - delete a username
silence - <monname> - silence a monitor (keep monitoring, but no alerts)
unsilence - <monname> - unsilence a monitor (revert the silence)

Configuration

All configuration is done with environment variables. The following envvars are available:

  • BOT_TOKEN - the Telegram bot token, should be in the format <number>:<token>
  • MAX_ROWS_RESPTIME - The oldest rows in the resptime table are deleted each 10 minutes. This envvar defines how many rows remain per monitor. Default = 1000
  • DEBUG - true/false, whether the bot debug should be on or off. Default is false
  • PROMETHEUS_EXPORTER_PORT - The port to use for exposing the prometheus exporter (default is 9094). The metric dhmb_resptime, with labels name and status is exposed.

About

Dirty Harry Monitor Bot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published