You can configure alarm policies for SCF through Cloud Monitor to monitor the execution status of functions.
Currently, the monitoring metrics that can be configured for SCF include runtime, invoke count, and error count. For the full list of supported metrics, see Descriptions of monitoring metrics. In addition, you can select user groups that will receive alarms through email, SMS, or WeChat.
- Log in to the SCF console and select Functions on the left sidebar.
- On the Functions page, click the target function name to enter the function details page.
- Select Monitoring information on the left and click Set alarm on the details page as shown below:
- On the Create alarm policy page, configure a new alarm policy as detailed below:
- Policy Name: Custom.
- Monitoring Type: Select Tencent Cloud services.
- Policy Type: Select Function/Version or Function/Alias.
- Alarm Object: Select the functions for which to apply the policy as needed. If Instance ID is selected, the region will be set to Guangzhou by default. You can view corresponding functions in different regions.
For more information on detailed alarm policy configuration, see Creating Alarm Policy.
- Click Complete, and you can see the configured policy in Alarm Management > Policy Management and choose to enable/disable it at any time.