Skip to content

A self-hosted .NET based service application to inform the user via Telegram API about status changes of process or running services on a home server.

License

Notifications You must be signed in to change notification settings

rolandcsosz/Server-Tracker-Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Monitoring Telegram Bot

A self-hosted .NET based service application to inform the user via Telegram API about status changes of process or running services on a home server.

Features

These features are available via Telegram messages:

  • List all commands available (Help)
  • Start monitoring (Start)
  • Adding a new service to the list via Telegram (Add [New service])
  • Remove service from the list via Telegram (Remove [Old service])
  • List all tracked processes and statuses (List)
  • Set checking interval in seconds (Set timer [seconds])
  • Stop monitoring (Stop)

Deploying

Installation

  • Clone this git repository.
git clone https://github.com/rolandcsosz/Server-Tracker-Telegram-Bot.git
  • Change Directory
cd Server-Tracker-Telegram-Bot

Configuration

Add values to Environment Variables by adding a EnvironmentVariables class to the project like this:

class EnvironmentVariables
{
        public static String TELEGRAM_TOKEN = "";

        public static String CHAT_ID = "";

        public static String LOG_FILE = "log.txt";

        public static String SERVICE_LIST_FILE = "services.json";
}

Configuration Values

  • TELEGRAM_TOKEN - Get it by contacting to BotFather
  • CHAT_ID - Get it by contacting to RawDataBot
  • LOG_FILE - This will be the path for the logging file.
  • SERVICE_LIST_FILE - This will be the path for the file where process names will be stored.

Deploy

  • Build the project.
dotnet build
  • Run the solution.
dotnet run

Credits

Copyright & License

About

A self-hosted .NET based service application to inform the user via Telegram API about status changes of process or running services on a home server.

Topics

Resources

License

Stars

Watchers

Forks

Languages