Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
To set up a Telegram group for a major incident, do the following:
On the Administrator's computer
- Download and set up Infrastructure Agent.
Create a Telegram client.
Info To create a Telegram client, complete the steps below:
1. Get registered in Telegram, using any client name.
2. Follow the https://my.telegram.org link for authorization.
3. Complete the form on the https://my.telegram.org/apps website to receive the URLs and parameters of api_id and api_hash needed for the users' authorization.
It is possible to link only one api_id to the telephone number.
- Open the folder downloaded in Step 2 and run the "createGroup" script manually.
The four scripts in the folder are:- createGroup – to create a group,
- cancelGroup – to restrict commenting upon the completing of the incident and changing its state to Completed,
- deleteGroup – to delete a Telegram group,
- clientInformation – to store api_id and api_hash.
- Complete the user's authorization that the system will require. As a result, a "router.session" file is created.
On the SimpleOne instance
- Create a new server in the MID Server (MID_server) table.
- Create three scripts in the MID Scripts (MID_script) table. To do so:
- Click New and in the new Script Form
- Add a name of the script (for example, createTelegram)
Add the path to the script on your computer in the Script field. Add the parameters to the same field, as shown below:
createGroup Path C:\User's Path\createGroup.py Parameters $botUserName $incidentDispalyName $titleMessage $mainInformation cancelGroup Path C:\User's Path\cancelGroup.py Parameters $chatId deleteGroup Path C:\User's Path\deleteGroup.py Parameters $chatId
- Go to the System Properties (sys_property) table, set the value true for the itsm.telegram.swarming property.
- Repeat the previous step to add the scripts to close and delete a group.
- Go to System Properties (sys_property) table and add the IDs of the three created scripts to the corresponding properties as their values.
Go to a major incident form. Now there appears a Start Swarming button. Click it for the first time, and a createGroup record
with a corresponding nameappears in
thethe MID Queue (sys_mid_queue) table.
Field Description Request BotUserId, the incident name and the first message content that is sent to the Swarming Session participants Server TgBotMIDServer. Script The name of the executed script Response A chat ID created and a lint to the group. The chat ID is stored in the Telegram Chat Bindings with Incident table. State Done when executed Processed at Date and time of the execution A closeGroup record in the MID Queue (sys_mid_queue) table appears when the incident state is changed to Done. Commenting in the group is unavailable, but the participants can read the messages.
Field Description Request A chatId parameter Server TgBotMIDServer. Script The name of the executed script Response No response State Done when executed Processed at Date and time of the execution A deleteGroup record in the MID Queue (sys_mid_queue) table is executed automatically after a set time period in the corresponding Server Script. When the deleteGroup record is in the state DoneClosed, the telegram group is deleted.
Field Description Request A chatId parameter
Server TgBotMIDServer. Script The name of the executed script Response No responceresponse State Done when executed Processed at Date and time of the execution