It helps to know what your remote resources are unavailable
- Get project:
$ git clone https://github.com/mperov/telegramInformant.git
$ cd telegramInformant/-
- Change file
resources.jsonthat contains all remote hosts which will being checked; - Create Telegram bot;
- Add token of your Telegram bot in
informant.pyby changing variable TOKEN and add recipient by modifiying GROUP_ID.
- Change file
- Build and run container:
$ docker-compose build
$ docker-compose up -dIf it's all right you will receive greetings message from bot.
At first I recommend to create special Python virtual enviroment by
$ sudo apt-get install python3-venv -y
$ python3 -m venv telegramInformant
$ source telegramInformant/bin/activateNext install some Python modules - pip3 install -r requirements or python3 -m pip install -r requirements
If you don't have pip3 then you may install it how described here
The first change file resources.json that contains all remote hosts which will being checked.
The second add token of your Telegram bot in informant.py by changing variable TOKEN and add recipient by modifiying GROUP_ID.
Finally
$ source telegramInformant/bin/activate
$ ./informant.py