Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Reporting Events

Updated on 2022-12-05 GMT+08:00

Function

An API for reporting custom events is provided, which helps you collect and report abnormal events or important change events to Cloud Eye.

URI

POST /V1.0/{project_id}/events

  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    For details about how to obtain the project ID, see Obtaining a Project ID.

  • Example
    POST https://{Cloud Eye endpoint}/V1.0/{project_id}/events

Request

  • Request parameters
    Table 2 Parameter description

    Parameter

    Type

    Mandatory

    Description

    event_item

    Arrays of objects

    Yes

    Specifies the event list.

    For details, see Table 3.

    Table 3 Parameter description of the event_item field

    Parameter

    Mandatory

    Type

    Description

    event_name

    Yes

    String

    Specifies the event name.

    Start with a letter. Enter 1 to 64 characters. Only letters, digits, and underscores (_) are allowed.

    event_source

    Yes

    String

    Specifies the event source.

    The format is service.item. Set this parameter based on the site requirements.

    service and item each must be a string that starts with a letter and contains 3 to 32 characters, including only letters, digits, and underscores (_).

    time

    Yes

    Long

    Specifies when the event occurred, which is a UNIX timestamp (ms).

    NOTE:

    Since there is a latency between the client and the server, the data timestamp to be inserted should be within the period that starts from one hour before the current time plus 20s to 10 minutes after the current time minus 20s. In this way, the timestamp will be inserted to the database without being affected by the latency.

    For example, if the current time is 2020.01.30 12:00:30, the timestamp inserted must be within the range [2020.01.30 11:00:50, 2020.01.30 12:10:10]. The corresponding UNIX timestamp is [1580353250, 1580357410].

    detail

    Yes

    Arrays of objects

    Specifies the event details.

    For details, see Table 4.

    Table 4 detail data structure description

    Parameter

    Mandatory

    Type

    Description

    content

    No

    String

    Specifies the event content. Enter up to 4096 characters.

    resource_id

    No

    String

    Specifies the resource ID. Enter up to 128 characters, including letters, digits, underscores (_), hyphens (-), and colon (:).

    Example: 6a69bf28-ee62-49f3-9785-845dacd799ec

    To query the resource ID, perform the following steps:

    1. Log in to the management console.
    2. Under Computing, select Elastic Cloud Server.

      On the Resource Overview page, obtain the resource ID.

    resource_name

    No

    String

    Specifies the resource name. Enter up to 128 characters, including letters, digits, underscores (_), and hyphens (-).

    event_state

    No

    String

    Specifies the event status.

    Valid value can be normal, warning, or incident.

    event_level

    No

    String

    Specifies the event severity.

    Its value can be Critical, Major, Minor, or Info.

    event_user

    No

    String

    Specifies the event user.

    Enter up to 64 characters, including letters, digits, underscores (_), hyphens (-), slashes (/), and spaces.

  • Example request
    [{
        "event_name":"systemInvaded",
        "event_source":"financial.System",
        "time":1522121194000,
        "detail":{
            "content":"The financial system was invaded",
            "group_id":"rg15221211517051YWWkEnVd",
            "resource_id":"1234567890sjgggad",
            "resource_name":"ecs001",
            "event_state":"normal",
            "event_level":"Major",
            "event_user":"xiaokong"
        }
    },
    {
        "event_name":"systemInvaded",
        "event_source":"financial.System",
        "time":1522121194020,
        "detail":{
            "content":"The financial system was invaded",
            "group_id":"rg15221211517051YWWkEnVd",
            "resource_id":"1234567890sjgggad",
            "resource_name":"ecs001",
            "event_state":"normal",
            "event_level":"Major",
            "event_user":"xihong"
        }
    }]

Response

  • Response parameters
    Table 5 Parameter description

    Parameter

    Type

    Description

    Array elements

    Arrays of objects

    Specifies the event list.

    For details, see Table 6.

    Table 6 Response parameters

    Parameter

    Mandatory

    Type

    Description

    event_id

    Yes

    String

    Specifies the event ID.

    event_name

    Yes

    String

    Specifies the event name.

    Start with a letter. Enter 1 to 64 characters. Only letters, digits, and underscores (_) are allowed.

  • Example response
    [
           {
                "event_id":"evdgiqwgedkkcvhdjcdu346",
                "event_name":"systemInvaded"
            },
            {
                "event_id":"evdgiqwgedkkcvhdjcdu347",
                "event_name":"systemParalysis"
            }
    ]

Returned Values

  • Normal

    201

  • Abnormal

    Returned Value

    Description

    400 Bad Request

    Request error.

    401 Unauthorized

    The authentication information is not provided or is incorrect.

    403 Forbidden

    Access to the requested page is forbidden.

    408 Request Timeout

    The request timed out.

    429 Too Many Requests

    Concurrent requests are excessive.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    503 Service Unavailable

    The service is currently unavailable.

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback