You use the nzevent command to manage the alerts and triggers for problem and condition reporting on the IBM® Netezza® appliances.
nzevent [-h|-rev|-hc] subcmd [subcmd options]
Input | Description |
---|---|
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. |
Command | Option | Description |
---|---|---|
All nzevent commands | -u user | Specifies the database user name [NZ_USER]. |
-pw password | Specifies the user password [NZ_PASSWORD]. | |
-host name | Specifies the host name or IP address [NZ_HOST]. | |
-timeout secs | Specifies the time to wait before it exits with a timeout error (default = 300). Does not apply to listEventTypes and listNotifyTypes. | |
nzevent add nzevendt copy nzeventd modify |
-eventType type | Specifies the event type for the event. For a list of the event types, see Table 1. |
-eventArgsExpr expr | Specifies the optional match expression for further filtering. For more information, see Table 1. | |
-name value | 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. | |
-newname value | If you are modifying or copying an event, specifies the name of the new event. | |
-useTemplate | If you are copying an existing event, uses the rule that is specified with the -name option as a template for this new rule. | |
-notifyType type | Specifies the type of notification to generate for this event. The notify types are email and runCmd. | |
-dst value | 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. | |
-ccDst value | Specifies additional notification destinations (email only). | |
-msg string | 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. | |
-bodyText string | Specifies more text to send with the notification message. | |
-callHome bool | 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. | |
-on bool | Enables or disables processing for this rule. | |
-eventAggrCount int | Specifies the number of events to aggregate (email events only). You can specify a number from 1 - 1000. | |
nzevent delete | -force | Does not prompt for confirmation. |
-name rule_name | Deletes the event rule <rule_name>. | |
nzevent generate | -eventType type | Generates the specified type of event. For a list of the event types, see Table 1. |
-eventArgs expr | Specifies a list of one or more optional event arguments (<tag>=<value>, ...). | |
-force | Flushes all aggregate events and sends a notification (email only). | |
nzevent show | -name rule_name | Displays only the event rule corresponding to the rule_name. If you do not specify a name, the command displays all event rules. |
-syntax | Displays the rule in CLI syntax. | |
-maxColW chars | Specifies the maximum number of characters to print in each output table column. The default is 24 characters. | |
-orient type | You can specify the output display. The value values are
|
|
-caCertFile path | Specifies the path name of the root CA certificate file on the client system. This argument is used by Netezza clients who use peer authentication to verify the Netezza host system. The default value is NULL, which skips the peer authentication process. | |
-securityLevel level | Specifies the security level that you want to use for the session.
The argument has four values:
|
nzevent add -name Newrule -u admin -pw password -host nzhost -on
yes -eventType sysStateChanged -eventArgsExpr ‘$previousState ==
online && $currentState != online’ -notifyType email -dst
jdoe@netezza.com -msg ‘NPS system $HOST went from $previousState to
$currentState at $eventTimestamp.’ -bodyText
‘$notifyMsg\n\nEvent:\n$eventDetail\nEvent
Rule:\n$eventRuleDetail’
nzevent copy -u admin -pw password -useTemplate -name
HostNoLongerOnline -on yes -dst jdoe@netezza.com
nzevent delete -u admin -pw password -host nzhost -name Newrule
nzevent generate -u admin -pw password -host nzhost -eventtype
custom1 -eventArgs ‘customType=tooManySessions, numSessions=<n>’
nzevent listEventTypes
nzevent listNotifyTypes
nzevent modify -u admin -pw password -host nzhost -name Newrule -on
yes -dst jdoe@netezza.com
nzevent show -u admin -pw password -host nzhost -name Newrule
nzevent show -u admin -pw password -host nzhost -orient vertical