Skip to content

TrueWatchTech/huawei-lts-serverless-forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collector "HuaweiCloud-FunctionGraph" Configuration Guide

Use Huawei Cloud FunctionGraph to collect log data from Huawei Cloud LTS and OBS, and forward it to the observability platform logs.

Configure FunctionGraph

Create a FunctionGraph function in the console (for example, with an LTS trigger)

  1. Open the FunctionGraph console and go to the Functions page.

  2. Click Create Function.

  3. Select Event Function.

  4. Enter the Function Name.

  5. Set Runtime to Python 3.9.

  6. In the Agency Name setting, select an agency with LTS permissions.
    If you do not have one, click Create Agency, choose Cloud Service / FunctionGraph, and grant the required LTS-related permissions in the authorization settings.

  7. Click Create Function.

  8. Copy all scripts from the Huaweicloud/Functiongraph directory into the function code source, and add environment variables to specify the forwarding target:

    1. DATAKIT_IP: IP address of the DataKit deployment, when forwarding to DataKit
    2. DATAKIT_PORT: Service port of DataKit, when forwarding to DataKit
    3. DATAWAY_URL: DataWay URL (for example: https://xx-openway.xxx.com), when forwarding to DataWay
    4. WORKSPACE_TOKEN: Workspace Token, when forwarding to DataWay

    Note: You must choose either DataKit or DataWay as the forwarding target.

    • If you choose DataKit, configure DATAKIT_IP
    • If you choose DataWay, configure both DATAWAY_URL and WORKSPACE_TOKEN
  9. If forwarding to DataKit and the DataKit port is not the default 9529, add the environment variable DATAKIT_PORT and set it to the correct port.

  10. Click Add Trigger.

  11. Set Trigger Type to Log Tank Service (LTS).

  12. Select the Log Group you want to listen to, then click Add.

Appendix

Minimum Required Permissions

Permissions required for LTS

To create LTS log groups, create log streams, and write events into those streams in the current region and Huawei Cloud account, the following permissions are required:

lts:*:get
lts:*:list
functiongraph:*:*

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages