Prometheus
Prometheus ๋(=Open Source Monitoring System)
Prometheus collects and stores its metrics as time series data, i.e. metrics information is stored with the timestamp at which it was recorded, alongside optional key-value pairs called labels.
๊ณต์ ํํ์ด์ง์ ์ฌ๋ฌ ์ค๋ช ์ด ์์ง๋ง ์ ๋ฌธ๊ตฌ๊ฐ ๊ฐ์ฅ ํต์ฌ์ด๋ผ ์๊ฐํด์ ๊ฐ์ ธ์๋ค. ์ ๋ฌธ์ฅ์ ์ ๋ฆฌํ๋ฉด Prometheus๋ metric์ ์๊ฐ์ ๋ฐ๋ผ ์๊ณ์ด๋ก ์ ์ฅํ๋ฉฐ ์ด metric์ ์๊ณ์ด์ธ ๋งํผ ๊ฐ ๋ฐ์ดํฐ๋ง๋ค timestamp ๋ฅผ ๊ฐ๊ณ ์๊ณ , ๋ฐ์ดํฐ์ ํ์์ label ์ด๋ผ ๋ถ๋ฆฌ์ฐ๋ key-value ๋ฐฉ์์ด๋ผ๋ ๊ฒ์ด๋ค.
์ ํํ๊ฒ๋ ๊ฐ ๋ฐ์ดํฐ๊ฐ timestamp๋ฅผ ๊ฐ๋๊ฒ ์๋๋ผ Prometheus๊ฐ ์์๋ก ํ๋จํ ํน์ ์์ ์ key-value ์ ํด๋นํ๋ ํ์์ผ๋ก ๋ฐ์ดํฐ(metric)๋ฅผ ์์งํ๋๋ฐ ์ด๊ฑธ ์๊ฐ์ด ์ง๋จ์ ๋ฐ๋ผ ๊ณ์ ๋ฐ๋ณตํ๋ค๋ ์๋ฏธ๋ก ๋ณด์ธ๋ค.
Prometheus ๊ตฌ์ฑ

the main Prometheus server which scrapes and stores time series data
client libraries for instrumenting application code
a push gateway for supporting short-lived jobs
special-purpose exporters for services like HAProxy, StatsD, Graphite, etc.
an alertmanager to handle alerts
various support tools
์ฌ๊ธฐ์ ์ ๋ณด๋ฅผ ์์งํ ๋์์ธ Application ์ ์ข์ธก ํ๋จ์ Prometheus targets ์ด๋ค. Prometheus target์ด ๋๋ exporters ๋ค์ Prometheus ๊ฐ ์ฃผ๊ธฐ์ ์ผ๋ก pull ํ ๋ ์ฌ์ฉํ endpoint๋ฅผ ์ ๊ณตํ๊ณ , Prometheus๊ฐ ์ด๋ฅผ pullํ๋ ํ์๋ฅผ job ์ด๋ผ๊ณ ์ค์ ํ์ฌ ํํด์ง๋ค.
Last updated