콘텐츠로 이동

GreenPlum

Greenplum은 대규모 병렬 처리(MPP) 아키텍처를 기반으로 한 고성능, 고가용성 데이터베이스 시스템으로, 주로 대규모 데이터 세트를 처리하고 분석하는 데 사용됩니다. Greenplum은 데이터 웨어하우스, 비즈니스 인텔리전스, 빅데이터 분석과 같은 시나리오에 적합하며, 특히 PB급 데이터량을 처리해야 할 때 효율적인 데이터 저장 및 분석 능력을 제공합니다. Greenplum의 가시성에는 데이터베이스 성능 모니터링, 장애 감지 및 알림, 그리고 시스템 운영 상태의 시각화가 포함됩니다.

설치 및 설정

사전 조건

greenplum 5 또는 6 버전, 테스트된 버전:

  • 6.24.3

Exporter 설치

여기에서 greenplum exporter 를 다운로드하여 설치할 수 있습니다. 이 도구는 greenplum 지표를 prometheus 형식으로 노출하는 데이터 수집기이며, GP5와 GP6를 모두 지원합니다.

  • CentOS를 예로 들면, 시작 명령은 다음과 같습니다:
export GPDB_DATA_SOURCE_URL=postgres://gpadmin:password@10.17.20.11:5432/postgres?sslmode=disable
./greenplum_exporter --web.listen-address="0.0.0.0:9297" --web.telemetry-path="/metrics" --log.level=error
  • Docker로 실행하는 경우, 시작 명령은 다음과 같습니다:
docker run -d -p 9297:9297 -e GPDB_DATA_SOURCE_URL=postgres://gpadmin:password@10.17.20.11:5432/postgres?sslmode=disable inrgihc/greenplum-exporter:latest 

참고: 환경 변수 GPDB_DATA_SOURCE_URL은 Greenplum 데이터베이스 연결 문자열을 지정합니다(현재 postgres 데이터베이스에 gpadmin 계정으로 연결하세요). 이 연결 문자열은 postgres://로 시작하며, 구체적인 형식은 다음과 같습니다:

postgres://gpadmin:password@10.17.20.11:5432/postgres?sslmode=disable
postgres://[데이터베이스 연결 계정, 반드시 gpadmin]:[계정 비밀번호,  gpadmin의 비밀번호]@[데이터베이스 IP 주소]:[데이터베이스 포트 번호]/[데이터베이스 이름, 반드시 postgres]?[파라미터명]=[파라미터값]&[파라미터명]=[파라미터값] 

그런 다음 모니터링 지표 URL에 접속합니다: http://127.0.0.1:9297/metrics

추가 시작 파라미터:

usage: greenplum_exporter [<flags>]

Flags:
  -h, --help                   Show context-sensitive help (also try --help-long and --help-man).
      --web.listen-address="0.0.0.0:9297"  
                               web endpoint
      --web.telemetry-path="/metrics"
                               Path under which to expose metrics.
      --disableDefaultMetrics  do not report default metric
      (go metrics and process metrics)
      --version                Show application version.
      --log.level="info"       Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]
      --log.format="logger:stderr"  
                               Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true"

수집기 설정

호스트 설치

수집기 설정

greenplum exportermetrics URL을 직접 노출할 수 있으므로, prom 수집기를 통해 해당 URL을 직접 설정하여 수집할 수 있습니다. DataKit 설치 디렉터리의 conf.d/samples 디렉터리로 이동한 뒤, prom.conf.sample을 복사하여 greenplum.conf로 이름을 바꿉니다.

cp prom.conf.sample greenplum.conf

greenplum.conf 내용을 다음과 같이 조정합니다:

[[inputs.prom]]
  ## Exporter URLs.
  urls = ["http://127.0.0.1:9297/metrics"]
  ## Collector alias.
  source = "greenplum"
...

기타 설정은 필요에 따라 조정, 조정 파라미터 설명 :

  • urls: prom 지표 주소이며, 여기에는 greenplum이 노출하는 해당 지표 URL을 입력합니다. DataKit이 greenplum 호스트에 설치되어 있다면 기본값은 http://127.0.0.1:9297/metrics 입니다.
  • source: 데이터 소스이며, greenplum으로 수정하면 이후 지표 필터링이 편리합니다.
  • interval: 수집 간격

Datakit 재시작

Datakit 재시작

지표

GreenPlum 지표 세트

Metrics 설명 단위
cluster_state gp 도달 가능 상태 ?:1→ 사용 가능;0→ 사용 불가 boolean
cluster_uptime 시작 후 지속된 시간 s
cluster_max_connections 최대 연결 수 int
cluster_total_connections 현재 연결 수 int
cluster_idle_connections idle 연결 수 int
cluster_active_connections 활성 연결 수 int
cluster_running_connections 쿼리를 실행 중인 연결 수 int
cluster_waiting_connections 쿼리 실행을 기다리는 연결 수 int
node_segment_status segment 상태 int
node_segment_role segment의 role 역할 int
node_segment_mode segment의 mode int
node_segment_disk_free_mb_size segment 호스트의 남은 디스크 공간 크기(MB) MB
cluster_total_connections_per_client 각 클라이언트의 total 연결 수 int
cluster_idle_connections_per_client 각 클라이언트의 idle 연결 수 int
cluster_active_connections_per_client 각 클라이언트의 active 연결 수 int
cluster_total_online_user_count 온라인 계정 수 int
cluster_total_client_count 현재 모든 연결의 클라이언트 수 int
cluster_total_connections_per_user 각 계정의 total 연결 수 int
cluster_idle_connections_per_user 각 계정의 idle 연결 수 int
cluster_active_connections_per_user 각 계정의 active 연결 수 int
cluster_config_last_load_time_seconds 시스템 설정 로드 시간 s
node_database_name_mb_size 각 데이터베이스가 차지하는 저장 공간 크기 MB
node_database_table_total_count 각 데이터베이스 내 테이블 총 개수 int
exporter_total_scraped 성공적으로 수집(scrape)된 지표 수 int
exporter_total_error 총 오류 수 int
exporter_scrape_duration_second 수집 데이터 지속 시간 s
server_users_name_list 총 사용자 수 int
server_users_total_count 사용자 상세 int
server_locks_table_detail 잠금 정보 int
server_database_hit_cache_percent_rate 캐시 적중률 float
server_database_transition_commit_percent_rate 트랜잭션 커밋률 float
server_database_table_bloat_list 데이터 팽창 목록 int
server_locks_table_detail 잠금 정보 int

문서 평가

이 페이지가 도움이 되었나요?