SlideShare a Scribd company logo
Prometheus:
PromQL Deep Dive
Jeff Hoffer, Developer Experience
github.com/eudaimos
Agenda
1. What is PromQL
2. PromQL Operators
3. PromQL Functions
4. Hands On: Building Queries in PromQL
5. Hands On: Visualizing PromQL in Grafana
6. Training on real app
7. What’s next?
What is PromQL
• Powerful Query Language of Prometheus
• Provides built in operators and functions
• Vector-based calculations like Excel
• Expressions over time-series vectors
Expressions (and sub-expressions)
• Instant Vector - set of time series containing single sample for each time series, all sharing
same timestamp
• e.g. http_request_count => results in:
• http_request_count{status=“200”} 20
• http_request_count{status=“404”} 3
• http_request_count{status=“500”} 5
Expressions (and sub-expressions)
• Instant Vector - set of time series containing single sample for each time series, all sharing
same timestamp
• e.g. http_request_count => results in:
• http_request_count{status=“200”} 20
• http_request_count{status=“404”} 3
• http_request_count{status=“500”} 5
• Range Vector - set of time series containing a range of data points over time for each series
• e.g. http_request_count[5m] => results in:
• http_request_count{status=“200”}
Expressions (and sub-expressions)
• Instant Vector - set of time series containing single sample for each time series, all sharing
same timestamp
• e.g. http_request_count => results in:
• http_request_count{status=“200”} 20
• http_request_count{status=“404”} 3
• http_request_count{status=“500”} 5
• Range Vector - set of time series containing a range of data points over time for each series
• e.g. http_request_count[5m] => results in:
• http_request_count{status=“200”}
• Scalar - as a literal and as result of an expression
• String - only currently as a literal in an expression
Time Series Selectors
• Instant Vector Selectors
• num_nodes
• num_nodes{role=“backend”}
Time Series Selectors
• Instant Vector Selectors
• num_nodes
• num_nodes{role=“backend”}
• Range Vector Selectors (s, m, h, d, w, y)
• num_nodes{role=“backend”}[5m]
Time Series Selectors
• Instant Vector Selectors
• num_nodes
• num_nodes{role=“backend”}
• Range Vector Selectors (s, m, h, d, w, y)
• num_nodes{role=“backend”}[5m]
• Offset Modifier
• num_nodes{role=“backend”}[5m] offset 1w
Operators: Binary
• Arithmetic: +, -, *, /, %, ^
– scalar/scalar
– vector/scalar
– vector/vector
Operators: Binary
• Arithmetic: +, -, *, /, %, ^
– scalar/scalar
– vector/scalar
– vector/vector
• Comparison: ==, !=, >, <, >=, <=
– filters results unless bool operator provided (converts 0 or 1)
– scalar/scalar requires bool operator
– vector/scalar & vector/vector drops elements unless bool operator provided
Operators: Binary
• Arithmetic: +, -, *, /, %, ^
– scalar/scalar
– vector/scalar
– vector/vector
• Comparison: ==, !=, >, <, >=, <=
– filters results unless bool operator provided (converts 0 or 1)
– scalar/scalar requires bool operator
– vector/scalar & vector/vector drops elements unless bool operator provided
• Logical/Set Binary: only defined between Instant Vectors
– and = intersection between vector1 and vector2
– or = union of vector1 and vector2
– unless = elements of vector1 for which no matches in vector2
Operators: Vector Matching
• Label Matching
– ignoring keyword
– on keyword
Operators: Vector Matching
• Label Matching
– ignoring keyword
– on keyword
• One-to-one - finds unique pair of entries with all labels
matching
Operators: Vector Matching
• Label Matching
– ignoring keyword
– on keyword
• One-to-one - finds unique pair of entries with all labels
matching
• Many-to-one / One-to-many - where each element on a “one”
side can multiple elements on the “many” side
– group_left v group_right determines cardinality
– only used for comparison and arithmetic operations
Operators: Aggregation
• Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values
– sum, avg
– min, max
– stddev, stdvar
– count, count_values*
– bottomk*, topk*
– quantile*
*takes a parameter before the vector
Operators: Aggregation
• Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values
– sum, avg
– min, max
– stddev, stdvar
– count, count_values*
– bottomk*, topk*
– quantile*
*takes a parameter before the vector
• without clause removes listed labels from resulting vector
Operators: Aggregation
• Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values
– sum, avg
– min, max
– stddev, stdvar
– count, count_values*
– bottomk*, topk*
– quantile*
*takes a parameter before the vector
• without clause removes listed labels from resulting vector
• by clause drops labels not listed from the resulting vector
Operators: Aggregation
• Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values
– sum, avg
– min, max
– stddev, stdvar
– count, count_values*
– bottomk*, topk*
– quantile*
*takes a parameter before the vector
• without clause removes listed labels from resulting vector
• by clause drops labels not listed from the resulting vector
• keep_common (with by) will keep labels that exist in all elements but not listed in the by clause
Operators: Aggregation
• Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values
– sum, avg
– min, max
– stddev, stdvar
– count, count_values*
– bottomk*, topk*
– quantile*
*takes a parameter before the vector
• without clause removes listed labels from resulting vector
• by clause drops labels not listed from the resulting vector
• keep_common (with by) will keep labels that exist in all elements but not listed in the by clause
• topk/bottomk - only subset of original values are returned including original labels - by and without only bucket
the input
Functions: Utilities
• time() - number of seconds since Unix
Epoch when the expression is run
• vector(s scalar) - returns a vector
from a scalar
• scalar(v vector) - returns scalar
value of a single sampled vector or NaN
Functions: Time-based Instant Vector
• default v=vector(time())
• day_of_month(v)
• day_of_week(v)
• days_in_month(v)
• hour(v)
• minute(v)
• month(v)
• year(v)
Functions: Instant Vector
• abs(v)
• absent(v)
• ceil(v)
• clamp_max(v, scalar), clamp_min(v, scalar) - clamps the sample values to have
an upper/lower limit
• count_scalar(v)
• drop_common_labels(v)
• exp(v)
• floor(v), round(v)
• label_replace(v, dst_label string, replacement string, src_label
string, regex string)
• ln(v), log2(v), log10(v)
• sort(v), sort_desc(v)
• sqrt(v)
Functions: Range Vector
• changes()ˆ
• delta()˚*, idelta()˚* - diff between first and last in each time series element
• deriv()* - per sec derivative using simple linear regression
• holt_winters(v, sf scalar, tf scalar)* - smooth value for time series based on
range in v
• increase()ˆ - syntactic sugar for rate(v[T]) * (seconds in T)
• irate()ˆ, rate()ˆ - per second instant/avg rate of increase
• predict_linear(v, t scalar)* - predict value at time t using simple linear regression
• resets()ˆ - number of times a counter reset
• <aggregation>_over_time()˚ - aggregate each series of a range vector over time
returning instant vector with per series aggregation results
• ˚returns an instant vector, *should only be used with gauges, ˆshould only be used with
counters
Metrics Types
Basic Counters Sampling Counters
counter histogram
gauge summary
Metrics Types - Basic Counters
• counter - single numeric metric that only
goes up
• gauge - single numeric metric that
arbitrarily goes up or down
Metric Types - Sampling Counters
• histogram - samples observations and
counts them in configurable buckets
• summary - samples observations and
counts them
Metric Types - Sampling Counters
• histogram - samples observations and
counts them in configurable buckets
• summary - samples observations and
counts them
Metrics Types - Sampling Counters
Histogram!?
Metric Types - Sampling Counters
• both histogram and summary have:
– <name>_sum - time series summing the value of all observations
– <name>_count - time series counter for the number of observations taken
Metric Types - Sampling Counters
• both histogram and summary have:
– <name>_sum - time series summing the value of all observations
– <name>_count - time series counter for the number of observations taken
• histograms:
– buckets are configured on client when creating metrics
– time series for each bucket as <name>_bucket{…,le=“<bucket-upper-bound>”} counting the number
of observations less than or equal to the upper bound of the bucket
– ad-hoc quantile specification using the histogram_quantile(quantile, instant-vector) function
Metric Types - Sampling Counters
• both histogram and summary have:
– <name>_sum - time series summing the value of all observations
– <name>_count - time series counter for the number of observations taken
• histograms:
– buckets are configured on client when creating metrics
– time series for each bucket as <name>_bucket{…,le=“<bucket-upper-bound>”} counting the number
of observations less than or equal to the upper bound of the bucket
– ad-hoc quantile specification using the histogram_quantile(quantile, instant-vector) function
• summaries:
– quantiles are defined on the client when creating metrics
– time series for each quantile as <name>{…,quantile=“<quantile-upper-bound>”} keeping the
streaming quantile calculation from the client
– are generally not aggregatable
Refining Rate
rate(requests[5m])
Refining Rate
rate(requests[5m])
sum(rate(requests[5m])) by(service_name)
Refining Rate
rate(requests[5m])
sum(rate(requests[5m])) by(service_name)
sum(rate(requests{service_name=“catalogue”}[5m]))
by(instance)
Refining Rate
rate(requests[5m])
sum(rate(requests[5m])) by(service_name)
sum(rate(requests{service_name=“catalogue”}[5m]))
by(instance)
request_duration as a histogram
Refining Rate
rate(requests[5m])
sum(rate(requests[5m])) by(service_name)
sum(rate(requests{service_name=“catalogue”}[5m]))
by(instance)
request_duration as a histogram
- derive average request duration over a rolling 5
minute period
Refining Rate
rate(requests[5m])
sum(rate(requests[5m])) by(service_name)
sum(rate(requests{service_name=“catalogue”}[5m]))
by(instance)
request_duration as a histogram
- derive average request duration over a rolling 5
minute period
rate(request_duration_sum[5m]) /
rate(request_duration_count[5m])
RED Monitoring
• (Request) Rate - the number of requests
per second your services are serving
• (Request) Errors - the number of failed
requests per second
• (Request) Duration - distributions of the
amount of time each request takes
Training!
Join the Weave user group!
meetup.com/pro/Weave/

