골방잡담

[서버 모니터링] Zabbix Maintenance 기능 이해 본문

PC방에서/개인프로젝트

[서버 모니터링] Zabbix Maintenance 기능 이해

sisu_ 2021. 3. 20. 18:30

Zabbix Maintenance 기능에 대한 이해를 하기 위해, 공식문서를 보고 정리해보았다. 

 

 

Maintenance는 data collection을 하는 타입과, 하지 않는 타입 두 개가 있다. 

maintenance 설정 시 data collection 여부 선택 가능

 

1) data collection 하는 경우 

평소와 동일하게 trigger가 수행되고, 이벤트가 생성이 된다.

단, "Pause operations for suppressed problems*" 옵션이 선택되어 있다면 (이건 action configuration에서 할 수 있다) problem으로 승격되지 않는다. 이 경우, problem에 대한 노티나 커맨드들은 maintenance 기간 동안 무시 된다. 

단, problem 승격만 무시될 뿐이지 problem recovery나 update operations는 maintenance 동안에도 수행이 된다. 

 

예를 들면, 만약 problem 승격이 problem 시작 0, 30, 60분 으로 스케줄링이 되어 있는데, 10~40분 동안 maintenance를 걸어두었다면, 만약 maintenance 기간이 끝난 후에도 problem이 유지된다면 30분/60분 후 조치는 30분 후에 수행이 될 것이다. 

 

* 결국, maintenance 시간 동안 problem이 발생하면, maintenance가 끝난 시간에 problem으로 승격이 된다고 생각하면 될 듯 하다. (단, problem이 지속되었다는 가정 하에) 

* 만약 maintenance 시간 동안에도 노티를 계속 받고자 한다면, "Pause operations for suppressed problems" 체크 해제해야 한다. 

* 같은 trigger를 쓰는 host중 하나라도 maintenance 걸려있지 않다면, 노티가 갈 것이다. 

* maintenance 시간 동안 zabbix server가 running상태여야 한다. 매분 0초에 timer process들이 host의 status를 maintenance로 바꿔주는 것을 한다. maintenance가 시작되면, Zabbix server timer는 모든 problem들을 확인해서, suppress해야하는 것이 있는지 (maintenance걸린 것 때문에) 확인한다. 만약 problem이 많은 상태라면, 서응에 이슈가 생길 수 있다. 또한 maintenance가 없을 때 Zabbix server을 시작할 때에도 모든 problem을 읽어온다. 

 

2) no data collection의 경우

proxy를 사용한다면, maintenance 타입과 상관 없이 데이터를 무조건 수집하고, server가 무시하는 방식이다. 

no data maintenance가 끝나면, 다음 trigger check를 할 때 nodata() 함수를 사용하지 않는다. 

만약 maintenance 시간 동안 아이템이 추가되면, maintenance가 끝난 후부터의 logfile entries만 수집한다. 

 

 

*pause operations for suppressed problems 선택/선택해제 하는 곳 

- Configuration > Action > Operation 에서 선택 가능

 

* suppressed problems를 보는 방법!

- 설정을 해주면, maintenance 중인 host의 problem들을 볼 수 있음.

  (host 추가해서 trigger가 잘 되는지 테스트해볼 때 좋지 않을까 싶음)

- suppressed problems는 아래와 같이 보임

suppressed problem은 web에서 위와 같이 보임

- suppressed problems 설정 가능한 메뉴 : 

  • Monitoring  Dashboard (in Problem hosts, Problems, Problems by severity, Trigger overview widget configuration)
  • Monitoring  Problems (in the filter)

  • Monitoring  Overview (in the filter; with 'Triggers' as Type)
  • Monitoring  Maps (in map configuration)
  • Global notifications (in user profile configuration)

 

출처 : 11. Maintenance [Zabbix Documentation 5.2]

Comments