Create new events

You can create new events using the RestWsUtil command-line utility.

Note To create events, users must have been granted the Event Submission permission in the OMi User Management settings. For details about how to do this, see OMi Help.

Example: How to create a new event

To create an new event using the RestWsUtil utility, follow these steps:

  1. Create an XML file in the following folder (called, for example, create.xml):

    <OMi_HOME>/opr/bin/create.xml

  2. Define the properties of the new event by adding the following lines to the file:

    <event xmlns="http://www.hp.com/2009/software/opr/data_model">
       <title>New event title</title>
       <severity>normal</severity>
       <priority>low</priority>
       <state>open</state>
    </event>
    
  3. Open a command prompt and type:

    <OMi_HOME>/opr/bin>RestWsUtil -create create.xml -username <login name> -password <password> -url "https://<server.example.com>/opr-web/rest/9.10/event_list"

    Where:

    <OMi_HOME> is the directory where OMi is installed, <login name> is the user name required for authentication.

For further details and examples of how to use the RestWsUtil command-line utility, see RestWsUtil Command-Line Interface.