weave.works/help
Other topics
• Kubernetes 101
• Continuous delivery: hooking up my CI/CD
pipeline to Kubernetes
• Network policy for security
We have talks on all these topics in the Weave
user group!
Thanks! Questions?
We are hiring!
DX in San Francisco
Engineers in London & SF
weave.works/weave-company/hiring

More Related Content

What's hot

Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Brian Brazil
 
VictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - PreviewVictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - Preview
VictoriaMetrics
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
Arvind Kumar G.S
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using Prometheus
Marco Pas
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to Prometheus
Julien Pivotto
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
Dhrubaji Mandal ♛
 
OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...
OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...
OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...
NETWAYS
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)
Brian Brazil
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
Knoldus Inc.
 
Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)
Brian Brazil
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?
Wojciech Barczyński
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
Syah Dwi Prihatmoko
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with Prometheus
Shiao-An Yuan
 
Prometheus Storage
Prometheus StoragePrometheus Storage
Prometheus Storage
Fabian Reinartz
 
Prometheus and Grafana
Prometheus and GrafanaPrometheus and Grafana
Prometheus and Grafana
Lhouceine OUHAMZA
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
Paul Podolny
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
Marco Pracucci
 
Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for Prometheus
Mitsuhiro Tanda
 
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features HighlightsVictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics
 
