乐享 icon

乐享

与乐享平台API交互

Actions2

Overview

This node interacts with the Lexiang platform API to retrieve alert information. Specifically, for the "Alert" resource and the "获取告警列表" (Get Alerts List) operation, it fetches a list of alerts based on various filtering criteria such as alert type, status, severity level, and time range.

Common scenarios where this node is useful include:

  • Monitoring system health by retrieving current or historical alerts.
  • Filtering alerts by severity or status to prioritize incident response.
  • Integrating alert data into dashboards or automated workflows for notifications or further processing.

For example, a user might configure this node to fetch all critical and major alerts that are currently being processed within the last 24 hours to trigger an escalation workflow.

Properties

Name Meaning
返回所有结果 (returnAll) Boolean flag indicating whether to return all matching alert results or limit the number of returned items.
限制返回数量 (limit) Maximum number of alert results to return when returnAll is false. Minimum value is 1. Default is 50.
告警类型 (typeList) Select one or more alert types to filter by. Options include: 可用性告警 (Availability Alert), 容量告警 (Capacity Alert), 错误告警 (Error Alert), 信息告警 (Information Alert), 延迟告警 (Latency Alert), 速率告警 (Rate Alert), 风险告警 (Risk Alert).
告警状态 (statusList) Select one or more alert statuses to filter by. Options include: 处理中 (Dealing), 工单处理中 (Work Order Dealing), 已关闭 (Closed), 已恢复 (Recovered), 待处理 (To Deal).
告警级别 (levelList) Select one or more alert severity levels to filter by. Options include: 关键 (Critical, Level 1), 主要 (Major, Level 2), 次要 (Minor, Level 3), 信息 (Informational, Level 4).
时间范围 (timeRange) Specify a UTC time range to filter alerts by their start and end times. Includes fields for 开始时间 (Start Time) and 结束时间 (End Time).

Output

The node outputs an array of JSON objects representing alerts matching the specified filters. Each alert object contains detailed information about the alert, such as its type, status, severity level, timestamps, and other relevant metadata as provided by the Lexiang platform API.

If the node supports binary data output (not indicated in the provided code or properties), it would typically represent attachments or related files associated with alerts; however, no binary output is described here.

Dependencies

  • Requires an API key credential for authenticating with the Lexiang platform API.
  • The node depends on internal action modules for fetching alerts (./actions/Alert/GetAlerts).
  • No additional external services or environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Unsupported Operation or Resource: If an unsupported resource or operation is specified, the node throws an error indicating the unsupported combination. Ensure the resource is set to "Alert" and operation to "获取告警列表".
  • API Authentication Errors: Failure to provide valid API credentials will result in authentication errors. Verify that the API key credential is correctly configured.
  • Empty Results: If no alerts match the filter criteria, the node returns an empty array. Adjust filters or time ranges to broaden the search.
  • Limit vs Return All: Setting returnAll to false but specifying a very low limit may truncate results unexpectedly. Set returnAll to true to retrieve all matching alerts.
  • Date Range Issues: Incorrectly formatted or logically inconsistent date ranges (e.g., start date after end date) may cause errors or no results. Use valid UTC datetime values.

Links and References

Discussion