No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


FusionServer Tools 2.0 uREST User Guide 16

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Creating an Event Subscription

Creating an Event Subscription


Create an event subscription.


./urest -H HOST -p PORT -U USERNAME -P PASSWORD addeventsubs -D DESTINATION -T {StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...] -HEAD HTTPHEADERS [HTTPHEADERS ...] -CON CONTEXT -PRO {Redfish} -I MESSAGEIDS [MESSAGEIDS ...] -O ORIGINRESOURCES [ORIGINRESOURCES ...]






iBMC IP address or domain name. It is a mandatory parameter. If an IPv6 address is used, the IPv6 address must be included in square brackets, such as [1001::1001].



Port number. The default value is 443. It is an optional parameter.

Enter the port number if the default value 443 is not used.


iBMC user name. It is a mandatory parameter.



Password of the iBMC user. It is a mandatory parameter.



Event subscription receiving address. It is a mandatory parameter.

Valid HTTPS receiving address.

{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...]

Event type of the event subscription listening. It is a mandatory parameter.

The values are as follows:

  • StatusChange: resource status change event
  • ResourceUpdated: resource update event
  • ResourceAdded: resource adding event
  • ResourceRemoved: resource removal event
  • Alert: alarm event


Event subscription HTTP header parameter, which needs to be carried during event reporting. It is an optional parameter.

The value needs to be in key value format and is displayed as None during the query.


Event subscription context information. It is a mandatory parameter.



Protocol used for the event subscription. It is a mandatory parameter.

The current value can only be Redfish.


Event subscription message ID matching list. It is an optional parameter.

Combination of valid message IDs defined in the event registry


Event subscription event source matching list. It is an optional parameter.

Combination of valid resource URIs

Usage Guidelines

The event receiving address specified for the subscription to be created must be different from the receiving address of a subscription that already exists.


Obtain help information.

[root@localhost bin]# ./urest -H -U root -P ****** addeventsubs -h
usage: urest addeventsubs [-h] -D DESTINATION -T 
                               [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...] 
                               [-HEAD HTTPHEADERS [HTTPHEADERS ...]] -CON 
                               CONTEXT -PRO {Redfish} 
                               [-I MESSAGEIDS [MESSAGEIDS ...]] 
                               [-O ORIGINRESOURCES [ORIGINRESOURCES ...]] 

optional arguments: 
  -h, --help            show this help message and exit 
  -D DESTINATION        destination of the event subscriptions 
  -T {StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} [{StatusChange,ResourceUpdated,ResourceAdded,ResourceRemoved,Alert} ...] 
                        types of events to be monitored. one or multiple 
                        values that are not duplicate can be set. use a space 
                        to separate multiple values 
                        event subscription HTTP header parameters to be 
                        carried when an event is reported, the argument must 
                        be in the key1 value1 key2 value2 ... format 
  -CON CONTEXT          event subscription context information. use double 
                        quotation marks ("") to enclose it 
  -PRO {Redfish}        protocol used by the event subscription 
                        message ID matching list of the event subscription 
                        mapping between event subscriptions and event sources

Create an event subscription.

[root@localhost bin]# ./urest -H -U ****** -P ****** addeventsubs -D -T StatusChange -PRO Redfish -CON 123
Success: successfully completed request
Updated: 2020-02-13

Document ID: EDOC1000176182

Views: 121707

Downloads: 588

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next