Oracle® VM Server for SPARC 3.2 관리 설명서

인쇄 보기 종료

업데이트 날짜: 2015년 5월
 
 

Oracle VM Server for SPARC MIB 모듈 트랩 사용

Oracle Solaris 11 MIB는 Oracle Solaris 10 MIB에서 제공하는 것과 동일한 SNMP 트랩을 제공합니다. 하지만 net-snmp 버전은 서로 다르며, 서로 다른 방식으로 구성되어야 합니다. Oracle Solaris 10 MIB에서 snmptrapd는 들어오는 모든 알림을 수락하고 자동으로 기록합니다. Oracle Solaris 11 MIB에서는 들어오는 알림에 액세스 제어 검사가 적용됩니다. snmptrapd가 적합한 구성 파일 없이 실행되거나 동등한 액세스 제어 설정으로 실행되는 경우 이러한 트랩은 처리되지 않습니다. snmptrapd.conf(4) 또는 snmptrapd.conf(5) 매뉴얼 페이지를 참조하십시오.

트랩을 전송하는 방법

  1. 트랩을 구성합니다.
    • Oracle Solaris 10:

      /etc/sma/snmp/snmpd.conf 파일을 편집하여 트랩, 정보 버전, 대상을 정의하는 지시어를 추가합니다.

      trapcommunity string --> define community string to be used when sending traps
      trapsink host[community [port]] --> to send v1 traps
      trap2sink host[community [port]] --> to send v2c traps
      informsink host[community [port]] --> to send informs

      자세한 내용은 snmpd.conf(4) 또는 snmpd.conf(5) 매뉴얼 페이지를 참조하십시오.

    • Oracle Solaris 11:

      /etc/net-snmp/snmp/snmpd.conf SNMP 구성 파일을 편집하여 트랩, 정보 버전 및 대상을 정의하는 지시어를 추가합니다.

      pfedit 명령을 사용하여 /etc/net-snmp/snmp/snmpd.conf 파일을 편집해야 합니다.

      trapcommunity string --> define community string to be used when sending traps
      trapsink host[community [port]] --> to send v1 traps
      trap2sink host[community [port]] --> to send v2c traps
      informsink host[community [port]] --> to send informs

      자세한 내용은 snmpd.conf(4) 또는 snmpd.conf(5) 매뉴얼 페이지를 참조하십시오.

      예를 들어, 다음 지시어는 트랩을 보낼 때 public 문자열을 커뮤니티 문자열로 사용하고 v1 트랩은 localhost 대상으로 전송됨을 나타냅니다.

      trapcommunity public
      trapsink localhost
  2. /usr/etc/snmp/snmptrapd.conf SNMP trapd 구성 파일을 만들거나 편집하여 액세스 제어 설정을 구성합니다.

    pfedit 명령을 사용하여 /etc/net-snmp/snmp/snmpd.conf 파일을 편집해야 합니다.

    다음 예에서는 트랩 전송 권한을 부여받은 사람(public) 및 들어오는 트랩을 처리하는 방법(log,execute,net)을 보여줍니다. snmptrapd.conf(4) 또는 snmptrapd.conf(5) 매뉴얼 페이지를 참조하십시오.

    authCommunity log,execute,net public
  3. SNMP 트랩 메시지를 받으려면 SNMP 트랩 데몬 유틸리티 snmptrapd를 시작하십시오.
예 20-4  SNMP v1v2c 트랩 전송

이 예제는 v1v2c 트랩을 동일한 호스트에서 실행되는 SNMP 트랩 데몬으로 전송합니다. 다음 지시어로 Oracle Solaris 10 /etc/sma/snmp/snmpd.conf 파일 또는 Oracle Solaris 11 /etc/net-snmp/snmp/snmpd.conf 파일을 업데이트하십시오.

trapcommunity public
trapsink localhost
trap2sink localhost

트랩을 수신하는 방법

  • SNMP 트랩 데몬 유틸리티를 시작합니다.
    • Oracle Solaris 10:

      출력 형식 옵션에 대한 내용은 snmptrapd(1M) 매뉴얼 페이지를 참조하십시오.

      snmptrapd 유틸리티는 SNMP TRAP 메시지를 수신하고 기록하는 SNMP 응용 프로그램입니다. 예를 들어, 다음 snmptrapd 명령은 이름 ldg2로(ldomName = ldg2) 새 도메인이 만들어졌음을(ldomTrapDesc = Ldom Created) 보여줍니다.

      # /usr/sfw/sbin/snmptrapd -P -F \
      "TRAP from %B on %m/%l/%y at %h:%j:%k Enterprise=%N Type=%w SubType=%q\n
      with Varbinds: %v\nSecurity info:%P\n\n" localhost:162
      TRAP from localhost on 5/18/2007 at 16:30:10 Enterprise=. Type=0 SubType=0
      with Varbinds: DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (47105)
      0:07:51.05 SNMPv2-MIB::snmpTrapOID.0 = OID: SUN-LDOM-MIB::ldomCreate
      SUN-LDOM-MIB::ldomIndexNotif = INTEGER: 3 SUN-LDOM-MIB::ldomName = STRING: ldg2
      SUN-LDOM-MIB::ldomTrapDesc = STRING: Ldom Created
      Security info:TRAP2, SNMP v2c, community public

      –F 옵션 인수 문자열은 가독성을 위해 두 행으로 분리되었습니다.

    • Oracle Solaris 11:

      출력 형식 옵션에 대한 내용은 snmptrapd(1M) 매뉴얼 페이지를 참조하십시오.

      snmptrapd 유틸리티는 SNMP TRAP 메시지를 수신하고 기록하는 SNMP 응용 프로그램입니다. 예를 들어, 다음 snmptrapd 명령은 이름 ldg2로(ldomName = ldg2) 새 도메인이 만들어졌음을(ldomTrapDesc = Ldom Created) 보여줍니다.

      # /usr/sbin/snmptrapd -f -Le -F \
      "TRAP from %B on %m/%l/%y at %h:%j:%k Enterprise=%N Type=%w SubType=%q\n
      with Varbinds: %v\nSecurity info:%P\n\n" localhost:162
      NET-SNMP version 5.4.1
      TRAP from localhost on 6/27/2012 at 12:13:48
      Enterprise=SUN-LDOM-MIB::ldomMIBTraps Type=6 SubType=SUN-LDOM-MIB::ldomCreate
      with Varbinds: SUN-LDOM-MIB::ldomIndexNotif = INTEGER: 3
      SUN-LDOM-MIB::ldomName = STRING: ldg2   SUN-LDOM-MIB::ldomTrapDesc = STRING:
      Ldom Created
      Security info:TRAP, SNMP v1, community public

      –F 옵션 인수 문자열은 가독성을 위해 두 행으로 분리되었습니다.