Server Monitor Bot for Linux based environment
This is a tool I developed to keep an eye on my server when I might not have access to a PC.
I have the program runing on the server, and it is linked to a bot I have generated by the auth token.. Most commands available in a linux shell can be run through the bot, except for some commands like cd which cannot be run by the subprocess method. run wit this bot. Just to be safe you can configure the list of commands that can be run from the bot.
How to use this?
Clone this github repo
git clone https://github.com/krishnanunnir/server_monitor_bot git && cd server_monitor_bot
Create a virtual environment
mkdir .env && python3 -m venv .env/smb
Activate the virtual environment
Now we need to install all requirements
cd bin && python run_once.py
Generate a bot in telegram and add the token in properties.py for token_val.
Configure other values in the properties.py for curr_dir, logs and permitted_commands.
We are now good to go and can start our server by running
- Grabbing screenshots of the users device.
- Scheduling messages for an interval