Prometheus (Prometheus London, 2016)
Prometheus (Prometheus London, 2016)Prometheus (Prometheus London, 2016)
Prometheus (Prometheus London, 2016)
Brian Brazil
 

What's hot (20)

Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)
 
VictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - PreviewVictoriaLogs: Open Source Log Management System - Preview
VictoriaLogs: Open Source Log Management System - Preview
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using Prometheus
 
Introduction to Prometheus
Introduction to PrometheusIntroduction to Prometheus
Introduction to Prometheus
 
Cloud Monitoring tool Grafana
Cloud Monitoring  tool Grafana Cloud Monitoring  tool Grafana
Cloud Monitoring tool Grafana
 
OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...
OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...
OSMC 2022 | VictoriaMetrics: scaling to 100 million metrics per second by Ali...
 
Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)Prometheus and Docker (Docker Galway, November 2015)
Prometheus and Docker (Docker Galway, November 2015)
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)Monitoring your Python with Prometheus (Python Ireland April 2015)
Monitoring your Python with Prometheus (Python Ireland April 2015)
 
How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?How to monitor your micro-service with Prometheus?
How to monitor your micro-service with Prometheus?
 
Getting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and GrafanaGetting Started Monitoring with Prometheus and Grafana
Getting Started Monitoring with Prometheus and Grafana
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with Prometheus
 
Prometheus Storage
Prometheus StoragePrometheus Storage
Prometheus Storage
 
Prometheus and Grafana
Prometheus and GrafanaPrometheus and Grafana
Prometheus and Grafana
 
