상세 컨텐츠

본문 제목

[Cisco Switch] Filter logging (%ADJ-5-RESOLVE_REQ_FAIL)

카테고리 없음

by Keunwoo.LEE 2024. 2. 15. 02:25

본문

반응형

배경

  • 특정 로그가 불필요하게 많이 발생해서 해당 로그를 남기지 않도록 조치가 필요함
  • "%ADJ-5-RESOLVE_REQ_FAIL: Adj resolve request failed for x.x.x.x on Vlan211" 이 로그를 제거 필요
  • 위 로그는 버그성 로그로 "no ip cef optimize neighbor resolution" 명령어로 조치가 가능하나 해당 명령어가 정확이 어떤 임팩트가 있는지 확실하지 않아 로그를 필터링 하기로 함

작업 방법

  • "logging discriminator" 명령어로 필터링할 로그를 정의
  • "logging buffer" 또는 "logging host"에 위에서 정의한 필터를 적용

제거 대상 로그

36331: Feb 14 21:29:14: %ADJ-5-RESOLVE_REQ_FAIL: Adj resolve request failed for x.x.x.x on Vlan211

 

Cisco ISO log format

seq no: timestamp: %facility-severity-MNEMONIC: description

 

작업

  • ISO log format을 참고하여 discriminator 작성
  • 작성한 discriminator를 원하는 logging type에 적용

ISO Log Format

아래 설정은 정의한 여러값중 하나라도 일치하면 drop을 하게됨

  • 예를들어 "severity"가 "5" 인 로그는 모두 drop
  • "facility"가 "ADJ" 이면 모두 drop
  • check 순서 (Severity -> Facility -> Mnemonic -> Msg-body)
logging discriminator NOLOG severity drops 5 facility drops ADJ mnemonics drops RESOLVE_REQ_FAIL msg-body drops Adj
logging buffered discriminator NOLOG
logging host x.x.x.x discriminator NOLOG

 

아래와 같이 수정

logging discriminator NoLog mnemonics drops RESOLVE_REQ_FAIL 
logging buffered discriminator NoLog
logging host x.x.x.x discriminator NoLog

확인

Switch#sh log
Syslog logging: enabled (0 messages dropped, 1 messages rate-limited, 0 flushes, 0 overruns, xml disabled, filtering disabled)

Active Message Discriminator:
NoLog     mnemonics      drops    RESOLVE_REQ_FAIL

Inactive Message Discriminator:
NOLOG     severity group drops    5
          facility       drops    ADJ
          mnemonics      drops    RESOLVE_REQ_FAIL
          msg-body       drops    Adj
반응형

댓글 영역