관리 메뉴

IT & Life

Docker 및 Kubernetes에 대한 Prometheus 모니터링의 새로운 기능 본문

IT 관련 정보

Docker 및 Kubernetes에 대한 Prometheus 모니터링의 새로운 기능

미운앙마 2017. 11. 11. 02:39


Prometheus 2.0 컨테이너 모니터링 시스템은보다 효율적인 시계열 데이터 저장 형식, 오래된 이벤트 데이터 처리 및 스냅 샷 기반 데이터베이스 백업과 함께 제공됩니다.

Prometheus 2.0 container monitoring system arrives with a more efficient time-series data storage format, better handling of stale event data, and snapshot-based database backups

 


클라우드 아키텍처에서 실행되는 Docker 스타일 컨테이너 용 오픈 소스 모니터링 시스템 인 Prometheus 는 성능을 향상시키기 위해 아키텍처를 크게 변경 한 2.0 버전을 정식으로 출시했습니다.

Prometheus, the open source monitoring system for Docker-style containers running in cloud architectures, has formally released a 2.0 version with major architectural changes to improve its performance.

 

 

올해 초 1.6 버전의 릴리스 이후에 변경된 사항은 다음과 같습니다.

Among the changes that have landed since the release of version 1.6 earlier this year:

 

 

- Prometheus에 의해 축적 된 데이터를위한 완전히 새로운 저장 형식.

  An entirely new storage format for the data accumulated by Prometheus.


- Prometheus가보고 한 데이터가 클러스터의 실제 상태와 일치하지 않을 때 발생하는 문제와 같은 "staleness"를 처리하기위한 새로운 방법.

  A new way for Prometheus to handle “staleness,” i.e. problems resulting when data reported by Prometheus doesn’t match the actual state

  of the cluster.


- 전체 데이터베이스의 효율적인 스냅 샷 백업을 수행하는 방법.

  A method for taking efficient snapshot backups of the entire database.

 


변경 사항의 대부분은 숙련 된 Prometheus 사용자가 자신의 환경을 개선하도록 강요해서는 안됩니다. 새로운 기능은 몇 가지 중요한 변경 사항이 있지만 ( 여기에 문서화 되어 있음) 워크 플로우를 크게 변경하지 않고도 작업 할 수 있습니다 .

Most of the changes shouldn’t force experienced Prometheus users to retool their environments. The new features are meant to work under the hood, without significantly altering workflow, although there are a few breaking changes (documented here).

 


Prometheus 2.0의 새로운 기능 :보다 효율적인 시계열 데이터베이스 저장 형식

New in Prometheus 2.0: More efficient time-series database storage format

 

 

후드 아래에서 프로 메테우스는 실행중인 컨테이너에 대한 통계를 수집하고 타임 스탬프로 인덱싱 된 방식으로 저장하는 데 사용되는 시계열 데이터베이스입니다. 시계열 데이터는 고속으로 많은 소스에서 도착하므로 적절하게 집계하기가 어렵습니다. 데이터를 디스크에 기록하는 것은 큰 병목이됩니다.

Under the hood, Prometheus is a time-series database—a system for gathering statistics about running containers and storing them in a way that’s indexed by timestamps. Because time-series data arrives at high speed and from many sources, it’s hard to aggregate properly. Writing the data to disk becomes a major bottleneck.

 

 

Prometheus 2.0 은 데이터 소스가 아니라 시간 범위별로 데이터 를 분할 하여이 문제를 해결합니다 . 결과적으로 CPU 및 디스크 사용량이 훨씬 줄어들고 쿼리 대기 시간이 늘어나고 더 이상 필요없는 데이터를 정리할 수있는 더 좋은 메커니즘이 생깁니다.

Prometheus 2.0 addresses this by partitioning the data by ranges of time, rather than by data source. The result is far less CPU and disk usage, more manageable latency for queries, and a better mechanism for mopping up data that isn’t needed anymore.

 

 

