[1일1개발지식] 시스템 메트릭은 내 PC 어디에 있나?

김진만·2024년 4월 14일
0

시스템 메트릭은 대체 어디에 있을까??
CPU, 메모리, IO 등등..

  • 운영 체제에서 관리하고 있다. 호스트 내의 파일 경로에서 확인은 어렵고 가상 메모리의 아래 경로에 있다.
    /proc/meminfo
    /proc/stat
    /proc/net/dev
    /prod/diskstats

시스템 메트릭은 가상 메모리에서 실시간으로 위 경로에 write 되고 있다!
프로메테우스의 node exporter는 이러한 시스템 메트릭을 외부 포트로 노출 하고(default:9010)
프로메테우스 클라이언트 서버에서 타겟 서버의 9010포트에서 특정 interval단위로 스크랩 해가는 것이다!

global:
scrape_interval: 15s
evaluation_interval: 15s

scrape_configs:

  • job_name: 'prometheus'
    static_configs:
    • targets: ['localhost:9090']

ex) target_server_host: http://localhost:9090
client_server는 target_server에서 interval: 15s 단위로 시스템 메트릭을 수집하고 있다.

profile
충분한 전기와 컴퓨터 한 대와 내 이 몸만 남아 있다면 지구를 재건할 수 있습니다.

0개의 댓글