Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.6.4 Send SNMP trap

Description

This operation component sends SNMP traps to the SNMP Manager.

Options

Basic Options

(1) hostname

Target host name or IP address where the operation component will be executed.

To execute the operation component on the Management Server, specify the following:

  • For IPv4: 'localhost' or '127.0.0.1'

  • For IPv6: 'localhost' or '::1'

An argument error occurs if the host name or IP address is omitted.

The maximum length of the host name or IP address is 1,024 characters. An argument error occurs if this is exceeded.

(2) snmpversion

This is the SNMP protocol version.

For the version, specify "v1", "v2" or "v3". This option is not case sensitive.

An argument error occurs if the version is omitted.

(3) oid

This is the SNMP object ID.

Multiple object IDs can be specified.

An argument error occurs if this option is omitted.

Up to 100 instances of this option can be specified. An argument error occurs if this is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

To specify multiple object IDs, separate them by commas (",") as below.

Example: 1.3.6.1.2.1.1.5.0,1.3.6.1.2.1.1.6.0,1.3.6.1.2.1.1.3.0

(4) value

This is the object value which is set.

Multiple object values can be specified. The order in which they are specified is the same as for the object ID.

If this option is omitted, it will be set to a null value (" ").

Up to 100 instances of this option can be specified. An argument error occurs if this is exceeded.

The specified object values are converted to the UTF-8 character encoding before communications are performed.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

Specify the object values as below.

Example: new_hostname,new_location,23:10:54.50

(5) type

This is the object data type value which is set.

Multiple data types can be specified. The order in which they are specified is the same as for the object ID.

The following table lists the data types that can be specified.

type

Description

i

INTEGER

u

UNSIGNED

s

STRING

x

HEX STRING

d

DECIMAL STRING

n

NULLOBJ

o

OBJID

t

TIMETICKS

a

IPADDRESS

b

BITS

An argument error will occur if a value other than those listed above is specified.

If this option is omitted, it will be set to "s".

Up to 100 instances of this option can be specified. An argument error occurs if this is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

Advanced Options

(1) community

This is the SNMP Manager community name.

This can be specified when the SNMP protocol version is v1 or v2. If the protocol version is v3, the specified content will be ignored.

For this option, specify "public", "private" or another custom value.

If this option is omitted, it will be set to "public".

The maximum length of this option is 1,024 characters. An argument error occurs if this is exceeded.

(2) timestamp

This is the time interval between the SNMP manager startup and the trap occurrence. The units are hundredths of a second.

If this option is omitted, it will be set to "0".

Values between 0 and 2147483647 can be specified. An argument error will occur if any other value is specified.

(3) securitylevel

This is the SNMP security level.

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

For this option, specify "noAuthNoPriv", "authNoPriv" or "authPriv". This option is not case sensitive.

If "noAuthNoPriv" is specified, the IDs will not be checked and the messages to be sent will not be encrypted. In this case, the "snmpusername" option must be specified.

If "authNoPriv" is specified, the IDs will be checked and the messages to be sent will not be encrypted. In this case, the "snmpusername", "snmppassword" and "authprotocol" options must be specified.

If "authPriv" is specified, the IDs will be checked and the messages to be sent will be encrypted. In this case, the "snmpusername", "snmppassword", "authprotocol", "privpassword" and "privprotocol" options must be specified.

If this option is omitted, it will be set to "noAuthNoPriv".

(4) snmpusername

This is the SNMP user name for the host where the object value is to be sent.

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

If the SNMP protocol version is "v3", this option cannot be omitted.

The maximum length of this option is 1,024 characters. An argument error occurs if this is exceeded.

(5) snmppassword

This is the SNMP user password for the host where the object value is to be sent.

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

This option cannot be omitted when the SNMP protocol version is v3 and the security level is authNoPriv or authPriv.

An argument error will occur if the password is less than 8 characters long.

The maximum length of the password is 1,024 characters. An argument error occurs if this is exceeded.

(6) authprotocol

This is the protocol which is used in the SNMP user ID check.

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

This option cannot be omitted when the SNMP protocol version is v3 and the security level is authNoPriv or authPriv.

For this option, specify either "MD5" or "SHA". In all other cases, an argument error occurs. This option is not case sensitive.

(7) privpassword

This is the password used when encrypting messages sent by the SNMP user for the host where the object value is to be sent.

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

