Skip to content

fiasuz/zmmr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Site Monitor Bot

A Telegram bot that monitors your websites and servers. Get notified when a site goes down and receive daily status reports.

Features

  • Monitor multiple websites
  • Automatic checks every 5 minutes
  • Instant alerts when a site goes down or comes back up
  • Daily status reports at your preferred time
  • Response time tracking

Tech Stack

  • NestJS
  • Telegraf (Telegram Bot API)
  • TypeORM + SQLite
  • Node.js 18+

Setup

1. Get a Telegram Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot command
  3. Follow the instructions to create your bot
  4. Copy the token

2. Configure Environment

Create a .env file in the project root:

BOT_TOKEN=your_telegram_bot_token_here

3. Install Dependencies

npm install

4. Run the Bot

Development:

npm run start:dev

Production:

npm run build
npm start

Bot Commands

Command Description
/start Start the bot
/add <url> Add a site to monitor
/remove <id> Remove a site
/list List all monitored sites
/status Show current status of all sites
/check Check all sites now
/settime <HH:MM> Set daily report time
/help Show help

Usage Example

/add google.com
/add my-server.com
/settime 09:00
/status

Deploy to Railway

  1. Push your code to GitHub
  2. Go to railway.app
  3. Create a new project from GitHub repo
  4. Add environment variable: BOT_TOKEN
  5. Deploy

Live demo: https://web-production-ca996.up.railway.app

Project Structure

src/
  app.module.ts        # Main module
  main.ts              # Entry point
  bot/                 # Telegram bot handlers
  monitor/             # Site checking logic
  sites/               # Site entity and service
  users/               # User entity and service

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published