Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The body of the request must be a valid JSON document, containing the desired event properties as a hash. Some properties (e.g. date, time) can be omitted and will be filled in automatically. As an absolute minimum, a node or a host property, and an event property must be present. If (and only if!) node is not present, then opEvents looks up host and attempts to find the canonical node for the hostname or IP address from the host property  - this heuristic is described in more detail here. The resulting node must be known to opEvents and must not be disabled for opEvents.

Request Example for Node Down

Code Block
{
"node": "test-node",
"event": "Node Down",
"level": "Major",
"priority": 6,
"state": "down",
"stateful": "Node",
"details" : "Ping failed"
}

Request Example for Node Up

Code Block
{
"node": "test-node",
"event": "Node Up",
"level": "Normal",
"priority": 1,
"state": "up",
"stateful": "Node",
"details" : ""
}

Successful Response

HTTP StatusHTTP HeadersBodyDescription
201LocationJSON hash with success and id propertiesThe success property is set to 1 and only if the request was successful.
The id property is the new event's ID (but see the Limitations section below)
The Location header contains the complete URL for retrieving the newly created event.

...