How to export Prometheus metrics from just about anything Matt Layher, May 2, 2018 Prometheus Matt Layher ● Senior Engineer at DigitalOcean ● Member of Prometheus team ● GitHub + Twitter: @mdlayher ● github.com/mdlayher/talks Prometheus A crash course on Prometheus Prometheus What is Prometheus? ● Prometheus is an open-source systems monitoring and alerting toolkit. ● Pull-based metrics gathering system, simple text format for metrics exposition. ● PromQL: powerful query language. Prometheus Architecture Prometheus Prometheus text format $ curl -s http://localhost:9100/metrics | grep node_ # HELP node_arp_entries ARP entries by device # TYPE node_arp_entries gauge node_arp_entries{device="br0"} 7 # HELP node_boot_time Node boot time, in unixtime. # TYPE node_boot_time gauge node_boot_time 1.521387979e+09 # HELP node_context_switches Total number of context switches. # TYPE node_context_switches counter node_context_switches 1.55007032e+08 Prometheus PromQL smartmon_temperature_celsius_raw_value{instance="example"} Prometheus What’s a Prometheus exporter? Prometheus What’s a Prometheus exporter? ● Exporters bridge the gap between Prometheus and systems which don’t export metrics in the Prometheus format. ● Typically run on the same machine as a service, but not always! Prometheus Example exporters ● node_exporter ○ Exposes system metrics from UNIX-like machines. ● mysqld_exporter ○ Exposes metrics from a MySQL server. ● blackbox_exporter ○ Exposes metrics from “black box” systems via HTTP, ICMP, etc. Prometheus
Description: