Questions tagged [prometheus]

The Prometheus monitoring system, including the server, alertmanager, push gateway, exporters, client libraries and other components.

Prometheus is a go-based open-source monitoring system inspired by Google's approach to monitoring.

Prometheus itself is a time-series storage server that periodically pulls metrics from monitored entities. These metrics can then be queried and alerted-upon using simple query and alert languages.

Prometheus comes with a suite of supporting tools like alertmanager, exporters and client libraries, designed to work together in providing a highly scalable and complete monitoring solution. Metric visualizations is usually done with Grafana, which seamlessly connects with Prometheus.

Prometheus's official site.

Read more about Prometheus's approach here:

  • This article explains Prometheus metric gathering approach for beginners.

  • This chapter from the online book "Site Reliability Engineering" describes Google's monitoring system Borgmon. Prometheus is mentioned in this chapter and was designed with Google's approach in mind.

6591 questions
17
votes
0 answers

Usage guidelines for Prometheus C++?

I've looked at the syntax example in prometheus-cpp and the very similar go one in the main prometheus documentation, and I'm not sure how I'm supposed to use similar code in my C++ application. Go uses a global variable to hold the counter, C++…
Code Abominator
  • 1,571
  • 18
  • 23
17
votes
3 answers

Query label_values not found in Prometheus

In the Grafana documentation, I found that I should be able to query my Prometheus server for all instances delivering monitoring data using the label_values query. The query I'm using in Grafana is: label_values(up, instance) Unfortunately,…
Tim Hartnack
  • 321
  • 1
  • 3
  • 10
17
votes
2 answers

Dynamically add targets to a Prometheus configuration

For a particular job in Prometheus, it seems like the typical config is something like this: static_configs: - targets: ['localhost:9090'] But in the case where I want a dynamic list of hosts, what would be the approach there? I was looking at…
Thomas Stringer
  • 5,682
  • 3
  • 24
  • 40
17
votes
1 answer

How to automatically test Prometheus alerts?

We are about to setup Prometheus for monitoring and alerting for our cloud services including a continous integration & deployment pipeline for the Prometheus service and configuration like alerting rules / thresholds. For that I am thinking about 3…
17
votes
2 answers

Prometheus query - exclude destination

On my ActiveMQ I have some Queues, which end with .error. On a Grafana Dashboard I want to list all queues without these .error-queues. Example: some.domain.one some.domain.one.error some.domain.two some.domain.two.error To list all queues I use…
Marco H
  • 173
  • 1
  • 1
  • 5
16
votes
3 answers

How to edit the Configurations of a Helm Chart?

Hi everyone, I have deployed a Kubernetes cluster based on kubeadm and for the purpose of performing HorizontalPodAutoscaling based on the Custom Metrics, I have deployed prometheus-adpater through Helm. Now, i want to edit the configuration for…
16
votes
2 answers

Why is CPU utilization calculated using irate or rate in Prometheus?

I know that CPU utilization is given by the percentage of non-idle time over the total time of CPU. In Prometheus, rate or irate functions calculate the rate of change in a vector array. People often calculate the CPU utilisation by the following…
lxjhk
  • 567
  • 2
  • 7
  • 13
16
votes
2 answers

scrape interval and evaluation interval in prometheus

My scrape interval and evaluation interval are way off from each other as whown below (15s vs 4m). When I feed metrics to the endpoint, I find that the rules are evaluated every 4m which is expected. However, what I dont understand is that it does…
TheMonkWhoSoldHisCode
  • 2,182
  • 3
  • 26
  • 40
16
votes
2 answers

How do I delete a time series from Prometheus v2, specifically a series of alerts

We are getting to grips with alerting so from time to time need to clear out old alerts which we did by calling the HTTP API, to remove the pseudo time series where the alerts were stored, e.g.: DELETE…
Spangen
  • 4,420
  • 5
  • 37
  • 42
16
votes
4 answers

Average Memory Usage Query - Prometheus

How do I write a query that outputs average memory usage for instances over the past 24 hours? The following query displays the current memory usage 100 * (1 - ((node_memory_MemFree + node_memory_Cached + node_memory_Buffers) /…
pdna
  • 541
  • 1
  • 8
  • 17
16
votes
1 answer

Measure service latency with Prometheus

I am new to Prometheus and Grafana. My primary goal is to get the response time per request. For me it seemed to be a simple thing - but whatever I do I do not get the results I require. I need to be able to analyse the service latency in the last…
eventhorizon
  • 2,977
  • 8
  • 33
  • 57
16
votes
2 answers

Prometheus with multi-container pod on kubernetes

I have a multi-container pod in my kubernetes deployment: java redis nginx For every of those containers, there's a container with Prometheus exporter as well. The question is how can I expose those ports to Prometheus if annotations section…
d.ansimov
  • 2,131
  • 2
  • 31
  • 54
15
votes
2 answers

How can I sort the legend by series name in Prometheus/Grafana

I have a Grafana dashboard panel configured to render the results of a Prometheus query. There are a large number of series returned by the query, with the legend displayed to the right. If the user is looking for a specific series, they have to…
MidnightJava
  • 1,927
  • 2
  • 18
  • 38
15
votes
2 answers

Omit labels from series results PromQL

Suppose I write a basic PromQL query like this Query: kube_deployment_spec_replicas{}…
Edward
  • 153
  • 1
  • 1
  • 6
15
votes
4 answers

How to silence Prometheus Alertmanager using config files?

I'm using the official stable/prometheus-operator chart do deploy Prometheus with helm. It's working good so far, except for the annoying CPUThrottlingHigh alert that is firing for many pods (including the own Prometheus' config-reloaders…