Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1936975.1
Update Date:2017-05-18
Keywords:

Solution Type  Technical Instruction Sure

Solution  1936975.1 :   SL500/SL3000/SL8500 - Example to Configure NET-SNMP Service to Receive SL Library SNMP Traps  


Related Items
  • Sun StorageTek SL3000 Modular Library System
  •  
  • Sun StorageTek SL500 Modular Library System
  •  
  • Sun StorageTek SL8500 Modular Library System
  •  
Related Categories
  • PLA-Support>Sun Systems>TAPE>Tape Hardware>SN-TP: SL500 Library
  •  




In this Document
Goal
Solution
References


Applies to:

Sun StorageTek SL500 Modular Library System - Version All Versions and later
Sun StorageTek SL3000 Modular Library System - Version All Versions and later
Sun StorageTek SL8500 Modular Library System - Version All Versions and later
Linux x86-64

Goal

 An example to configure SNMP Manager to receive SNMP Traps, and show how to load MIBs to SNMP Manager.

Solution

USED PLATFORM AND APPLICATION:

Library Used: SL500 Library
Server: Sun Fire x4200(x64)
OS: Oracle Linux 6.5
SNMP Daemon: net-snmp-5.5
Installed net-snmp rpm:

net-snmp-5.5-49.0.1.el6.x86_64
net-snmp-utils-5.5-49.0.1.el6.x86_64
net-snmp-libs-5.5-49.0.1.el6.x86_64
lm_sensors-libs-3.1.1-17.el6.x86_64

Step One: Add snmp trap recipient from SL500 Library
(Related documents 1540583.1, 1536503.1, 1554057.1 added to reference links)

  • - add trap recipient for v2c

SERVICE>> snmp addTrapRecipient trapLevel 1,2,3,11 host <hostName | hostAddr> version v2c community public
   requestId
   requestId    11
   Device       1,0,0,0
   Success      true
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>
SERVICE>> snmp listTrapRecipients
   requestId
   requestId    12
   Attributes  Community  public
               Host       <hostName | hostAddr>
               Index      1
               Port       162
               Trap Level 1,2,3,11
               Version    v2c
   Object      Snmp       snmp
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>

  • - add snmp user for v2c

SERVICE>> snmp addUser version v2c community public
   requestId
   requestId    17
   Device       1,0,0,0
   Success      true
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>
SERVICE>> snmp listUsers
   requestId
   requestId    18
   Attributes  Community  public
               Index      1
               Version    v2c
   Object      Snmp       snmp
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>

  • - add trap recipient for v3

SERVICE>>
SERVICE>> snmp engineId
snmp engine ID:0x80001f880439303030313033333630
OK
SERVICE>>
SERVICE>> snmp addTrapRecipient trapLevel 1,2,3,11 host <hostName | hostAddr> version v3 name v3admin auth MD5 authPass <authPassPhrase> priv DES privPass <privPassPhrase> engineId 0x80001f880439303030313033333630
   requestId
   requestId    22
   Device       1,0,0,0
   Success      true
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>
SERVICE>> snmp listTrapRecipients
   requestId
   requestId    24
   Attributes  Community  public
               Host       <hostName | hostAddr>
               Index      1
               Port       162
               Trap Level 1,2,3,11
               Version    v2c
   Object      Snmp       snmp
   Attributes  Auth       MD5
               AuthPass   *****
               Engine Id  0x80001f880439303030313033333630
               Host       <hostName | hostAddr>
               Index      2
               Name       v3admin
               Port       162
               Priv       DES
               Priv Pass  *****
               Trap Level 1,2,3,11
               Version    v3
   Object      Snmp       snmp
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>

  • - add snmp user for v3

SERVICE>> snmp addUser version v3 name v3admin auth MD5 authPass <authPassPhrase> priv DES privPass <privPassPhrase>
   requestId
   requestId    21
   Device       1,0,0,0
   Success      true
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>
SERVICE>> snmp listUsers
   requestId
   requestId    23
   Attributes  Community  public
               Index      1
               Version    v2c
   Object      Snmp       snmp
   Attributes  Auth       MD5
               AuthPass   *****
               Index      2
               Name       v3admin
               Priv       DES
               Priv Pass  *****
               Version    v3
   Object      Snmp       snmp
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>

  • - enable snmp

SERVICE>> snmp enable port1B
   requestId
   requestId    19
   Device       1,0,0,0
   Success      true
   Done
   Failure Count 0
   Success Count 1
COMPLETED
OK
SERVICE>>

Step Two: From SNMP Manager, Configure snmptrapd to receive traps

  • - check and enable snmptrapd service

[root@sfx4200 ~]# service snmptrapd status
snmptrapd is stopped
[root@sfx4200 ~]#
[root@sfx4200 ~]# service snmptrapd start
Starting snmptrapd: [ OK ]
[root@sfx4200 ~]#
[root@sfx4200 ~]# service snmptrapd status
snmptrapd (pid 2726) is running...
[root@sfx4200 ~]#
[root@sfx4200 ~]# chkconfig --list | grep snmp
snmpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
snmptrapd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@sfx4200 ~]#
[root@sfx4200 ~]# chkconfig snmptrapd on
[root@sfx4200 ~]#
[root@sfx4200 ~]# chkconfig --list | grep snmp
snmpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
snmptrapd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@sfx4200 ~]#

  • - add snmptrapd user to receive snmp traps

