콘텐츠로 이동

Active Directory

설치 및 배포

설명: 예제 Active Directory exporter 버전은 0.24.0 (Windows)입니다

DataKit 수집기 활성화

  • DataKit Prom 플러그인을 활성화하고 sample 파일을 복사합니다
cd C:\Program Files\datakit\conf.d\samples
# prom.conf.sample을 prom.conf로 복사
  • prom.conf 구성 파일 수정
설정은 다음과 같습니다
[[inputs.prom]]
## Exporter URLs
urls = ["http://127.0.0.1:9182/metrics"]

## url 요청 오류 무시
ignore_req_err = false

## 수집기 별칭
source = "active_directory"

## 수집 데이터 출력 원본
# 이 항목을 설정하면 수집한 데이터를 중앙으로 보내지 않고 로컬 파일에 저장할 수 있습니다
# 이후 datakit --prom-conf /path/to/this/conf 명령으로 로컬에 저장된 메트릭 세트를 직접 디버깅할 수 있습니다
# url을 로컬 파일 경로로 설정한 경우, --prom-conf는 output 경로의 데이터를 우선 디버깅합니다
# output = "/abs/path/to/file"
> 
## 수집 데이터 크기 상한, 단위는 바이트
# 데이터를 로컬 파일로 출력할 때 수집 데이터 크기 상한을 설정할 수 있습니다
# 수집 데이터 크기가 이 상한을 넘으면 수집된 데이터는 버려집니다
# 수집 데이터 크기 상한의 기본값은 32MB입니다
# max_file_size = 0

## 메트릭 유형 필터, 선택 가능 값은 counter, gauge, histogram, summary
# 기본적으로 counter와 gauge 유형의 메트릭만 수집합니다
# 비어 있으면 필터링하지 않습니다
metric_types = ["counter", "gauge"]

## 메트릭 이름 필터
# 정규식을 지원하며, 여러 개를 설정할 수 있고 그중 하나만 만족해도 됩니다
# 비어 있으면 필터링하지 않습니다
# metric_name_filter = ["cpu"]

## 메트릭 세트 이름 접두사
# 이 항목을 설정하면 메트릭 세트 이름에 접두사를 추가할 수 있습니다
measurement_prefix = ""

## 메트릭 세트 이름
# 기본적으로 메트릭 이름은 밑줄 "_" 기준으로 분리되며, 첫 번째 필드를 메트릭 세트 이름으로, 나머지 필드를 현재 메트릭 이름으로 사용합니다
# measurement_name을 설정하면 메트릭 이름 분리는 수행하지 않습니다
# 최종 메트릭 세트 이름에는 measurement_prefix 접두사가 추가됩니다
# measurement_name = "prom"

## 수집 주기 "ns", "us" (or "µs"), "ms", "s", "m", "h"
interval = "10s"

## 태그 필터링, 여러 tag 설정 가능
# 일치하는 tag는 무시됩니다
# tags_ignore = ["xxxx"]

## TLS 설정
tls_open = false
# tls_ca = "/tmp/ca.crt"
# tls_cert = "/tmp/peer.crt"
# tls_key = "/tmp/peer.key"

## 사용자 정의 인증 방식, 현재는 Bearer Token만 지원
# token과 token_file: 둘 중 하나만 설정하면 됩니다
# [inputs.prom.auth]
# type = "bearer_token"
# token = "xxxxxxxx"
# token_file = "/tmp/token"

## 사용자 정의 메트릭 세트 이름
# prefix를 포함하는 메트릭을 하나의 메트릭 세트로 묶을 수 있습니다
# 사용자 정의 메트릭 세트 이름 설정이 measurement_name 설정보다 우선합니다
#[[inputs.prom.measurements]]
#  prefix = "cpu_"
#  name = "cpu"

# [[inputs.prom.measurements]]
# prefix = "mem_"
# name = "mem"

## 사용자 정의 Tags
[inputs.prom.tags]
  service = "active_directory"
# more_tag = "some_other_value"
  • DataKit 재시작 (로그를 활성화하려면, 로그 수집을 먼저 설정한 뒤 재시작하세요)
