Bot
Bots are used to receive monitoring and budget alert messages. Webhook is used to send add, delete, and check messages of resources on the platform to a specific URL.
Entry: In the cloud management platform, click on the top left corner of navigation menu, and click “Settings/Notifications/Bot” menu item in the left menu bar that pops up to enter the bot page.
Create bot
This function is used to add a bot.
- On the Bot page, click the “Create” button at the top of the list to bring up the New Bot dialog.
- Configure the following information.
- Specify project: Specify the project to which the bot belongs.
- Name: Set the name of the bot.
- Type: Support nail bot, fly book bot, enterprise bot and Webhook.
- Webhook: Configure the Webhook address of the corresponding bot. For different types of bots, please refer to [Webhook Acquisition Method](#Webhook Acquisition Method)
- Click the “OK” button to complete the operation.
Webhook Get Method
Dingtalk bot
- Create a dingtalk group or select an existing dingtalk group in the dingtalk computer client.
- Add a custom bot to your dingtalk group in the upper right corner of the group settings - Smart Group Assistant.
- Set the bot name, add it to the corresponding group and check the IP address (segment) in the security settings, and add the OneCloud platform’s external access IP to the IP address segment.
- Get the bot Webhook address after successful addition.
Lark bot
- Create a Lark group in Lark computer client or select an existing Lark group.
- Add Custom Bot bot to the right side of Lark group - Group Bot.
- Get the bot Webhook address after adding successfully.
WeCom bot
- Create WeCom group or select existing WeCom group in WeCom client.
- Add a custom bot in the upper right corner of the WeCom group - Smart Group Assistant.
- Get the bot webhook address after adding successfully.
Modify bot
This function is used to modify the bot information.
- In the bot page, click the “Modify” button on the right side of the bot to bring up the Modify Bot dialog box.
- Only Modify Name and Webhook are supported.
- When the modification is finished, click the “OK” button to complete the operation.
Set Sharing
This function is used to set the sharing status of the bot.
There are five types of sharing ranges for project resources.
- Not shared (private): i.e. project resources are only available to users of this project.
- Project sharing-part (shared by multiple projects in this domain): that is, project resources can be shared to specified projects (one or more) under the same domain, and only users under this project and the shared project can use the project resources.
- Project Sharing-All (shared by this domain): i.e. project resources can be shared to all projects under the domain, i.e. all users of the project’s domain can use the project resources.
- Domain sharing-part (multi-domain sharing): i.e. project resources can be shared to the specified domain (one or more), and only users under the domain where the project resources are located and the shared domain can use the project resources.
- Domain Share-All (global sharing): i.e., project resources can be shared to all domains, i.e., all users in the system can use project resources.
Description
To set the conditions for domain sharing.
- Level 3 permissions have been turned on in the OneCloud platform.
- The user is in the admin backend.
To set up project sharing.
- The user is in the admin backend or domain admin backend.
Note
- Physical, PXE, IPMI type bots are not recommended to be set to shared status.
- Local IDCs have an arbitrary range of bots shared.
- The shared range of bots for private and public clouds is related to the shared range of the cloud account.
- When the cloud account is not shared, the resources synced down through the cloud account cannot be shared either.
- When sharing is enabled by the cloud account, the resources synced down through the cloud account will also be enabled for sharing with the cloud account.
- When the cloud account is enabled for sharing, the resources synced through the cloud account can change the sharing range. Please make sure the sharing range is within the sharing range of the cloud account.
- When the cloud account modifies the sharing range, the sharing range of the resources synced through the cloud account should always remain within the sharing range of the cloud account. For example, if the cloud account shares domain A, B, C, D, and domain resources share domain A and C, and the cloud account modifies the sharing range to domain A and B, then the domain resources can only be shared to domain A.
- When the cloud account shares cloud subscriptions, the domain resources synced down through the cloud account cannot be shared.
Single bot setup sharing
- On the bot page, click the “More” button on the right action bar of the bot, and select the drop-down menu “Set Sharing” menu item to bring up the Set Sharing dialog box.
- Configure the following parameters.
- When “No Sharing” is selected as the sharing scope, the sharing scope of project resources is private and only users of this project can use them.
- When the sharing scope is selected as “Project Sharing”, you need to select the projects that can be shared under this domain.
- When the project selects one or more projects under the same domain, the shared scope of the project resources is Project Shared - Part, and only the users under the project where the project resources are located and the shared project can use the project resources.
- When All is selected for the project, the shared scope of the project resource is Project Shared - All, and all users under the project’s domain can use the project resource.
- When the sharing scope is “Domain Sharing”, you need to select the shared domains.
- When one or more of the domains is selected, the sharing scope of the project resources is Domain Sharing - Partial, and only the users under the domain where the project resources are located and the shared domain can use the domain resources.
- When All is selected for the domain, the sharing scope of the project resource is Domain Shared-All, and all users in the system can use the project resource.
- Click the “OK” button to complete the operation.
Batch Setting Sharing
The scope of sharing for multiple bots set in bulk must be the same. Otherwise, set up shares for bots individually.
- Select one or more bots in the bot list, click the “Bulk Action” button at the top of the list, and select the drop-down menu “Set Sharing” menu item to bring up the Set Sharing dialog box.
- Configure the following parameters.
- When “No Sharing” is selected as the sharing scope, the sharing scope of project resources is private and only users of this project can use them.
- When the sharing scope is selected as “Project Sharing”, you need to select the projects that can be shared under this domain.
- When the project selects one or more projects under the same domain, the shared scope of the project resources is Project Shared - Part, and only the users under the project where the project resources are located and the shared project can use the project resources.
- When All is selected for the project, the shared scope of the project resource is Project Shared - All, and all users under the project’s domain can use the project resource.
- When the sharing scope is “Domain Sharing”, you need to select the shared domains.
- When one or more of the domains is selected, the sharing scope of the project resources is Domain Sharing - Partial, and only the users under the domain where the project resources are located and the shared domain can use the domain resources.
- When All is selected for the domain, the sharing scope of the project resource is Domain Shared-All, and all users in the system can use the project resource.
- Click the “OK” button to complete the operation.
Change project
This function is used to change the project to which the bot belongs. You can change the project only when the bot is private.
To change a project for an individual bot
- On the bot screen, click the “More” button in the action bar on the right side of the bot, and select the drop-down menu “Change Project” menu item to bring up the Change Project dialog box.
- Modify the fields and items, click “OK” button.
Batch Change Project
- Select one or more bots in the bot list, click the “Bulk Action” button at the top of the list, and select the drop-down menu “Change Project” menu item to bring up the Change Project dialog box.
- Modify the domain and project, click “OK” button.
Enable
This feature is used to enable bots in the “disabled” state, which do not receive alert messages.
Single Enable
On the Bot page, click the “More” button in the action bar to the right of the disabled bot, and select the “Enable” menu item to bring up the action confirmation dialog. 2. Click the “OK” button to enable the bot.
Batch Enable
- Select one or more bots in the bot list, click the “Bulk Operation” button at the top of the list, and select the drop-down menu “Enable” menu item to bring up the operation confirmation dialog.
- Click the “OK” button to enable the bot.
Disable
This function is used to disable bots in the “enabled” state. Bots in the disabled state will not receive alarm messages.
**To disable a bot, click the “Disable” button.
- On the Bot page, click the “More” button in the action bar to the right of the enabled bot, and select the “Disable” menu item to bring up the action confirmation dialog.
- Click the “OK” button to disable the bot.
Batch Disable
- Select one or more bots in the bot list, click the “Bulk Action” button at the top of the list, and select the drop-down menu “Disable” menu item to bring up the action confirmation dialog.
- Click the “OK” button to disable the bot.
Delete
This function is used to delete the bot.
Delete
- On the bot screen, click the “More” button in the action bar on the right side of the bot, and select the “Delete” menu item in the drop-down menu to bring up the action confirmation dialog.
- Click the “OK” button to complete the operation.
Batch Delete
- Select one or more bots in the bot list, click the “Bulk Operation” button at the top of the list, and select the drop-down menu “Delete” menu item to bring up the operation confirmation dialog.
- Click the “OK” button to complete the operation.
View Bot Details
This function is used to view the details of the bot.
- On the Bot page, click the Bot name item to enter the Bot details page.
- View bot cloud ID, ID, name, status, domain, project, share scope, enable status, type, webhook/URL, create at, update at.
View operation log
This function is used to view the operation logs related to the bot.
- On the bot page, click the bot name item to enter the bot details page.
- Click the Operation Log tab to enter the Operation Log page.
- If you want to view more logs, click the “Load More” button to get more logs.
- View Log Details: Click the “View” button on the right column of the operation log to view the log details. Copy details are supported.
- View logs of specified time period: If you want to view the operation logs of a certain time period, set the specific date in the start date and end date at the top right of the list to query the log information of the specified time period.
- Export logs: Currently, only the logs displayed on this page are supported to be exported. Click the upper-right corner of icon, set the export data column in the pop-up export data dialog, and click the “OK” button to export the logs.