[root@sfx4200 ~]# service snmptrapd stop
Stopping snmptrapd: [ OK ]
[root@sfx4200 ~]#
[root@sfx4200 ~]# pwd
/var/lib/net-snmp
[root@sfx4200 ~]#
[root@sfx4200 ~]# vi snmptrapd.conf

createUser -e 0x80001f880439303030313033333630 v3admin MD5 "cangetin" DES "cangetin"

[root@sfx4200 ~]# cd
[root@sfx4200 ~]#
[root@sfx4200 ~]# vi /etc/snmp/snmptrapd.conf
authCommunity log public <- accept SNMP v2c traps
authUser log v3admin <- accept SNMP v3 traps
[root@sfx4200 ~]#
[root@sfx4200 ~]# service snmptrapd start
Starting snmptrapd: [ OK ]
[root@sfx4200 ~]#

  • - check received snmptraps from messages

[root@sfx4200 ~]# tail /var/log/messages
Jul 18 16:58:36 sfx4200 snmptrapd[28244]: 2014-07-18 16:58:36 bjtape-sl500a.cn.oracle.com [UDP: [xxx.xxx.xxx.xxx]:1027->[xxx.xxx.xxx.xxx]]:
#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (380761106) 44 days, 1:40:11.06
#011SNMPv2-MIB::snmpTrapOID.0 = OID: SNMPv2-SMI::enterprises.1211.1.15.0.1
#011SNMPv2-SMI::enterprises.1211.1.15.2.1 = STRING: "559000103360"
#011SNMPv2-SMI::enterprises.1211.1.15.2.2 = STRING: "RLC 74008296"
#011SNMPv2-SMI::enterprises.1211.1.15.2.3 = STRING: "2014-07-18T17:12:55.469"
#011SNMPv2-SMI::enterprises.1211.1.15.2.4 = STRING: "0.0.0.0.0"
#011SNMPv2-SMI::enterprises.1211.1.15.2.5 = STRING: "default"
#011SNMPv2-SMI::enterprises.1211.1.15.2.6 = STRING: "sensor-m"
#011SNMPv2-SMI::enterprises.1211.1.15.2.7 = STRING: "internal"
#011SNMPv2-SMI::enterprises.1211.1.15.2.8 = STRING: "0"
#011SNMPv2-SMI::enterprises.1211.1.15.2.9 = STRING: "error"
#011SNMPv2-SMI::enterprises.1211.1.15.2.10 = STRING: "8003"
#011SNMPv2-SMI::enterprises.1211.1.15.2.13 = STRING: "2014-07-18T17:12:55.469, 0.0.0.0.0, 000, sensor-manager, , error, 0000, 8003, SensorPowerFuncs: doPwrSupplyState - Module 1 Power Supply 1 is not operational"

Step Three: Adding MIB to SNMP Manager

  • - download mib from SL Console

(Related documents 1631502.1 How to Obtain the Management Information Base / MIB Using SL Console)

  • - snmptrapd to load third party(STREAMLINE-TAPE-LIBRARY-MIB) mibs

[root@sfx4200 ~]# cd /usr/share/snmp
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# pwd
/usr/share/snmp
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# mkdir vendormibs
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# cp SL500_MIB.txt vendormibs/
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# ls -l vendormibs
total 188
-rw-r--r--. 1 root root 192365 Jul 21 16:43 SL500_MIB.txt
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# vi /etc/sysconfig/snmptrapd

OPTIONS="-Lsd -p /var/run/snmptrapd.pid -M /usr/share/snmp/mibs:/usr/share/snmp/vendormibs -m all "

[root@sfx4200 snmp]#
[root@sfx4200 snmp]# service snmptrapd stop
Stopping snmptrapd: [ OK ]
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# service snmptrapd start
Starting snmptrapd: [ OK ]
[root@sfx4200 snmp]#
[root@sfx4200 snmp]# tail /var/log/messages
Jul 21 16:47:10 sfx4200 snmptrapd[14493]: 2014-07-21 16:47:10 bjtape-sl500a.cn.oracle.com [UDP: [xxx.xxx.xxx.xxx]:1027->[xxx.xxx.xxx.xxx]]:
#012DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (406613082) 47 days, 1:28:50.82
#011SNMPv2-MIB::snmpTrapOID.0 = OID: STREAMLINE-TAPE-LIBRARY-MIB::slTrapError
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapLibrarySerialNumber = STRING: "559000103360"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceId = STRING: "RLC 74008296"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceTime = STRING: "2014-07-21T17:01:35.229"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceAddress = STRING: "0.0.0.0.0"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceUserName = STRING: "default"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceInterfaceName = STRING: "sensor-m"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceActivity = STRING: "internal"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceRequestId = STRING: "0"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceSeverity = STRING: "error"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceResultCode = STRING: "8003"
#011STREAMLINE-TAPE-LIBRARY-MIB::slTrapDeviceFreeFormText = STRING: "2014-07-21T17:01:35.229, 0.0.0.0.0, 000, sensor-manager, , error, 0000, 8003, SensorPowerFuncs: doPwrSupplyState - Module 1 Power Supply 1 is not operational"

References

<NOTE:1536503.1> - SL500/SL3000/SL8500 - How to Configure SNMP v2x via CLI on Tape Libraries
<NOTE:1554057.1> - SL500 - How to Configure SNMP V2c / V3 via SLConsole
<NOTE:1540583.1> - SL500/SL3000/SL8500 - How to Configure Trap Recipients on SNMP v2c for Tape Libraries
<NOTE:1631502.1> - SL8500/SL3000 - How to Obtain the Management Information Base / MIB Using SL Console

Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback