A Discord bot designed to monitor the health of other Discord bots by sending test messages and verifying their responses. If a bot fails to respond correctly within the configured threshold, it triggers an alert through AWS SNS.
- Monitors multiple Discord bots through configured test messages
- Groups bots with the same test message to reduce channel noise
- Expects specific responses from each monitored bot
- Configurable failure thresholds for alerts
- Configurable check intervals
- AWS SNS integration for failure notifications
- Supports monitoring in specific Discord servers and channels
- Clone the repository
- Install dependencies:
npm install
- Create a configuration file
config.jsonwith the following structure:{ "botToken": "YOUR_BOT_TOKEN", "serverId": "YOUR_SERVER_ID", "channelId": "YOUR_CHANNEL_ID", "aws": { "region": "YOUR_AWS_REGION", "snsTopicArn": "YOUR_SNS_TOPIC_ARN", "credentials": { "accessKeyId": "YOUR_AWS_ACCESS_KEY_ID", "secretAccessKey": "YOUR_AWS_SECRET_ACCESS_KEY" } }, "monitoredBots": [ { "id": "BOT_ID", "testMessage": "!ping", "expectedResponse": "pong", "failureThreshold": 3 } ], "checkIntervalMs": 60000 }
npm testnpm startbotToken: Your Discord bot tokenserverId: Discord server ID where monitoring will take placechannelId: Channel ID where messages will be sentaws.region: AWS region for SNSaws.snsTopicArn: ARN of the SNS topic for alertsaws.credentials: AWS credentials for SNS accessaccessKeyId: AWS access key IDsecretAccessKey: AWS secret access key
monitoredBots: Array of bots to monitorid: Discord ID of the bot to monitortestMessage: Message to send to the botexpectedResponse: Expected response from the botfailureThreshold: Number of failures before triggering an alert
checkIntervalMs: Interval in milliseconds between health checks (default: 60000)