Prometheus 101
Prometheus 101Prometheus 101
Prometheus 101
 
Grafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for LogsGrafana Loki: like Prometheus, but for Logs
Grafana Loki: like Prometheus, but for Logs
 
Grafana optimization for Prometheus
Grafana optimization for PrometheusGrafana optimization for Prometheus
Grafana optimization for Prometheus
 
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features HighlightsVictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
VictoriaMetrics 15/12 Meet Up: 2022 Features Highlights
 
Prometheus (Prometheus London, 2016)
Prometheus (Prometheus London, 2016)Prometheus (Prometheus London, 2016)
Prometheus (Prometheus London, 2016)
 

Similar to PromQL Deep Dive - The Prometheus Query Language

Java8lambda
Java8lambda Java8lambda
Java8lambda
Isuru Samaraweera
 
JavaScript Robotics
JavaScript RoboticsJavaScript Robotics
JavaScript Robotics
Anna Gerber
 
Exploring Streams and Lambdas in Java8
Exploring Streams and Lambdas in Java8Exploring Streams and Lambdas in Java8
Exploring Streams and Lambdas in Java8
Isuru Samaraweera
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
Ghassan Al-Yafie
 
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
Lucidworks
 
Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)
Oliver Moser
 
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
HostedbyConfluent
 
SQL Functions
SQL FunctionsSQL Functions
SQL Functions
ammarbrohi
 
9781305078444 ppt ch03
9781305078444 ppt ch039781305078444 ppt ch03
9781305078444 ppt ch03
Terry Yoast
 
ENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and TricksENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and Tricks
Razorleaf Corporation
 
Lec16-CS110 Computational Engineering
Lec16-CS110 Computational EngineeringLec16-CS110 Computational Engineering
Lec16-CS110 Computational Engineering
Sri Harsha Pamu
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
Vinay Kumar
 
Fii Practic Frontend - BeeNear - laborator3
Fii Practic Frontend - BeeNear - laborator3Fii Practic Frontend - BeeNear - laborator3
Fii Practic Frontend - BeeNear - laborator3BeeNear
 
Build, Test and Extend Integrated Workflows 3.7
Build, Test and Extend Integrated Workflows 3.7Build, Test and Extend Integrated Workflows 3.7
Build, Test and Extend Integrated Workflows 3.7
StephenKardian
 
Creating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | Prometheus
Creating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | PrometheusCreating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | Prometheus
Creating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | Prometheus
InfluxData
 
Timeline Service v.2 (Hadoop Summit 2016)
Timeline Service v.2 (Hadoop Summit 2016)Timeline Service v.2 (Hadoop Summit 2016)
Timeline Service v.2 (Hadoop Summit 2016)
Sangjin Lee
 
Timeline service V2 at the Hadoop Summit SJ 2016
Timeline service V2 at the Hadoop Summit SJ 2016Timeline service V2 at the Hadoop Summit SJ 2016
Timeline service V2 at the Hadoop Summit SJ 2016
Vrushali Channapattan
 
Java 8
Java 8Java 8
Java 8
Raghda Salah
 
Writing Asynchronous Programs with Scala & Akka
Writing Asynchronous Programs with Scala & AkkaWriting Asynchronous Programs with Scala & Akka
Writing Asynchronous Programs with Scala & Akka
Yardena Meymann
 
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Lucidworks
 

Similar to PromQL Deep Dive - The Prometheus Query Language (20)

Java8lambda
Java8lambda Java8lambda
Java8lambda
 
JavaScript Robotics
JavaScript RoboticsJavaScript Robotics
JavaScript Robotics
 
Exploring Streams and Lambdas in Java8
Exploring Streams and Lambdas in Java8Exploring Streams and Lambdas in Java8
Exploring Streams and Lambdas in Java8
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
 
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
The Evolution of Streaming Expressions - Joel Bernstein, Alfresco & Dennis Go...
 
Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)Prometheus Introduction (InfraCoders Vienna)
Prometheus Introduction (InfraCoders Vienna)
 
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
What is the State of my Kafka Streams Application? Unleashing Metrics. | Neil...
 
SQL Functions
SQL FunctionsSQL Functions
SQL Functions
 
9781305078444 ppt ch03
9781305078444 ppt ch039781305078444 ppt ch03
9781305078444 ppt ch03
 
ENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and TricksENOVIA v6 R2013x Tips and Tricks
ENOVIA v6 R2013x Tips and Tricks
 
