21
Prometheus – on-site vs in-the-cloud David Kaltschmidt @davkals

Prometheus as a Service

Embed Size (px)

Citation preview

Page 1: Prometheus as a Service

Prometheus – on-site vs in-the-cloudDavid Kaltschmidt @davkals

Page 2: Prometheus as a Service
Page 3: Prometheus as a Service

What is Prometheus

Timeseries DB

Borgmon (Google) for the rest of us

Open source

Cloud Native Foundation

Page 4: Prometheus as a Service

Like Uber, but for Uber

Graphite + StatsDstats.api-server.tracks.post.500->93

InfluxDB

OpenTSDB

Page 5: Prometheus as a Service

Get started$dockerrun-p9090:9090prom/prometheustime="2016-11-16T00:51:06Z"level=infomsg="Startingprometheus(version=1.2.1,branch=master,revision=dd66f2e94b2b662804b9aa1b6a50587b990ba8b7)"source="main.go:75"

time="2016-11-16T00:51:06Z"level=infomsg="Buildcontext(go=go1.7.1,user=root@fd9b0daff6bd,date=20161010-15:58:23)"source="main.go:76"

time="2016-11-16T00:51:06Z"level=infomsg="Loadingconfigurationfile/etc/prometheus/prometheus.yml"source="main.go:247"

time="2016-11-16T00:51:07Z"level=infomsg="Loadingseriesmapandheadchunks..."source="storage.go:354"

time="2016-11-16T00:51:07Z"level=infomsg="0seriesloaded."source="storage.go:359"

time="2016-11-16T00:51:07Z"level=warningmsg="NoAlertManagersconfigured,notdispatchinganyalerts"source="notifier.go:176"

Page 6: Prometheus as a Service

Kubernetes

AWS

Bigger setup

Page 7: Prometheus as a Service

Prometheus and Kubernetes: A Perfect Match

Prometheus and Kubernetes: Deploying

https://www.weave.works/blog/

Prometheus and Kubernetes: Monitoring Your Applications

Prometheus and Kubernetes: Monitoring Your Infrastructure

Page 8: Prometheus as a Service

Dimensional datastats.api-server.tracks.post.500->93

VS

api_server_http_requests_total{job=“apiserver”,instance=“<sample1>”,method=“POST”,handler=“/tracks",status=“500"}->34

https://prometheus.io/docs/practices/naming/

Page 9: Prometheus as a Service

PromQLhttp_requests_total{job="apiserver",handler=“/api/comments"}[5m]

sum(rate(http_requests_total[5m]))by(job)

topk(3,sum(rate(instance_cpu_time_ns[5m]))by(app,proc))

Page 10: Prometheus as a Service

UI: Expression browser

Page 11: Prometheus as a Service

UI: Grafana

Page 12: Prometheus as a Service

Where does my data live?

Indexes on LevelDB

One file per time-series on disk

Page 13: Prometheus as a Service

Prometheus in the cloud

API compatible

Keep query language

Throughput on par https://github.com/weaveworks/cortex

Page 14: Prometheus as a Service

Retriever

scraping

your jobs

Your DC

Weave Cloud

Frontend, Authenticator

Distributor

Ingester

Distributor…

IngesterIngester

DynamoDB S3

Page 15: Prometheus as a Service

Re-use your local Prometheus

remote_write:

url: https://cloud.weave.works/api/prom/push

basic_auth:

password: <redacted>

Retriever

Page 16: Prometheus as a Service

DEMO

https://cloud.weave.works

Page 17: Prometheus as a Service

Why not just run my own

Well, you kind of are.

But Cloud…

Page 18: Prometheus as a Service

Reuse your Grafana• Type: Prometheus

• Url: https://cloud.weave.works/api/prom

• Access: Direct

• Http Auth: Basic Auth

• User: user (this is ignored, but must be non-empty)

• Password: (the same one your retrieval agent uses)

Page 19: Prometheus as a Service

Wanted: Feedback for UI

Decide on Grafana integration

vs

something else

Page 20: Prometheus as a Service

We’re hiring!London BerlinSan Francisco

Page 21: Prometheus as a Service

David Kaltschmidt @davkals

Sign up at https://cloud.weave.works/

$ kubectl -n kube-system apply -f \

‘https://cloud.weave.works/k8s/cortex.yaml?t=...'

https://github.com/weaveworks/cortex

Try It Out!

Questions?