Generate an event
You can use the nzevent generate command to trigger an event for the event manager. If the event matches a current event rule, the system takes the action that is defined by the event rule.
- To simulate a system event to test an event rule.
- To add new events because the system is not generating events for conditions for which you would like notification.
" "
as input, as it might cause failure in event generation with appropriate error code.nzevent generate -eventtype runawayquery -eventArgs 'duration=50'
In this example, the duration meets the event criteria (greater than 30) and the event is triggered. If you do not specify a value for a restriction argument in the -eventArgs string, the command uses default values for the arguments. In this example, duration has a default of 0, so the event would not be triggered since it did not meet the event criteria.
nzevent generate -eventType sysStateChanged
-eventArgs 'previousState=online, currentState=paused'