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.
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)
- Clone this git repository.
git clone https://github.com/rolandcsosz/Server-Tracker-Telegram-Bot.git
- Change Directory
cd Server-Tracker-Telegram-Bot
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";
}
TELEGRAM_TOKEN
- Get it by contacting to BotFatherCHAT_ID
- Get it by contacting to RawDataBotLOG_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.
- Build the project.
dotnet build
- Run the solution.
dotnet run
- Khalid for creating ConsoleTables
-
Copyright (©) 2022 by Csősz Roland
-
Licensed under the terms of the GNU GENERAL PUBLIC LICENSE Version 2, June 1991