Getting Started Monitoring with Prometheus and Grafana Syah Dwi Prihatmoko – @sdmoko sdmoko@sdmoko.net
2 Some stuff about me ● openSUSE Indonesia Member ● OpenSUSE Indonesia Translator ● GNU/Linux Bogor Activist ● Open Source Contributor and Ethusiast ● Endless Ambassador ● Mostly doing infrastructure related stuff (ussualy “hard” stuff) ● Enjoying manga and anime ● 3 years Network Engineer ● 2 years Sysadmin ● 1++ years DevOps
3 What am I going to cover ● Monitoring ● Prometheus – an introduction ● Grafana – an Introduction ● Short demo
Monitoring
5 Why Monitor?
6 Know when things go wrong
7 Alerting
8 Be able to debug and gain insight
9 What to Monitor?
10 Hosts CPU, Memory, I/O, Network, Filesystem
11 Containers CPU, Memory, I/O, Restarts, Throttling
12 Applications Throughput, Latency
13 The Four Golden Signals Site Reliability Engineering
14 Latency The time it takes to service a request. Important to distinguish between the latency of successful and failed requests.
15 Traffic A measure of how much demand is being placed on your system, measured in a high- level system-specific metric.
16 Error The rate of requests that fail, either explicitly (e.g. HTTP 500s), implicitly (HTTP 200 success with wrong content)
17 Saturation How “full” your service is. A measure of your system fraction, emphasizing the resources that are most constrained (e.g. in a memory- constrained system, show memory)
Prometheus – An Introduction
19 Prometheus Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud. It is now a standalone open source project and maintained independently of any company. https://prometheus.io
20 Components ● 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 HAProxy, StatsD, Graphite, etc.) ● An alertmanager ● Various support tools
21 Overview Architecture
22 List of Job Exporters Prometetheus Managed • Graphite • SNMP • HAProxy • Consul • InfluxDB • Prometheus • Node • Statsd • .. Custom Ones • Database • HTTP • Messaging • Storage • APIs • Logging • .. https://prometheus.io/docs/instrumenting/exporters/
Grafana – An Introduction
24 Grafana The analytics platform for all your metrics Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data driven culture. Trusted and loved by the community. https://grafana.com
Short Demo
26 Demo Structure
Questions?
28 Reference ● http://mpas.github.io/ ● https://prometheus.io/docs/introduction/overview/ ● http://docs.grafana.org/
Thank you. Join the conversation, contribute & have a lot of fun! ありがとうございました Terima Kasih.

Getting Started Monitoring with Prometheus and Grafana