Get a DemoStart Free TrialSign In

Getting Started

4 min read

Last updated:

If you are an engineer searching for a new role that involves a high level of knowledge on the monitoring stack Prometheus then you will likely wish to brush up on your knowledge of Prometheus ahead of your interview.

In this guide, you will find a list of the most popular questions that are most likely to be asked to candidates looking to use Prometheus as part of their daily monitoring stack within their next role.

At the end of this list, we’ve also included a number of helpful resources to help you go even further in your education on Prometheus.

Contents

1. What Is Prometheus?

Prometheus is a monitoring and alerting stack that was created back in 2012 at SoundCloud and has been part of the CNCF (Cloud Native Computing Foundation) since 2016.

Prometheus is able to handle monitoring for time-series metrics in its stride and is able to perform functions such as addition, averaging metrics over time and multiplying any time-series metrics it is given.

2. What Is Prometheus Monitoring?

Prometheus monitoring provides a way for users to collect and process metrics from their applications by scraping and capturing time-series metrics.

3. What Is Prometheus Monitoring Used For?

The Prometheus monitoring tool was initially created due to the lack of tools available that were suitable for monitoring dynamic cluster scheduling within containers.

4. What Is PromQL?

The dedicated querying language used by Prometheus to perform calculations and a wide array of other functions is known as PromQL.

5. Why Would You Use Prometheus & Grafana Together?

As Prometheus is able to collect time-series metrics easily and Grafana provides a solution for transforming this data into meaningful reports and data visualisation, using these two tools on top of each other offers users many benefits.

Find out more about Grafana in our guide detailing the benefits of using Grafana vs Kibana.

6. Is Prometheus A Time Series Database?

Prometheus is classified as an open-source time-series database. A time-series database is designed to store and retrieve time-series data along with its associated timestamps. A commonly seen example of time-series metrics that you may have seen visualised previously is a stock price tracker.

7. How Do You Find The Number Of Kubernetes Pods Per Namespace?

To find the number of pods per namespace you will need to use the PromQL command sum by (namespace) (kube_pod_info)

8. How Do You Find The CPU Usage By Instance?

To find the CPU usage by instance you will need to use the PromQL command 100 * ( 1 - avg by(instance) (irate(node_cpu{mode='idle'}[5m])))

9. How Do You Find The HTTP Error Rate As A Percentage Of Total Traffic?

To find the HTTP error rate as a percentage of total traffic you will need to use the PromQL command rate(http_requests_total{status_code=~"5.*"}[5m] / rate (http_requests_total[5m])

10. How Do You Find The Increase Between Recent Samples?

To find the increase between recent samples you will need to use the PromQL command irate(http_requests_total[10m])

11. How Do You Display The Time Series Of A Metric?

To display the time series of a metric you will need to use the PromQL command {_name_="node_cpu_seconds_total"}

12. How Do You Return Everything From The Query Time Looking Back?

To return everything from the query time looking back you will need to use the PromQL command up offset 10m

13. How Do You Set A Bound On The Returned Values?

To set a bound on the returned values you will need to use the PromQL command clamp_min(go_goroutines,20)

14. How Do You Get The Total Number Of Times Compaction Happens Per Second Per Instance?

To get the total number of times compaction happens per second per instance you will need to use the PromQL command sum by(instance)(rate(prometheus_tsdb_compactiong_duration_seconds_count[5m]))

15. How Do You Get The Size Of The Biggest Mounted Filesystem On Each Machine?

To get the size of the biggest mounted filesystem on each machine you will need to use the PromQL command # Using by max by (instance)(node_filesystem_size_bytes)

16. How Do You Get Changes In Memory Usage In The Node Exporter Over The Past Hour?

To get changes in memory usage in the node exporter over the past hour you will need to use the PromQL command process_resident_memory_bytes{job="node"} - process_resident_memory_bytes{job="node"} offset 1h

17. How Do You Select All HTTP Status Codes Except For 4xx Ones?

To select all HTTP status codes except for 4xx ones you will need to use the PromQL command http_requests_total{status!~"4.."}

18. How Do You Return The K Time Series With The Highest Values?

To return the K time series with the highest values you will need to use the PromQL command Topk

19. How Do You Return The K Time Series With The Lowest Values?

To return the K time series with the lowest values you will need to use the PromQL command Bottomk

20. How Do I Measure The Total CPU Usage By The Process?

To measure the total CPU usage by the process you will need to use the PromQL command Process_cpu_seconds_total

21. How Do I Add A New Label Name In Prometheus?

To add a new label name you will need to use the PromQL command Prometheus label_replace

Next Steps

Take your knowledge beyond these Prometheus monitoring interview questions with the following recommended educational resources:

Prometheus: Up & Running

Robust Perception - Blog

Awesome Prometheus Alerts

Don’t have the time to host, federate and scale your Prometheus monitoring stack locally? Then why not get started with fully managed and hosted Prometheus, completely free for the first 14 days.

If you enjoyed this resource guide on the most popular Prometheus interview questions then why not continue reading with our guides on the best practices for Python Logging or the leading Java development tools?

Get the latest elastic Stack & logging resources when you subscribe

© 2024 Logit.io Ltd, All rights reserved.