Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.6.2 Get value using SNMP

Description

This operation component retrieves the value of an SNMP object from an SNMP agent.

Options

Basic Options

(1) hostname

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

To execute operation components on the Management Server, specify either 'localhost' or '127.0.0.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 the object ID is omitted.

The maximum number of object IDs is 100. 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

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 the community name, specify "public", "private" or another custom value.

If the community name was omitted, the setting will be "public".

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

(2) 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 the security level is omitted, "noAuthNoPriv" will be set.

(3) snmpusername

This is the SNMP user name for the host which obtains the object value.

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 the user name is 1,024 characters. An argument error occurs if this is exceeded.

(4) snmppassword

This is the SNMP user password for the host which obtains the object value.

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.

(5) 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.

Specify either "MD5" or "SHA" for the protocol. In all other cases, an argument error occurs. This option is not case sensitive.

(6) privpassword

This is the password used during encryption of the message sent by the SNMP user for the host which obtains the object value.

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.

(7) 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.

Specify either "DES" or "AES" for the protocol. In all other cases, an argument error occurs. This option is not case sensitive.

(8) 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.

(9) 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

(10) 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 object value has been successfully acquired using SNMP.

Failure

161

An attempt to obtain the object value using SNMP failed. If a retry count has been specified, retries will be attempted.

187

SNMP communication authentication failed.

197

There is an error with the input information.

200

An attempt to obtain the object value using SNMP 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 object value is successfully obtained using SNMP.

The operation component was successful.

If an attempt to obtain the object value using SNMP fails, the content of the error will be output as a string.

snmp_get_result

This variable is set to the object value that has been acquired, using the following format:

[oid], [object value acquired]

Example:
"1.3.6.1.2.1.1.5.0","new computer name"
"2.3.6.1.2.1.1.5.0","new computer name"

returnCode

This variable is set to the return value.

Notes