systemctl restart datakit
  • DQL 검증
[root@df-solution-ecs-018 prom]# datakit -Q

Flag -Q deprecated, please use datakit help to use recommend flags.

dqlcmd: &cmds.dqlCmd{json:false, autoJSON:false, verbose:false, csv:"", forceWriteCSV:false, dqlString:"", token:"tkn_9a49a7e9343c432eb0b99a297401c3bb", host:"0.0.0.0:9529", log:"", dqlcli:(*http.Client)(0xc0009a5800)}
dql > M::active_directory LIMIT 1
-----------------[ r1.active_directory.s1 ]-----------------

                   windows_ad_atq_average_request_latency 0
                           windows_ad_atq_current_threads 44
                      windows_ad_atq_outstanding_requests 0
                          windows_ad_ldap_client_sessions '1.0'
  windows_ad_replication_inbound_properties_updated_total '0.0'
                windows_ad_replication_pending_operations '0.0'
                                  .....

                                      windows_cs_hostname 2
                         windows_cs_physical_memory_bytes 0
                                                     time 2023-11-1 16:00:10 +0800 CST
                      windows_exchange_owa_requests_total 0
                          windows_exchange_rpc_user_count 0                                   
                              windows_exporter_build_info 0
                                                   uptime 2858680025
              windows_exporter_collector_duration_seconds 0
---------
1 rows, 1 series, cost 40.297037ms

지표 상세

Name Description 지표 의미 단위 차원
windows_ad_replication_pending_synchronizations Shows the number of directory synchronizations that are queued for this server but not yet processed. 이 서버에서 대기 중이지만 아직 처리되지 않은 디렉터리 동기화 수를 표시합니다. count host
windows_ad_replication_sync_requests_total Shows the number of sync requests made to neighbors. 인접 노드로 보낸 동기화 요청 수를 표시합니다. count host
windows_ad_replication_sync_requests_success_total Shows the number of sync requests made to the neighbors that successfully returned. 인접 노드로 보낸 동기화 요청 중 성공적으로 응답이 돌아온 횟수를 표시합니다. count host
windows_ad_ldap_active_threads Shows the current number of threads in use by the LDAP subsystem of the local directory service. 로컬 디렉터리 서비스의 LDAP 하위 시스템이 현재 사용 중인 스레드 수를 표시합니다. count host
windows_ad_ldap_last_bind_time_seconds Shows the time, in milliseconds, taken for the last successful LDAP bind. 마지막으로 성공한 LDAP 바인드에 걸린 시간(밀리초)을 표시합니다. count host
windows_ad_ldap_searches_total Shows the number at which LDAP clients perform search operations. LDAP 클라이언트가 수행한 검색 작업 수를 표시합니다. count host
windows_ad_ldap_writes_total Shows the number at which LDAP clients perform write operations. LDAP 클라이언트가 수행한 쓰기 작업 수를 표시합니다. count host
windows_ad_ldap_client_sessions This is the number of sessions opened by LDAP clients at the time the data is taken. 데이터를 수집한 시점에 LDAP 클라이언트가 연 세션 수입니다. count host
windows_ad_replication_inbound_sync_objects_remaining Shows the number of objects remaining before full synchronization is complete (at setup). 완전한 동기화가 완료되기 전(설정 시점)에 남아 있는 개체 수를 표시합니다. count host
windows_ad_replication_inbound_objects_updated_total Shows the number of objects received from neighbors through inbound replication. A neighbor is a domain controller from which the local domain controller replicates locally. 인바운드 복제를 통해 인접 도메인 컨트롤러로부터 수신한 개체 수를 표시합니다. 인접 항목은 로컬 도메인 컨트롤러가 로컬로 복제하는 도메인 컨트롤러입니다. count host
windows_ad_replication_inbound_objects_filtered_total Shows the number of objects received from inbound replication partners that contained no updates that needed to be applied. 적용해야 할 업데이트가 없는 인바운드 복제 파트너로부터 받은 개체 수를 표시합니다. count host

문서 평가

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