From b07490fcf740f1e305ed68783769f32a371cb9b2 Mon Sep 17 00:00:00 2001 From: Jonathan Yantis Date: Thu, 2 Mar 2017 14:17:04 -0500 Subject: [PATCH] Added Container Monitoring Talk --- talks/20170301_Container-Monitoring/README.md | 53 ++++++++++++++++++ .../docker-compose.yml | 34 +++++++++++ .../grafana/grafana.db | Bin 0 -> 105472 bytes .../grafana/sessions/1/f/1fcab8fe71c1164f | Bin 0 -> 44 bytes .../prometheus.yml | 45 +++++++++++++++ 5 files changed, 132 insertions(+) create mode 100644 talks/20170301_Container-Monitoring/README.md create mode 100644 talks/20170301_Container-Monitoring/docker-compose.yml create mode 100644 talks/20170301_Container-Monitoring/grafana/grafana.db create mode 100644 talks/20170301_Container-Monitoring/grafana/sessions/1/f/1fcab8fe71c1164f create mode 100644 talks/20170301_Container-Monitoring/prometheus.yml diff --git a/talks/20170301_Container-Monitoring/README.md b/talks/20170301_Container-Monitoring/README.md new file mode 100644 index 0000000..c87c6ee --- /dev/null +++ b/talks/20170301_Container-Monitoring/README.md @@ -0,0 +1,53 @@ +# Overview + +## Prometheus + +Prometheus, a [Cloud Native Computing Foundation](https://cncf.io/) project, is a systems and service monitoring system. It collects metrics +from configured targets at given intervals, evaluates rule expressions, +displays the results, and can trigger alerts if some condition is observed +to be true. + +### Highlights + +- Consumes up to 800,000 metrics per second on a single server +- Static Go Binary +- Support both pull and push methods +- Large number of clients (cAdvisor, node-exporter, experimental docker support in 1.13) +- Supports advanced rule evaluation such as linear predictions and quantile analysis + +### Caveats + +- No down-sampling support +- No official long-term storage support (two week default) +- No clustering (must run multiple instances for redundancy) +- Must run separate alert manager (or depend on Grafana) + +### Pull versus Push + +- Both are scalable +- Adopt the model that makes sense in your environment +- Personally prefer pull, no reconfiguring of clients to deploy a new instance + +## Grafana + +Creates beautiful charts from time series databases, including Prometheus and other. + +### Highlights + +- Prefered Prometheus visualization tool +- Built-in alerting as of 4.0 +- Query syntax is identical to Prometheus +- Canned dashboards for cAdvisor, node-exporter, Redis etc available on their website + +## cAdvisor + +- Container exporter from Google +- Native Prometheus support at /metrics +- Provides network, storage, CPU and memory metrics per container for Prometheus +- Canned dashboard available for Grafana + +## Custom Endpoints + +- Build /metrics endpoints directly into your application +- Expose metrics on latency, number of calls and other metrics directly to Prometheus + diff --git a/talks/20170301_Container-Monitoring/docker-compose.yml b/talks/20170301_Container-Monitoring/docker-compose.yml new file mode 100644 index 0000000..5e2dd04 --- /dev/null +++ b/talks/20170301_Container-Monitoring/docker-compose.yml @@ -0,0 +1,34 @@ +version: '2' +services: + + prometheus: + image: prom/prometheus + ports: + - 19090:9090 + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml + # #- ./prometheus-data:/prometheus-data + # - ./prometheus-data:/prometheus/data + + + cadvisor: + image: google/cadvisor:latest + ports: + - 9080:8080 + + node-exporter: + image: prom/node-exporter + ports: + - 9100:9100 + + grafana: + image: grafana/grafana + ports: + - 3000:3000 + environment: + - GF_SECURITY_ADMIN_PASSWORD=secret + - GF_AUTH_ANONYMOUS_ENABLED=true + volumes: + - ./grafana:/var/lib/grafana + links: + - prometheus diff --git a/talks/20170301_Container-Monitoring/grafana/grafana.db b/talks/20170301_Container-Monitoring/grafana/grafana.db new file mode 100644 index 0000000000000000000000000000000000000000..76d671c6b106e0de63593470fa5148208a61108e GIT binary patch literal 105472 zcmeHwYiwKDnb^6!wn=%$GvmyInRq%oU;J)DUn+wzPueoLOQV>{Fpc}d+7 z$;;urlp9B zT)Q!?%v?S{eN&karkhu;Tvp~W^}KRoo@Sj-uJ4zl@mF7!9<5mFLPf(^{I|z0Z*J=B z#c4Ow{&~GP4~5T7zcYPZxq5x(($w`^%6rqdl&KqYS7t6lrc2Y8=akD=;NOjl7xxb; z^UGSp)Qy^#%^%5tQ0As@1~X|@Rj?)KF_h zvn{M(RO@Q(ep{$oC>YI}mG`&S54LXR)nZi-X;h)1sg?!+orfNoo4GU{z(=!Q42w-( zjqHn`JSp9xU15Gyfnl3BwU3%wt)R7i%7G4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3P-}(WJx-3wGrwS;$$_MUv$xQF#V!n*EcO)?vw1sB&-)54>RYw1!2Aby*-c!$>7oq%wDo&S z?w8wJAp555Eo}SAI|JF~;v8vSo-Tatdy7w!5xSf7xr5A6siQJmfE6E>!xL=1+zIdTb0rlmIFaOY{IV9-#9R933^}ZXW5+JJp z^08#yngaguqPn1gQ~~*8A4!Q4&M9*a2b{~VcavW%0=LiP$2J@LGzc_)$&IRCfrf9R z!ka*vDzLTrqP?O!wB{4qq@dT^X;Ya0q(=$I^(L%G)6fQYjeEiylD$GULA(t$GdTxO zzTpB2$VQK#&i)yYaZqMhse>Ski8-7up_>c{#}&J`pa4iKDLZKQ8%sE{)H0Q4c@qd#|DfRj(G*I7s8CrqK@fKv1_20E(0l=`L#VJ0 zH2fOA~i@;*9%K1!(63-_WA|00xd9HR*+VlLk)I1h0iQ~rm;L)XqrB= zDGW%XbS{IBbdf>`mE;Yu+<<|D@;F}xn)DP+N;70eX<3G#6I{{d`{5(oeQ literal 0 HcmV?d00001 diff --git a/talks/20170301_Container-Monitoring/grafana/sessions/1/f/1fcab8fe71c1164f b/talks/20170301_Container-Monitoring/grafana/sessions/1/f/1fcab8fe71c1164f new file mode 100644 index 0000000000000000000000000000000000000000..d89e3ffd59bfab3e0a072d5ba791a895abd02fa9 GIT binary patch literal 44 xcmd=4-^jwq^uLLLQGii^fk6huVk<5w%FIjWVP#-0%}im<%quZ7VPRrm0ssKS3XA{% literal 0 HcmV?d00001 diff --git a/talks/20170301_Container-Monitoring/prometheus.yml b/talks/20170301_Container-Monitoring/prometheus.yml new file mode 100644 index 0000000..c500100 --- /dev/null +++ b/talks/20170301_Container-Monitoring/prometheus.yml @@ -0,0 +1,45 @@ +# my global config +global: + scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. + evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. + # scrape_timeout is set to the global default (10s). + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: 'dcmap-monitor' + +# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. +rule_files: + # - "first.rules" + # - "second.rules" + +# A scrape configuration containing exactly one endpoint to scrape: +# Here it's Prometheus itself. +scrape_configs: + # The job name is added as a label `job=` to any timeseries scraped from this config. + - job_name: 'prometheus' + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + scrape_interval: 60s + + static_configs: + - targets: ['prometheus:9090'] + + # The job name is added as a label `job=` to any timeseries scraped from this config. + - job_name: 'cadvisor' + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + scrape_interval: 60s + + static_configs: + - targets: ['cadvisor:8080'] + + # The job name is added as a label `job=` to any timeseries scraped from this config. + - job_name: 'node-exporter' + # metrics_path defaults to '/metrics' + # scheme defaults to 'http'. + scrape_interval: 60s + + static_configs: + - targets: ['node-exporter:9100']