다시 말하지만, 대부분의 Prometheus 배포에서는 Prometheus 2.0을 배포하는 것 이외에 이러한 개선 사항을 활용할 수있는 아무 것도 할 필요가 없습니다.

Again, the vast majority of Prometheus deployments won’t need to do anything to leverage these improvements, other than deploy Prometheus 2.0.

 

 

Prometheus 2.0의 새로운 기능 : 컨테이너의 부실 데이터 처리 개선

New in Prometheus 2.0: Better handling of stale data from containers

 

 

Prometheus 사용자가 관찰 한 또 다른 문제점은 시스템이 오래된 데이터를 처리하는 데 문제가있는 것입니다. 예를 들어 사용자는 서비스가 이미 종료 된 후에도 서비스가 중단되었다는 경고를받는 경우가 있습니다. 또 다른 문제는 리소스가 모니터링에서 사라지고 특정 시간대 내에 다시 나타나면 결국 두 번 카운트되고 오해의 소지가있는 통계를 생성 할 수 있다는 것입니다.

Another problem Prometheus users have observed is how the system has trouble handling stale data. For instance, users sometimes get bombarded with alerts about a service being down, even after that service has already come back up. Another problem is if a resource disappears from monitoring and then reappears within a certain timefrane, it can end up being counted twice and produce misleading statistics.

 

 

Prometheus 2.0은 오래된 소스에서 이벤트를 처리하는 데보다 명확한 규칙을 적용함으로써이를 처리합니다. 이 문제를 처리하는 논리는 놀라 울 정도로 복잡합니다 ( 자세한 내용은이 슬라이드 데크 참조 ). 최종 사용자는 대다수의 세부 사항을 다룰 필요가 없습니다.

Prometheus 2.0 deals with this by having more explicit rules for handling events from sources that have gone stale. The logic for handling this is surprisingly complex (see this slide deck for details), but the end user doesn’t have to deal with the vast majority of the details.

 

 

Prometheus 2.0의 새로운 기능 : 전체 데이터베이스 스냅 샷 백업

New in Prometheus 2.0: Full database snapshot backups

 

 

Prometheus 2.0의 새로운 스토리지 엔진은 데이터베이스의 효율적인 특정 시점 (point-in-time) 스냅 샷을 생성 할 수있게합니다. 스냅 샷을 트리거하는 것은 특정 Prometheus API 엔드 포인트를 누르는 것만 큼 간단합니다.

The new storage engine in Prometheus 2.0 makes it possible to take efficient point-in-time snapshots of the database. Triggering a snapshot is as simple as hitting a specific Prometheus API endpoint.

 

 

Prometheus 개발자 인 Fabian Reinartz에 따르면 이러한 스냅 샷은 전체 데이터베이스의 크기에 비해 일부만 작으며 저장을 위해 어딘가에 복사 할 수 있습니다. Reinartz는 디스크 장애 나 다른 시나리오에서 새로운 Prometheus 서버를 데이터 손실을 최소화하면서 스냅 샷 백업으로 시작할 수 있다고 말합니다.

According to Prometheus developer Fabian Reinartz, those snapshots are small—a fractional percentage of the size of the whole database—and can be copied somewhere for safekeeping. “On disk failure or other scenarios, new Prometheus servers can be started with the snapshot backup with minimal data loss,” says Reinartz.

 

 

프로 메테우스 다운로드 데모

Prometheus download

 

 

미리 컴파일 된 바이너리와 Docker 이미지는 공식 Prometheus 프로젝트 페이지에서 다운로드 할 수 있습니다 . 프로젝트 및 모든 관련 하위 프로젝트의 소스 코드는 GitHub에서 사용할 수 있습니다.

Precompiled binaries and Docker images are available for download from the official Prometheus project page. Source code for the project, and all its related subprojects, is available on GitHub.

Comments