The nzevent command
You use the nzevent command to manage the alerts and triggers for problem and condition reporting.
- Show a list of event rules.
- Copy a predefined template event rule and use it as your source to add a rule.
- Modify an existing event rule or a copied predefined template.
- Add an event rule.
- Delete an event rule.
- Generate events.
nzevent [-h|-rev|-hc] subcmd [subcmd options]
|nzevent add options
|Adds an event rule.
|nzevent copy options
|Copies a predefined template event rule or an existing event rule.
|nzevent delete options
|Deletes an event rule.
|nzevent generate options
|Generates an event.
|nzevent listEventTypes options
|Lists the valid event types.
|nzevent listNotifyTypes options
|Lists the notification types.
|nzevent modify options
|Modifies an event rule.
|nzevent show options
|Displays the event rules.
|All nzevent commands
|Specifies the database user name [NZ_USER].
|Specifies the user password [NZ_PASSWORD].
|Specifies the host name or IP address [NZ_HOST].
|Specifies the time to wait before it exits with a timeout error (default = 300). Does not apply to listEventTypes and listNotifyTypes.
|Specifies the event type for the event. For a list of the event types, see Table 1.
|Specifies the optional match expression for further filtering. For more information, see Table 1.
|If you are adding an event, specifies the event rule name. If you are copying an event, specifies the name of the event you are copying. If you are modifying an event, specifies the name of the event that you are changing.
|If you are modifying or copying an event, specifies the name of the new event.
|If you are copying an existing event, uses the rule that is specified with the -name option as a template for this new rule.
|Specifies the type of notification to generate for this event. The notify types are email and runCmd. Starting from 184.108.40.206, the notify types are email, runCmd, and platform.
|Specifies the notification destination (notify-type specific). For email, it is the email address. For runCmd, it is the full path of the command or command file to run.
|Specifies additional notification destinations (email only).
|Specifies the notification message to send. For email, this is the subject string and cannot be blank. For runCmd, this is the argument for -msg parameter.
|Specifies more text to send with the notification message.
|Specifies whether to append system information to the notification message. For email, the system sends /nz/kit/data/config/callHome.txt as an attachment. This file contains customer information such as company, address, contact, and system information such as model number, and serial number. For runCmd, the system passes the file path to the command.
|Enables or disables processing for this rule.
|Specifies the number of events to aggregate (email events only). You can specify a number from 1 - 1000.
|Does not prompt for confirmation.
|Deletes the event rule <rule_name>.
|Generates the specified type of event. For a list of the event types, see Table 1.
|Specifies a list of one or more optional event arguments (<tag>=<value>, ...).
|Flushes all aggregate events and sends a notification (email only).
|Displays only the event rule corresponding to the rule_name. If you do not specify a name, the command displays all event rules.
|Displays the rule in CLI syntax.
|Specifies the maximum number of characters to print in each output table column. The default is 24 characters.
|You can specify the output display. The value values are
|Specifies the path name of the root CA certificate file on the client system. This argument is used by Netezza Performance Server clients who use peer authentication to verify the Netezza Performance Server host system. The default value is NULL, which skips the peer authentication process.
|Specifies the security level that you want to use for the session. This option does not apply
when you are logged in to the Netezza Performance Server
system and running the command. The argument has four values:
- Privileges required
- Your database user account must have Manage System privilege.
- Common tasks
- Use the nzevent command to set the preconfigured event rules, and to create your own event rules.
- To add an event rule,
nzevent add -name Newrule -u admin -pw password -host nzhost -on yes -eventType sysStateChanged -eventArgsExpr ‘$previousState == online && $currentState != online’ -notifyType email -dst email@example.com -msg ‘NPS system $HOST went from $previousState to $currentState at $eventTimestamp.’ -bodyText ‘$notifyMsg\n\nEvent:\n$eventDetail\nEvent Rule:\n$eventRuleDetail’
- To copy a template event rule from the template table to the user-modifiable table, enter:
nzevent copy -u admin -pw password -useTemplate -name HostNoLongerOnline -on yes -dst firstname.lastname@example.org
- To delete an event rule,
nzevent delete -u admin -pw password -host nzhost -name Newrule
- To generate an event rule, enter:
nzevent generate -u admin -pw password -host nzhost -eventtype custom1 -eventArgs ‘customType=tooManySessions, numSessions=<n>’
- To list event types, enter:
- To list notification types, enter:
- To modify an existing event rule, enter:
nzevent modify -u admin -pw password -host nzhost -name Newrule -on yes -dst email@example.com
- To display a specific event rule, enter:
nzevent show -u admin -pw password -host nzhost -name Newrule
- To display event rules vertically, enter:
nzevent show -u admin -pw password -host nzhost -orient vertical