Building a Program
This section describes how to download and use the program package (index.zip) for log alarms.
Creating a Function
Create a function for extracting logs and upload the sample code package, as shown in Figure 1. For details, see Function Management.
This function analyzes received operation records, filters logins or logouts from unauthorized IP addresses using a whitelist, and sends alarms under a specified SMN topic.
Setting Environment Variables
On the Configuration tab page of the function, set the environment variables and SMN topic name, as shown in Table 1.
Environment Variable |
Description |
---|---|
SMN_Topic |
SMN topic name. |
RegionName |
Region. |
IP |
IP address whitelist. |
For details about how to set environment variables, see Using Environment Variables, as shown in Figure 2.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot