Processes

Supported OS Linux Mac OS Windows

통합 버전5.0.0

개요

Process 점검으로 다음을 수행할 수 있습니다.

  • 호스트에서 실행 중인 특정 프로세스에 대한 리소스 사용 메트릭을 수집합니다. 예를 들어 CPU, 메모리, I/O 및 스레드 수입니다.
  • Process Monitors를 사용하여 특정 프로세스의 인스턴스가 실행되어야 하는 개수에 대한 임계값을 구성하고 임계값에 도달하지 못할 때 경고를 받습니다(아래 Service Checks 참조).

설정

설치

Process 점검은 Datadog Agent 패키지에 포함되어 있으므로 서버에 다른 것을 설치할 필요가 없습니다.

구성

많은 점검과 달리 Process 점검은 기본적으로 유용한 것을 모니터링하지 않습니다. 따라서 모니터링하려는 프로세스를 구성해야 합니다.

표준화된 기본 구성은 없지만 SSH/SSHD 프로세스를 모니터링하는 예시 process.d/conf.yaml는 다음과 같습니다. 사용 가능한 모든 구성 옵션은 샘플 process.d/conf.yaml을 참조하세요.

init_config:
instances:
  - name: ssh
    search_string:
      - ssh
      - sshd

참고: 구성을 변경한 후에는 Agent를 다시 시작해야 합니다.

일부 프로세스 메트릭을 검색하려면 Datadog 컬렉터를 모니터링된 프로세스 사용자로 실행하거나 권한이 있는 액세스로 실행해야 합니다. Unix 플랫폼의 open_file_descriptors 메트릭의 경우 추가 구성 옵션이 있습니다. conf.yaml 파일에서 try_sudotrue로 설정하면 Process 점검에서 sudo를 사용하여 open_file_descriptors 메트릭을 수집할 수 있습니다. 이 구성 옵션을 사용하려면 /etc/sudoers에서 적절한 sudoers 규칙을 설정해야 합니다.

dd-agent ALL=NOPASSWD: /bin/ls /proc/*/fd/

검증

Agent의 상태 하위 명령을 실행하고 Checks 섹션에서 process를 찾습니다.

메트릭 참고 사항

다음 메트릭은 Linux 또는 macOS에서 사용할 수 없습니다.

  • Agent가 읽는 파일(/proc//io)을 프로세스 소유자만 읽을 수 있기 때문에 Linux나 macOS에서는 Process I/O 메트릭을 사용할 수 없습니다. 자세한 내용은 Agent FAQ를 참조하세요.

다음 메트릭은 Windows에서 사용할 수 없습니다.

  • system.cpu.iowait
  • system.processes.mem.page_faults.minor_faults
  • system.processes.mem.page_faults.children_minor_faults
  • system.processes.mem.page_faults.major_faults
  • system.processes.mem.page_faults.children_major_faults
  • system.processes.mem.real

참고: WMI 점검을 사용하여 Windows에서 페이지 오류 메트릭을 수집합니다.

참고: Windows의 v6.11+에서 Agent는 Local System 대신 ddagentuser로 실행됩니다. 이것 때문에 다른 사용자 계정으로 실행되는 프로세스의 전체 명령줄과 다른 사용자의 프로세스 사용자에 대한 액세스 권한이 없습니다. 이로 인해 점검의 다음 옵션이 작동하지 않습니다.

  • exact_matchfalse로 설정 시
  • 특정 사용자에게 속한 프로세스를 선택하게 해주는 user

모든 메트릭은 instance당 process.yaml에서 구성되고 process_name:<instance_name> 태그가 지정됩니다.

이 점검에서 보낸 system.processes.cpu.pct 메트릭은 30초 이상 지속되는 프로세스에 대해서만 정확합니다. 수명이 짧은 프로세스에 대한 값은 정확하지 않을 수 있습니다.

전체 메트릭 목록은 메트릭 섹션을 참조하세요.

수집한 데이터

메트릭

system.processes.cpu.pct
(gauge)
The CPU utilization of a process.
Shown as percent
system.processes.cpu.normalized_pct
(gauge)
The normalized CPU utilization of a process.
Shown as percent
system.processes.involuntary_ctx_switches
(gauge)
The number of involuntary context switches performed by this process.
Shown as event
system.processes.ioread_bytes
(gauge)
The number of bytes read from disk by this process. In Windows: the number of bytes read.
Shown as byte
system.processes.ioread_bytes_count
(count)
The number of bytes read from disk by this process. In Windows: the number of bytes read.
Shown as byte
system.processes.ioread_count
(gauge)
The number of disk reads by this process. In Windows: the number of reads by this process.
Shown as read
system.processes.iowrite_bytes
(gauge)
The number of bytes written to disk by this process. In Windows: the number of bytes written by this process.
Shown as byte
system.processes.iowrite_bytes_count
(count)
The number of bytes written to disk by this process. In Windows: the number of bytes written by this process.
Shown as byte
system.processes.iowrite_count
(gauge)
The number of disk writes by this process. In Windows: the number of writes by this process.
Shown as write
system.processes.mem.page_faults.minor_faults
(gauge)
In Unix/Linux and macOS: The number of minor page faults per second for this process.
Shown as occurrence
system.processes.mem.page_faults.children_minor_faults
(gauge)
In Unix/Linux and macOS: The number of minor page faults per second for children of this process.
Shown as occurrence
system.processes.mem.page_faults.major_faults
(gauge)
In Unix/Linux and macOS: The number of major page faults per second for this process.
Shown as occurrence
system.processes.mem.page_faults.children_major_faults
(gauge)
In Unix/Linux and macOS: The number of major page faults per second for children of this process.
Shown as occurrence
system.processes.mem.pct
(gauge)
The process memory consumption.
Shown as percent
system.processes.mem.real
(gauge)
The non-swapped physical memory a process has used and cannot be shared with another process (Linux only).
Shown as byte
system.processes.mem.rss
(gauge)
The non-swapped physical memory a process has used. aka "Resident Set Size".
Shown as byte
system.processes.mem.vms
(gauge)
The total amount of virtual memory used by the process. aka "Virtual Memory Size".
Shown as byte
system.processes.number
(gauge)
The number of processes.
Shown as process
system.processes.open_file_descriptors
(gauge)
The number of file descriptors used by this process (only available for processes run as the dd-agent user)
system.processes.open_handles
(gauge)
The number of handles used by this process.
system.processes.threads
(gauge)
The number of threads used by this process.
Shown as thread
system.processes.voluntary_ctx_switches
(gauge)
The number of voluntary context switches performed by this process.
Shown as event
system.processes.run_time.avg
(gauge)
The average running time of all instances of this process
Shown as second
system.processes.run_time.max
(gauge)
The longest running time of all instances of this process
Shown as second
system.processes.run_time.min
(gauge)
The shortest running time of all instances of this process
Shown as second

이벤트

Process 점검은 이벤트를 포함하지 않습니다.

서비스 점검

process.up
Returns OK if the check is within the warning thresholds, CRITICAL if it’s outside of the critical thresholds, and WARNING if it’s outside of the warning thresholds.
Statuses: ok, warning, critical

트러블슈팅

도움이 필요하신가요? Datadog 고객 지원팀에 문의하세요.

참고 자료

Datadog으로 프로세스 리소스 사용을 모니터링하는 방법은 관련 블로그 포스트에서 확인해 보세요.