Lec16-CS110 Computational Engineering
Lec16-CS110 Computational EngineeringLec16-CS110 Computational Engineering
Lec16-CS110 Computational Engineering
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
 
Fii Practic Frontend - BeeNear - laborator3
Fii Practic Frontend - BeeNear - laborator3Fii Practic Frontend - BeeNear - laborator3
Fii Practic Frontend - BeeNear - laborator3
 
Build, Test and Extend Integrated Workflows 3.7
Build, Test and Extend Integrated Workflows 3.7Build, Test and Extend Integrated Workflows 3.7
Build, Test and Extend Integrated Workflows 3.7
 
Creating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | Prometheus
Creating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | PrometheusCreating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | Prometheus
Creating the PromQL Transpiler for Flux by Julius Volz, Co-Founder | Prometheus
 
Timeline Service v.2 (Hadoop Summit 2016)
Timeline Service v.2 (Hadoop Summit 2016)Timeline Service v.2 (Hadoop Summit 2016)
Timeline Service v.2 (Hadoop Summit 2016)
 
Timeline service V2 at the Hadoop Summit SJ 2016
Timeline service V2 at the Hadoop Summit SJ 2016Timeline service V2 at the Hadoop Summit SJ 2016
Timeline service V2 at the Hadoop Summit SJ 2016
 
Java 8
Java 8Java 8
Java 8
 
Writing Asynchronous Programs with Scala & Akka
Writing Asynchronous Programs with Scala & AkkaWriting Asynchronous Programs with Scala & Akka
Writing Asynchronous Programs with Scala & Akka
 
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
Search Analytics Component: Presented by Steven Bower, Bloomberg L.P.
 

More from Weaveworks

Weave AI Controllers (Weave GitOps Office Hours)
Weave AI Controllers (Weave GitOps Office Hours)Weave AI Controllers (Weave GitOps Office Hours)
Weave AI Controllers (Weave GitOps Office Hours)
Weaveworks
 
Flamingo: Expand ArgoCD with Flux (Office Hours)
Flamingo: Expand ArgoCD with Flux (Office Hours)Flamingo: Expand ArgoCD with Flux (Office Hours)
Flamingo: Expand ArgoCD with Flux (Office Hours)
Weaveworks
 
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for YouWebinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Weaveworks
 
Six Signs You Need Platform Engineering
Six Signs You Need Platform EngineeringSix Signs You Need Platform Engineering
Six Signs You Need Platform Engineering
Weaveworks
 
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdfSRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
Weaveworks
 
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOpsWebinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Weaveworks
 
Flux Beyond Git Harnessing the Power of OCI
Flux Beyond Git Harnessing the Power of OCIFlux Beyond Git Harnessing the Power of OCI
Flux Beyond Git Harnessing the Power of OCI
Weaveworks
 
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes ClustersAutomated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Weaveworks
 
How to Avoid Kubernetes Multi-tenancy Catastrophes
How to Avoid Kubernetes Multi-tenancy CatastrophesHow to Avoid Kubernetes Multi-tenancy Catastrophes
How to Avoid Kubernetes Multi-tenancy Catastrophes
Weaveworks
 
Building internal developer platform with EKS and GitOps
Building internal developer platform with EKS and GitOpsBuilding internal developer platform with EKS and GitOps
Building internal developer platform with EKS and GitOps
Weaveworks
 
GitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdfGitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdf
Weaveworks
 
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and LinkerdIntro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Weaveworks
 
Implementing Flux for Scale with Soft Multi-tenancy
Implementing Flux for Scale with Soft Multi-tenancyImplementing Flux for Scale with Soft Multi-tenancy
Implementing Flux for Scale with Soft Multi-tenancy
Weaveworks
 
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKSAccelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Weaveworks
 
The Story of Flux Reaching Graduation in the CNCF
The Story of Flux Reaching Graduation in the CNCFThe Story of Flux Reaching Graduation in the CNCF
The Story of Flux Reaching Graduation in the CNCF
Weaveworks
 
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Weaveworks
 
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Weaveworks
 
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Flux’s Security & Scalability with OCI & Helm Slides.pdfFlux’s Security & Scalability with OCI & Helm Slides.pdf
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Weaveworks
 
