Configuring SNMP trap notifications
This topic describes how to configure SNMP trap notifications in the sender environment (Cloud Pak for Data System).
About this task
SNMP versions v1, v2c and v3 are available on Cloud Pak for Data System. You can set version when running ap config --set snmp with snmp_version and snmp_community parameters.
If you switch between versions 3 and 1 or 2c, the configuration parameters are preserved in the system.
You can also select between traps and informs with ap config --set snmp
--snmp_notification_type <trap|inform>:
- trap
- A trap is an SNMP message sent from one application to another (which is typically on a remote host) to notify the other application of an event. Traps are unacknowledged, that is, no confirmation is sent back.
- inform
- Informs are acknowledged traps, that is, when the remote application receives the inform, it sends back the confirmation.
[root@e1n1 ~]# ap config --list snmp
PySNMP is used for operating with TRAPs
Ip Address/Hostname : e1n3
Port : 33162
Version : 3
Community :
Engine Id : 8000000201099E8F1E
Security Level : 2
Security Name : sha-aes-trap
Authentication Key : ***
Authentication Protocol : 2
Encryption Key : ***
Encryption Protocol : 2
[root@e1n1 ~]#
[root@e1n1 ~]# ap config --list snmp
Net-SNMP is used for operating with INFORMs
Ip Address/Hostname : e1n3
Port : 33162
Version : 3
Community :
Engine Id :
Security Level : 2
Security Name : sha-aes-inform
Authentication Key : ***
Authentication Protocol : 2
Encryption Key : ***
Encryption Protocol : 2
[root@e1n1 ~]#
You use the ap config --set snmp command to set the required parameters:
- SNMP version --snmp_versionIf snmp_version is set to 1 or 2, you also have to set the following parameters:
- snmp_community
- snmp_ip_address
- snmp_port
If snmp_version is set to 3, you also have to set following parameters:- snmp_engine_id
- snmp_security_name
- snmp_security_level
- snmp_auth_protocol
- snmp_auth_key
- snmp_enc_protocol
- snmp_enc_key
- snmp_ip_address
- snmp_port
- SNMP driver --snmp_driver
- netsnmp (default)
- pysnmp
- SNMP type --snmp_notification_type
- trap (default)
- inform
- SNMP community --snmp_community
- security name --snmp_security_name
- IPv4 address --snmp_ip_address
- remote port --snmp_port
- SNMP engine id --snmp_engine_id
- security level --snmp_security_level - accepted values:
- 0 - noAuthNoPriv
- 1 - authNoPriv
- 2 - authPriv
- authentication protocol --snmp_auth_protocol - accepted values:
- 0 - None
- 1 - MD5
- 2 - SHA
- encryption protocol --snmp_enc_protocol - accepted values:
- 0 - None
- 1 - DES
- 2 - AES
- authentication passphrase --snmp_auth_key - must be at least 8 symbols long (see man snmpcmd 1)
- encryption passphrase --snmp_enc_key - must be at least 8 symbols long (see man snmpcmd 1)