12.15 SNMPSet

Use this Knowledge Script to perform an SNMP v1 Set operation for the selected SNMP MIB variable. You can specify a list of computers where you want to set the variable value directly using the List of computers parameter or in a file containing a list of computer names or addresses. This script raises an event if the Set operation encounters an error and, optionally, if the Set operation completes successfully. This script requires the Microsoft SNMP Service to be running and security for the service set to allow Read and Write privileges.

12.15.1 Prerequisite

By default, the security for the Microsoft SNMP Service is typically set to the read-only permission level. To use this script, the Microsoft SNMP Service must be set to the read/write permission level. For more information, see the following topics:

12.15.2 Resource Objects

Windows server or HP SIM server

12.15.3 Default Schedule

The default interval for this script is Run once.

12.15.4 Setting Parameter Values

Set the following parameters as needed:

Parameter

How to Set It

Event?

Set to y to raise an event if the Set operation completes successfully. The default is n.

This script always raises an event if the Set operation encounters an error.

Object identifier

For the MIB variable, specify the MIB object identifier in the OID notation (for example .1.2.3.456.78) or ODE notation (for example, system.sysUptime.0). The default is system.sysContact.0.

If you are using the object identifier (OID), you must include the dot (.) at the beginning of the identifier. If you are using the object descriptor (ODE), use a case-sensitive descriptor.

You can use the object descriptor if the mib.bin file has been compiled on the agent machine (in the %windir%/system32 directory). For information about compiling the mib.bin, see the Windows Resource Kit.

Community string

Provide a valid SNMP community string name. Leave this parameter blank to use the SNMP community name entered in AppManager Security Manager. The default is public.

Set type

Specify the data type for the MIB variable to set. Valid values are:

  • OCTETSTRING

  • INTEGER

  • COUNTER

  • GAUGE

  • TIMETICKS

  • IPADDRESS

The default is OCTETSTRING.

Set value

Specify the value you want to set.

List of computers

Specify the computers whose values you want to set. If you leave this parameter blank, this script sets the SNMP MIB variable located on the managed computer where the Knowledge Script job is running.

To set the value for multiple computers, enter the hostname or IP address for each computer in a comma-separated list. For example:

CORP01,ENGR02,10.15.221.5

Full path to computer list file

To set values on more computers than is convenient to list one at a time in the List of computers parameter, create a file containing a list of the computers whose values you want to set.

Enter the full path to the file. The file should contain the hostname or IP address for each computer in one or more lines. Each line can have multiple computer names, separated by commas. For example:

NYC01,NYC02
SALES01,10.15.221.5,SFO01
LABMACH, QATEST

Event severity: Variable was not set

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the specified value was not set. The default is 5 (red event indicator). This script always raises an event when a Set operation fails.

Event severity: Variable was set

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the variable was set. Default is 16 (yellow event indicator).

The Event? parameter must be enabled to raise an event for a successful Set operation.

Threshold for attempts to contact SNMP agent

Specify the maximum number of times the script should try to contact the SNMP agent before raising an event. The default is 3 times.

Threshold (in seconds) for a response

Specify the maximum number of seconds the script should wait for a response from the SNMP agent before timing out and raising an event. The default is 5 seconds.

12.15.5 Checking SNMP Service Rights

By default, the Microsoft SNMP Service is typically configured with Read-only permission. This configuration will prevent the SNMPSet Knowledge Script from setting any values. You can check your current configuration for any computer using the Services Control Panel.

To check the rights associated with the Microsoft SNMP Service:

  1. In the Services Control Panel, select the Microsoft SNMP Service, and then click the Security tab.

  2. Verify the rights associated with the community name you are using for the computer are READ WRITE.

12.15.6 Changing the Permission Level for the SNMP Service

To change the rights associated with the Microsoft SNMP Service:

  1. In the Services Control Panel, select the Microsoft SNMP Service, and then click the Security tab.

  2. Select the community name you are using, then click Edit.

  3. Select the READ WRITE permission level from the Community rights list.

  4. Click OK.