Flux Security & Scalability using VS Code GitOps Extension
Flux Security & Scalability using VS Code GitOps Extension Flux Security & Scalability using VS Code GitOps Extension
Flux Security & Scalability using VS Code GitOps Extension
Weaveworks
 
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOpsDeploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Weaveworks
 

More from Weaveworks (20)

Weave AI Controllers (Weave GitOps Office Hours)
Weave AI Controllers (Weave GitOps Office Hours)Weave AI Controllers (Weave GitOps Office Hours)
Weave AI Controllers (Weave GitOps Office Hours)
 
Flamingo: Expand ArgoCD with Flux (Office Hours)
Flamingo: Expand ArgoCD with Flux (Office Hours)Flamingo: Expand ArgoCD with Flux (Office Hours)
Flamingo: Expand ArgoCD with Flux (Office Hours)
 
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for YouWebinar: Capabilities, Confidence and Community – What Flux GA Means for You
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
 
Six Signs You Need Platform Engineering
Six Signs You Need Platform EngineeringSix Signs You Need Platform Engineering
Six Signs You Need Platform Engineering
 
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdfSRE and GitOps for Building Robust Kubernetes Platforms.pdf
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
 
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOpsWebinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
 
Flux Beyond Git Harnessing the Power of OCI
Flux Beyond Git Harnessing the Power of OCIFlux Beyond Git Harnessing the Power of OCI
Flux Beyond Git Harnessing the Power of OCI
 
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes ClustersAutomated Provisioning, Management & Cost Control for Kubernetes Clusters
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
 
How to Avoid Kubernetes Multi-tenancy Catastrophes
How to Avoid Kubernetes Multi-tenancy CatastrophesHow to Avoid Kubernetes Multi-tenancy Catastrophes
How to Avoid Kubernetes Multi-tenancy Catastrophes
 
Building internal developer platform with EKS and GitOps
Building internal developer platform with EKS and GitOpsBuilding internal developer platform with EKS and GitOps
Building internal developer platform with EKS and GitOps
 
GitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdfGitOps Testing in Kubernetes with Flux and Testkube.pdf
GitOps Testing in Kubernetes with Flux and Testkube.pdf
 
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and LinkerdIntro to GitOps with Weave GitOps, Flagger and Linkerd
Intro to GitOps with Weave GitOps, Flagger and Linkerd
 
Implementing Flux for Scale with Soft Multi-tenancy
Implementing Flux for Scale with Soft Multi-tenancyImplementing Flux for Scale with Soft Multi-tenancy
Implementing Flux for Scale with Soft Multi-tenancy
 
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKSAccelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
 
The Story of Flux Reaching Graduation in the CNCF
The Story of Flux Reaching Graduation in the CNCFThe Story of Flux Reaching Graduation in the CNCF
The Story of Flux Reaching Graduation in the CNCF
 
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
 
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
 
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Flux’s Security & Scalability with OCI & Helm Slides.pdfFlux’s Security & Scalability with OCI & Helm Slides.pdf
Flux’s Security & Scalability with OCI & Helm Slides.pdf
 
Flux Security & Scalability using VS Code GitOps Extension
Flux Security & Scalability using VS Code GitOps Extension Flux Security & Scalability using VS Code GitOps Extension
Flux Security & Scalability using VS Code GitOps Extension
 
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOpsDeploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
 

Recently uploaded

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 

Recently uploaded (20)

How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 

