Go to main content
Oracle® VM Server for SPARC 3.4 Management Information Base 사용 설명서

인쇄 보기 종료

업데이트 날짜: 2016년 5월
 
 

트랩을 전송하는 방법

  1. 트랩을 구성합니다.

    /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를 시작하십시오.
예 4  SNMP v1v2c 트랩 전송

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

trapcommunity public
trapsink localhost
trap2sink localhost