Testing sample events

About this task

Add and generate a sample event to test the configuration.

Procedure

  1. Run the nzevent add command to add a sample event to test.
    Example:
    nzevent add -name TheSystemGoingOnline -u admin -pw password -on yes -eventType sysStateChanged -eventArgsExpr 
    '$previousState == online && $currentState != online' -notifyType email -dst sample@domain.com -msg 'NPS system went from $previousState to 
    $currentState at $eventTimestamp.' -bodyText '$notifyMsg\n\nEvent:\n$eventDetail\nEvent Rule:\n$eventRuleDetail'
  2. Run the nzevent generate command to trigger the custom events.
    Example:
    nzevent generate -eventType sysStateChanged -eventArgs "previousState=online, currentState=pausing"

    After generating these custom events, an email is sent to the specified destination and the following messages are logged in the /nz/kit/log/eventmgr/eventmgr.log file.

What to do next

Once you've successfully generated an event, you can run the nzevent delete command to delete it.
Example:
nzevent delete -u admin -pw password -name TheSystemGoingOnline