Discord Uptime is a Discord bot that allows you to monitor the uptime of services using ICMP ping and http requests. There are also commands avaliable to make manual requests. Built using discord.py 1.6.x, ping3 and aiohttp
Requires Python 3.6+
Install dependencies:
pip install -r requirements.txt
Bot setup (Rename config.example.json and edit the default values):
token
- Discord bot tokenprefix
- Discord bot prefixactivity_type
- Activity type for bot status (must be one ofplaying, streaming, listening, watching
)activity_name
- Text for bot statusdisable_help
- If true, the default help command will be disabledhide_ips
- If true, any IP addresses in notifications or the status command will be hiddennotification_channel
- Channel ID where down/up notifications will be sentrole_to_mention
- Role ID which will be tagged in down/up notificationssecs_between_ping
- How many seconds between each uptime checktimeout
- How many seconds before a ping or HTTP request should timeout
No privileged intents are currently needed to run the bot.
Servers should be setup similar to the examples already in server.json
:
- There are two supported types:
http
andping
[
{
"name": "Google",
"type": "http",
"address": "google.com"
},
{
"name": "Cloudflare",
"type": "ping",
"address": "1.1.1.1"
}
]
Default Prefix: >
ping <address> [pings]
- Pings an address once, or for the amount specified via pings and returns the delay in mshttp <address>
- Performs a HTTP request to the specified address and returns the response codestatus
- Displays the status of all servers setup inservers.json
Status Command
Uptime & Downtime Notifications
Hide IP addresses