demo url: http://10.103.1.62:9090
demo url: http://10.103.1.62:9100/metrics
Prometheus is based on a 'pull' mechanism, that scrapes metrics from the configured targets (like passive agent check in Zabbix). However, for short-lived jobs, it provides an intermediary push gateway for scraping metrics.
Client can be written in:
- Go, Python, Java, Ruby
- Bash, NodeJS, .Net (Unofficial support libraries)
Client format
...
# HELP node_memory_MemAvailable MemAvailable from /proc/meminfo.
# TYPE node_memory_MemAvailable gauge
node_memory_MemAvailable 5.65276672e+08
# HELP node_memory_MemFree MemFree from /proc/meminfo.
# TYPE node_memory_MemFree gauge
node_memory_MemFree 8.0564224e+07
# HELP node_memory_MemTotal MemTotal from /proc/meminfo.
# TYPE node_memory_MemTotal gauge
node_memory_MemTotal 1.027239936e+09
...
Prometheus stores data in a local storage and uses LevelDB for indexes. It also can export the data to remote stores like influxDB and OpenTSDB
Prometheus supports sending alerts to following channels
- Pushover
- Pagerduty
- Hipchat
- Slack
- Flowdock
An example of Prometheus graph.