PromQL Deep Dive - The Prometheus Query Language

  • 1. Prometheus: PromQL Deep Dive Jeff Hoffer, Developer Experience github.com/eudaimos
  • 2. Agenda 1. What is PromQL 2. PromQL Operators 3. PromQL Functions 4. Hands On: Building Queries in PromQL 5. Hands On: Visualizing PromQL in Grafana 6. Training on real app 7. What’s next?
  • 3. What is PromQL • Powerful Query Language of Prometheus • Provides built in operators and functions • Vector-based calculations like Excel • Expressions over time-series vectors
  • 4. Expressions (and sub-expressions) • Instant Vector - set of time series containing single sample for each time series, all sharing same timestamp • e.g. http_request_count => results in: • http_request_count{status=“200”} 20 • http_request_count{status=“404”} 3 • http_request_count{status=“500”} 5
  • 5. Expressions (and sub-expressions) • Instant Vector - set of time series containing single sample for each time series, all sharing same timestamp • e.g. http_request_count => results in: • http_request_count{status=“200”} 20 • http_request_count{status=“404”} 3 • http_request_count{status=“500”} 5 • Range Vector - set of time series containing a range of data points over time for each series • e.g. http_request_count[5m] => results in: • http_request_count{status=“200”}
  • 6. Expressions (and sub-expressions) • Instant Vector - set of time series containing single sample for each time series, all sharing same timestamp • e.g. http_request_count => results in: • http_request_count{status=“200”} 20 • http_request_count{status=“404”} 3 • http_request_count{status=“500”} 5 • Range Vector - set of time series containing a range of data points over time for each series • e.g. http_request_count[5m] => results in: • http_request_count{status=“200”} • Scalar - as a literal and as result of an expression • String - only currently as a literal in an expression
  • 7. Time Series Selectors • Instant Vector Selectors • num_nodes • num_nodes{role=“backend”}
  • 8. Time Series Selectors • Instant Vector Selectors • num_nodes • num_nodes{role=“backend”} • Range Vector Selectors (s, m, h, d, w, y) • num_nodes{role=“backend”}[5m]
  • 9. Time Series Selectors • Instant Vector Selectors • num_nodes • num_nodes{role=“backend”} • Range Vector Selectors (s, m, h, d, w, y) • num_nodes{role=“backend”}[5m] • Offset Modifier • num_nodes{role=“backend”}[5m] offset 1w
  • 10. Operators: Binary • Arithmetic: +, -, *, /, %, ^ – scalar/scalar – vector/scalar – vector/vector
  • 11. Operators: Binary • Arithmetic: +, -, *, /, %, ^ – scalar/scalar – vector/scalar – vector/vector • Comparison: ==, !=, >, <, >=, <= – filters results unless bool operator provided (converts 0 or 1) – scalar/scalar requires bool operator – vector/scalar & vector/vector drops elements unless bool operator provided
  • 12. Operators: Binary • Arithmetic: +, -, *, /, %, ^ – scalar/scalar – vector/scalar – vector/vector • Comparison: ==, !=, >, <, >=, <= – filters results unless bool operator provided (converts 0 or 1) – scalar/scalar requires bool operator – vector/scalar & vector/vector drops elements unless bool operator provided • Logical/Set Binary: only defined between Instant Vectors – and = intersection between vector1 and vector2 – or = union of vector1 and vector2 – unless = elements of vector1 for which no matches in vector2
  • 13. Operators: Vector Matching • Label Matching – ignoring keyword – on keyword
  • 14. Operators: Vector Matching • Label Matching – ignoring keyword – on keyword • One-to-one - finds unique pair of entries with all labels matching
  • 15. Operators: Vector Matching • Label Matching – ignoring keyword – on keyword • One-to-one - finds unique pair of entries with all labels matching • Many-to-one / One-to-many - where each element on a “one” side can multiple elements on the “many” side – group_left v group_right determines cardinality – only used for comparison and arithmetic operations
  • 16. Operators: Aggregation • Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values – sum, avg – min, max – stddev, stdvar – count, count_values* – bottomk*, topk* – quantile* *takes a parameter before the vector
  • 17. Operators: Aggregation • Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values – sum, avg – min, max – stddev, stdvar – count, count_values* – bottomk*, topk* – quantile* *takes a parameter before the vector • without clause removes listed labels from resulting vector
  • 18. Operators: Aggregation • Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values – sum, avg – min, max – stddev, stdvar – count, count_values* – bottomk*, topk* – quantile* *takes a parameter before the vector • without clause removes listed labels from resulting vector • by clause drops labels not listed from the resulting vector
  • 19. Operators: Aggregation • Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values – sum, avg – min, max – stddev, stdvar – count, count_values* – bottomk*, topk* – quantile* *takes a parameter before the vector • without clause removes listed labels from resulting vector • by clause drops labels not listed from the resulting vector • keep_common (with by) will keep labels that exist in all elements but not listed in the by clause
  • 20. Operators: Aggregation • Aggregate elements of a single Instant Vector resulting in a new vector of fewer elements w/ aggregated values – sum, avg – min, max – stddev, stdvar – count, count_values* – bottomk*, topk* – quantile* *takes a parameter before the vector • without clause removes listed labels from resulting vector • by clause drops labels not listed from the resulting vector • keep_common (with by) will keep labels that exist in all elements but not listed in the by clause • topk/bottomk - only subset of original values are returned including original labels - by and without only bucket the input
  • 21. Functions: Utilities • time() - number of seconds since Unix Epoch when the expression is run • vector(s scalar) - returns a vector from a scalar • scalar(v vector) - returns scalar value of a single sampled vector or NaN
  • 22. Functions: Time-based Instant Vector • default v=vector(time()) • day_of_month(v) • day_of_week(v) • days_in_month(v) • hour(v) • minute(v) • month(v) • year(v)
  • 23. Functions: Instant Vector • abs(v) • absent(v) • ceil(v) • clamp_max(v, scalar), clamp_min(v, scalar) - clamps the sample values to have an upper/lower limit • count_scalar(v) • drop_common_labels(v) • exp(v) • floor(v), round(v) • label_replace(v, dst_label string, replacement string, src_label string, regex string) • ln(v), log2(v), log10(v) • sort(v), sort_desc(v) • sqrt(v)
  • 24. Functions: Range Vector • changes()ˆ • delta()˚*, idelta()˚* - diff between first and last in each time series element • deriv()* - per sec derivative using simple linear regression • holt_winters(v, sf scalar, tf scalar)* - smooth value for time series based on range in v • increase()ˆ - syntactic sugar for rate(v[T]) * (seconds in T) • irate()ˆ, rate()ˆ - per second instant/avg rate of increase • predict_linear(v, t scalar)* - predict value at time t using simple linear regression • resets()ˆ - number of times a counter reset • <aggregation>_over_time()˚ - aggregate each series of a range vector over time returning instant vector with per series aggregation results • ˚returns an instant vector, *should only be used with gauges, ˆshould only be used with counters
  • 25. Metrics Types Basic Counters Sampling Counters counter histogram gauge summary
  • 26. Metrics Types - Basic Counters • counter - single numeric metric that only goes up • gauge - single numeric metric that arbitrarily goes up or down
  • 27. Metric Types - Sampling Counters • histogram - samples observations and counts them in configurable buckets • summary - samples observations and counts them
  • 28. Metric Types - Sampling Counters • histogram - samples observations and counts them in configurable buckets • summary - samples observations and counts them
  • 29. Metrics Types - Sampling Counters Histogram!?
  • 30. Metric Types - Sampling Counters • both histogram and summary have: – <name>_sum - time series summing the value of all observations – <name>_count - time series counter for the number of observations taken
  • 31. Metric Types - Sampling Counters • both histogram and summary have: – <name>_sum - time series summing the value of all observations – <name>_count - time series counter for the number of observations taken • histograms: – buckets are configured on client when creating metrics – time series for each bucket as <name>_bucket{…,le=“<bucket-upper-bound>”} counting the number of observations less than or equal to the upper bound of the bucket – ad-hoc quantile specification using the histogram_quantile(quantile, instant-vector) function
  • 32. Metric Types - Sampling Counters • both histogram and summary have: – <name>_sum - time series summing the value of all observations – <name>_count - time series counter for the number of observations taken • histograms: – buckets are configured on client when creating metrics – time series for each bucket as <name>_bucket{…,le=“<bucket-upper-bound>”} counting the number of observations less than or equal to the upper bound of the bucket – ad-hoc quantile specification using the histogram_quantile(quantile, instant-vector) function • summaries: – quantiles are defined on the client when creating metrics – time series for each quantile as <name>{…,quantile=“<quantile-upper-bound>”} keeping the streaming quantile calculation from the client – are generally not aggregatable
  • 38. Refining Rate rate(requests[5m]) sum(rate(requests[5m])) by(service_name) sum(rate(requests{service_name=“catalogue”}[5m])) by(instance) request_duration as a histogram - derive average request duration over a rolling 5 minute period rate(request_duration_sum[5m]) / rate(request_duration_count[5m])
  • 39. RED Monitoring • (Request) Rate - the number of requests per second your services are serving • (Request) Errors - the number of failed requests per second • (Request) Duration - distributions of the amount of time each request takes
  • 41. Join the Weave user group! meetup.com/pro/Weave/
 weave.works/help
  • 42. Other topics • Kubernetes 101 • Continuous delivery: hooking up my CI/CD pipeline to Kubernetes • Network policy for security We have talks on all these topics in the Weave user group!
  • 43. Thanks! Questions? We are hiring! DX in San Francisco Engineers in London & SF weave.works/weave-company/hiring