This option cannot be omitted when the SNMP protocol version is v3 and the security level is authPriv.

An argument error will occur if the password is less than 8 characters long.

The maximum length of the password is 1,024 characters. An argument error occurs if this is exceeded.

(8) privprotocol

This is the protocol used to encrypt the SNMP message.

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

This option cannot be omitted when the SNMP protocol version is v3 and the security level is authPriv.

For this option, specify either "DES" or "AES". In all other cases, an argument error occurs. This option is not case sensitive.

(9) enterpriseid

This is the object ID which sends the trap information.

Example: 1.3.6.1.2.1.1.5.0

This option can be specified if the SNMP protocol version is "v1". This specification is ignored for v2 and v3.

This option cannot be omitted when the SNMP protocol version is v1.

The maximum length of this option is 1,024 characters. An argument error occurs if this is exceeded.

(10) traptype

This is the trap information type.

This option can be specified if the SNMP protocol version is "v1". This specification is ignored for v2 and v3.

The following table lists the trap information types that can be specified.

type

Description

0

Cold Start

1

Warm Start

2

Link Down

3

Link Up

4

Authentication Failure

5

EGP Neighbor Loss

6

Enterprise Specific

An argument error will occur if a value other than those listed above is specified.

If this option is omitted, it will be set to "0". "

(11) specifictype

This is the customized trap information type.

Example: CPU OverLoad: 7

This option can be specified if the SNMP protocol version is "v1". This specification is ignored for v2 and v3.

This option cannot be omitted when the SNMP protocol version is v1 and traptype is 6.

If traptype is not 6, the specified content will be ignored.

Values between 0 and 2147483647 can be specified. An argument error will occur if any other value is specified.

(12) snmptrapoid

This is the trap information flag.

Example: 1.3.6.1.2.1.1.5.0

This option can be specified if the SNMP protocol version is "v2" or "v3". This specification is ignored for v1.

If the SNMP protocol version is "v2" or "v3", this option cannot be omitted.

The maximum length of this option is 1,024 characters. An argument error occurs if this is exceeded.

(13) engineid

This is the SNMP engine identifier.

Example: 43:05:A8:3F:40:BC

This can be specified when the SNMP protocol version is v3. If the protocol version is v1 or v2, the specified content will be ignored.

The maximum length of this option is 1,024 characters. An argument error occurs if this is exceeded.

(14) timeout

This is the completion timeout (seconds) for the execution of operation components.

Values between 300 and 86400 (1 day) can be specified.

Example) If the completion timeout is 10 minutes: 600

If the operation component has not finished executing even though the specified time has passed, the processing for the operation component will be interrupted with return value 201.

(15) retry

This is the retry count for the execution of operation components.

Specify the number of retry attempts to be used when operation components terminate with return value 161. Values between 0 and 5 can be specified.

If an operation component terminates with a return value other than "161" as a result of being re-executed from a retry, execution of the operation component will terminate even if the specified number of retries has not been reached. The return value for the operation component will be the value from the last time the operation component was executed.

Example) To retry the operation component twice: 2

(16) retry_interval

This is the retry interval (seconds) for operation components.

Specify the time to wait before a retry is attempted if operation components terminate with return value 161. Values between 1 and 14400 can be specified.

Example) To retry at 300 second intervals: 300


If the specification of the timeout, retry and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.

Return Values

Icon

Name

Return value

Description

Success

0

The SNMP trap has been sent successfully.

Failure

161

An attempt to send the SNMP trap failed. If a retry count has been specified, retries will be attempted.

197

There is an error with the input information.

200

Sending of the SNMP trap terminated abnormally.

-

-

201

Execution of the operation component timed out.

202

The operation component has not been executed. There is a problem with the settings for executing the operation component.

203

The operation component has not been executed normally. There is a problem with the Management Server environment.

205

The operation component has not been executed. There is a problem with the input information specification of the operation component.

206

The operation component has not been executed normally. There is a problem with the output information specification of the operation component.

207

The operation component has not been executed. The operation component may not have been registered on the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output information

Variable

Description

message

This variable will be set to the following message if the SNMP trap is sent successfully.

The operation component was Success.

If sending the SNMP trap fails, the content of the error will be output as a string.

returnCode

This variable is set to the return value.

Notes