본문 바로가기
Programming/Performance

Performance, Nagios check 주기 변경

by ★용호★ 2014. 11. 18.

Nagios를 통해 테스트를 하다보니 실제 문제가 발생한 시점보다 Nagios가 체킹하는 시간이 너무 늦었던 문제가 있었다.

서버에서 문제가 발생한 시점을 바로바로 알 수 있도록 하는 것이 중요하므로 설정 값에 체킹 주기 관련된 부분이 당연히 있을 것으로 생각하고 찾아보았다.


가장 먼저 service에 관련된 설정값을 확인 해보니 시간 관련된 값들이 눈에 보였다.


define service{ use srv-pnp name generic-service ; The 'name' of this service template active_checks_enabled 1 ; Active service checks are enabled passive_checks_enabled 1 ; Passive service checks are enabled/accepted parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems) obsess_over_service 1 ; We should obsess over this service (if necessary) check_freshness 0 ; Default is to NOT check service 'freshness' notifications_enabled 1 ; Service notifications are enabled event_handler_enabled 1 ; Service event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled failure_prediction_enabled 1 ; Failure prediction is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts notification_interval 60 ; Only send notifications on status change by default. is_volatile 0 check_period 24x7 normal_check_interval 5 retry_check_interval 1 max_check_attempts 4 notification_period 24x7 notification_options w,u,c,r,f,s contact_groups admins register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! }


나에게는 notification_interval과 check_period, normal_check_interval이 현재 필요한 설정 값 들이었다.


notification_interval

 알림(메일,SMS 등) 주기, 문제가 해결되지 않을 경우 메일 재발송 주기를 의미한다.

1 = 60초 ,  현재 기본값으로 60이 셋팅 되어 있으므로 1시간 주기로 메일 발송한다.


check_period

 기본값은 24x7, timeperiod_nagios2.cfg파일을 보면 24x7의 정의를 볼 수 있다. (24시간 항상 체킹)


normal_check_interval

 커맨드를 통한 체킹 주기, 기본값은 5로 되어 있으며 마찬가지로 1 = 60초이다.



기본 값으로 normal_check_interval 값이 5로 셋팅되어 있었는데 조금 더 빠른 반응을 위해 1로 변경 후 사용했다.

댓글