Ensure correct display of information in the bot messages depending on
which provider (IP address) has stopped working or has resumed operation.
Important:
All necessary fields are already created and available on the website.
The site runs on CMS Drupal.
All information for bot messages is taken from the website.
The bot is developed using PHP programming language.
Current logic:
The bot already functions based on the following principle:
The "Connection Comment" field stores data for two providers.
When the connection with the first provider, whose IP address is specified in the "External IP" field, is lost, the bot sends a message about the unavailability of this IP address.
The message also displays a comment describing both providers.
It is necessary to implement:
1. Linking comments to specific IPs and individual messages:
- Comment 1 → link to IP 1 (entered in the "External IP" field of the router). If
IP 1 is unavailable, the bot should send a message with Comment 1.
- Comment 2 → link to IP 2 (which is additionally transmitted via flash /). If
IP 2 is unavailable, the bot should send a message with Comment 2.
2. Provider information:
- Fields "Text 1" and "Text 2" contain provider names.
- The provider name should be displayed next to the corresponding IP address in the bot message.
3. Geolocation:
- Fields "Facility Name", "City", and "Street" should be linked to both
IP addresses.
- They should also be displayed in the bot messages.
Message format:
The message should start with a phrase according to the event:
- If the connection is lost: "Internet is not working"
- If the connection is restored: "Internet has been restored"
Then follow blocks in this order:
1. Facility name
2. Provider name
3. IP address
4. Address (city, street, number)
5. Comment (connection type)
Example of a message when connection is lost:
Internet is not working
Facility name: Burger Café
Provider: Kyivstar
IP: 185.100.100.1
Address: Kyiv, Khreshchatyk St., 22
Comment: Main provider (fiber optic)
Or:
Internet is not working
Facility name: Burger Café
Provider: Vodafone
IP: 195.200.200.2
Address: Kyiv, Khreshchatyk St., 22
Comment: Backup channel (flash /)
Example of a message when connection is restored:
Internet has been restored
Facility name: Burger Café
Provider: Kyivstar
IP: 185.100.100.1
Address: Kyiv, Khreshchatyk St., 22
Comment: Main provider (fiber optic)
Or:
Internet has been restored
Facility name: Burger Café
Provider: Vodafone
IP: 195.200.200.2
Address: Kyiv, Khreshchatyk St., 22
Comment: Backup channel