Change SNMP Attributes (CHGSNMPA)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Change SNMP Attributes (CHGSNMPA) command changes values and options used by the OS/400 SNMP agent. The command also is used to specify which SNMP managers receive traps generated by the local AS/400 system.

The SNMP agent is shipped with the following values for the SNMP attributes.

Keyword
Value
SYSCONTACT
*NONE
SYSLOC
*NONE
SNDAUTTRP
*YES
AUTOSTART
*NO
OBJACC
*READ
LOGSET
*NO
LOGGET
*NO
LOGTRP
*NO
TRPMGR
*NONE
Top

Parameters

Keyword Description Choices Notes
SYSCONTACT System contact Character value, *SAME, *NONE, *CNTINF Optional
SYSLOC System location Character value, *SAME, *NONE, *CNTINF Optional
SNDAUTTRP Send authentication traps *SAME, *YES, *NO Optional
AUTOSTART Automatic start *SAME, *YES, *NO Optional
OBJACC Object access *SAME, *READ, *WRITE, *NONE Optional
LOGSET Log set requests *SAME, *YES, *NO Optional
LOGGET Log get requests *SAME, *YES, *NO Optional
LOGTRP Log traps *SAME, *YES, *NO Optional
TRPMGR Trap managers Single values: *SAME, *NONE
Other values (up to 300 repetitions): Element list
Optional
Element 1: Manager internet address Character value
Element 2: Community name Character value
Element 3: Translate community name *YES, *NO
Top

System contact (SYSCONTACT)

Specifies the name of the contact person for this AS/400 system, along with information on how to contact this person. This value is used only by SNMP-specific functions. This value also may be read or modified by an authorized SNMP manager.

The possible values are:

*SAME
The value does not change.
*NONE
No system contact exists.
*CNTINF
The value is obtained from the service contact information specified by using the Work with Contact Information (WRKCNTINF) command. The value obtained consists of the contact person and the contact telephone numbers.
system-contact
Specify the name of the contact person and other contact information. All of the characters specified must be able to be translated into the ASCII character set.
Top

System location (SYSLOC)

Specifies the physical location of this AS/400 system. This value is used only by SNMP-specific functions. This value also may be read or modified by an authorized SNMP manager.

The possible values are:

*SAME
The value does not change.
*NONE
No system location information exists.
*CNTINF
The value is obtained from the service contact information specified by using the Work with Contact Information (WRKCNTINF) command. The value obtained consists of the mailing address.
system-location
Specify the physical location of the system. All of the characters specified must be able to be translated into the ASCII character set.
Top

Send authentication traps (SNDAUTTRP)

Specifies whether the SNMP agent may send any authenticationFailure traps to any defined SNMP managers. An authenticationFailure trap is sent by the SNMP agent if a request is received from an SNMP manager that contains a community name that is not recognized by the SNMP agent. This trap is only sent when SNDAUTTRP is *YES and when at least one trap manager has been defined. This value may also be read or modified by an authorized SNMP manager.

The possible values are:

*SAME
The value does not change.
*YES
authenticationFailure traps may be sent.
*NO
authenticationFailure traps are not sent.
Top

Automatic start (AUTOSTART)

Specifies whether the SNMP agent is started when the STRTCP command or STRTCPSVR SERVER(*AUTOSTART) command runs.

The possible values are:

*SAME
The value does not change.
*YES
The SNMP agent is started when the STRTCP command or STRTCPSVR SERVER(*AUTOSTART) command runs.
*NO
The SNMP agent is not started when the STRTCP command runs.
Top

Object access (OBJACC)

Specifies the default object access for SNMP communities.

The possible values are:

*SAME
The value does not change.
*READ
Allow SNMP managers that are part of a community to read all management information base (MIB) objects. Modification of MIB objects by SNMP managers is not permitted.
*WRITE
Allow SNMP managers that are part of a community to modify all MIB objects that can be modified. Specifying *WRITE implies *READ access.
*NONE
Do not allow SNMP managers that are part of a community to modify any MIB objects.
Top

Log set requests (LOGSET)

Specifies the default value for whether set requests from SNMP managers in a community are logged in journal QSNMP in library QUSRSYS.

The possible values are:

*SAME
The value does not change.
*YES
Set requests are logged.
*NO
Set requests are not logged.
Top

Log get requests (LOGGET)

Specifies the default value for whether get requests and get-next requests from SNMP managers in a community are logged in journal QSNMP in library QUSRSYS.

The possible values are:

*SAME
The value does not change.
*YES
Get requests and get-next requests are logged.
*NO
Get requests and get-next requests are not logged.
Top

Log traps (LOGTRP)

Specifies whether traps are logged in journal QSNMP in library QUSRSYS.

The possible values are:

*SAME
The value does not change.
*YES
Traps are logged.
*NO
Traps are not logged.
Top

Trap managers (TRPMGR)

Specifies which SNMP managers receive traps generated by this AS/400 system.

The possible values are:

*SAME
The value does not change.
*NONE
No SNMP managers receive traps.

Element 1: Manager Internet Address

manager-internet-address
Specify the internet address of the SNMP manager. The address must be of the form nnn.nnn.nnn.nnn, where nnn is a decimal number ranging from 0 to 255. This address is independent of the manager internet address specified on the ADDCOMSNMP and CHGCOMSNMP commands.

Element 2: Community Name

community-name
Specify the SNMP community name to be placed in the traps sent to this SNMP manager. The community name specified in this element is independent of the community name specified on the ADDCOMSNMP, CHGCOMSNMP, and RMVCOMSNMP commands. The name may contain characters that cannot be displayed.

Element 3: Translate Community Name

*YES
The community name is translated to ASCII characters when a trap is sent to the SNMP manager. This value should be specified when the community name consists entirely of characters that can be displayed. An error message is sent if the community name cannot be translated to ASCII characters.
*NO
The community name is not translated to ASCII characters when a trap is sent to the SNMP manager. This value should be specified when the community name contains one or more characters that cannot be displayed.
Top

Examples

Example 1: Changing System Contact and Automatic Start

CHGSNMPA   SYSCONTACT('JOE SMITH, PHONE 555-1212')
           AUTOSTART(*NO)

This command changes the system contact information and specifies that the SNMP agent should not start when the STRTCP command runs. All other values are unchanged.

Example 2: Changing Trap Managers

CHGSNMPA   TRPMGR(('9.8.7.6' 'TRAPCOMMUNITY')
                  ('9.8.7.5' 'TRAPCOMMUNITY2'))

This command causes any traps generated by the local iSeries 400 to be sent to SNMP managers that have internet protocol addresses 9.8.7.6 and 9.8.7.5. Community name TRAPCOMMUNITY is placed in traps sent to 9.8.7.6, and community name TRAPCOMMUNITY2 is placed in traps sent to 9.8.7.5. For both managers the community name is translated to ASCII characters before being placed in the trap.

Top

Error messages

*ESCAPE Messages

TCP4001
Error occurred accessing SNMP configuration information.
TCP8050
*IOSYSCFG authority required to use &1.
Top