20 votes

How to find out the number of time series stored in Prometheus LevelDB

How about count({__name__=~".+"})? It does return number of time series in the database. I compared with amount of metrics currently exposed by each target by manual scrapping, and it matches it +/- ...
Zaar Hai's user avatar
  • 507
17 votes
Accepted

Prometheus: no metric node_cpu

The 0.16.0 version of the node exporter improved many key metrics to follow naming guidelines that arose since it was created, so node_cpu_seconds_total is the new name. Many dashboards etc. are still ...
brian-brazil's user avatar
  • 3,952
14 votes
Accepted

How to find out the number of time series stored in Prometheus LevelDB

prometheus_tsdb_head_series Just because I always forget and have to Google this, and this question is at the top. As per this answer there will likely be a variance between ...
Glenn Slaven's user avatar
  • 2,420
10 votes
Accepted

How to split out Prometheus config files?

The Prometheus config file (and other config files in the ecosystem) explicitly do not support any form of templating. Instead this is left up to your configuration management system to handle. ...
brian-brazil's user avatar
  • 3,952
9 votes

Prometheus Alert Rule for Absent Discovered Target

Or do I need to hard code rules for each service/node/pod explicitly, even though it was auto discovered? Yes, you need a rule for every individual thing to you to alert on being missing as ...
brian-brazil's user avatar
  • 3,952
8 votes

How to find out the number of time series stored in Prometheus LevelDB

https://prometheusui.com:9090/status ---> Head Stats --> this will give you the entire status.
midhun k's user avatar
  • 161
8 votes

Netdata, prometheus and grafana - why recommended in this constellation?

In summary, Grafana will display metrics collected by Prometheus from netdata. There's no benefit to rolling out a stack like that except that Prometheus has scaling capabilities that has made it ...
Ginnungagap's user avatar
  • 2,694
6 votes

Prometheus Alert Rule for Absent Discovered Target

We've been solving something similar. Our setup: when some service starts somewhere, some metrics appear with a non-zero value. Then, if any of those metrics go missing, we want an alert. In our case,...
David's user avatar
  • 387
6 votes
Accepted

Can I tail the log of ONE container in a docker-compose group?

The docker-compose binary only commands the docker daemon. You can simply use the docker command to get what you need. Use docker ps or docker ps -a to find out about your containers. Use docker logs ....
Fiisch's user avatar
  • 323
5 votes
Accepted

How do I configure the log level of Prometheus' Alertmanager?

The answer is that its not possible to set Prometheus' Alertmanagers log level to debug through the config file, it is only possible through commandline arguments. Do not ask me why, I'm sure they had ...
Rovanion's user avatar
  • 629
4 votes

How to find out the number of time series stored in Prometheus LevelDB

After some more research and thanks to the comments of David.B i found a solution that 'works for me' ™ To find the number of time series stored by Prometheus i use this command in the storage....
Tobias Wiesenthal's user avatar
4 votes

How to monitor REST API latency with Prometheus and Grafana

You could use my tomcat_exporter to do this by configuring the filter for the response time metrics. Alternatively you could implement a similar filter by yourself.
rswart's user avatar
  • 41
4 votes

Monitor Gitea with Prometheus

Gitea can export Prometheus metrics (since ~ 1.7.1) , but that's disabled by default. In the configuration file conf/app.ini, you should add: [metrics] ENABLED=true The metrics are exposed on the ...
Franklin Piat's user avatar
4 votes

What does it mean to have more than one instance of Prometheus in Kubernetes

You can also run two instances/replicas of Prometheus in parallel, both scraping targets and saving the data independently, then have another service like Thanos Query in front of them to query both ...
Ali Sattari's user avatar
4 votes

Netdata, prometheus and grafana - why recommended in this constellation?

I would suggest, that if you are just starting out, a combination of the Netdata Agent + Netdata Cloud has you covered. You install the Netdata Agent on every computer that you wish to monitor and you ...
odysseas lamtzidis's user avatar
3 votes
Accepted

Kubernetes: horizontal auto-scaling based on metrics in another namespace

Ah, I've figured it out. Here's the part of the prometheus-adapter configuration I needed: rules: - seriesQuery: '{__name__=~"^nginx_ingress_.*",namespace!=""}' seriesFilters: [] ...
Volodymyr Melnyk's user avatar
3 votes

Disk usage metrics missing from Prometheus node exporter

Pay your attention to /etc/default/prometheus-node-exporter: for e. g., recently I realised Ubuntu's (18.04) package cuts out by default all disks statistics: ARGS="--collector.diskstats.ignored-...
poige's user avatar
  • 9,505
3 votes

Smoothing Grafana graph

I should preface my answer by saying that I'm a Prometheus newbie getting used to PromQL myself. I should remind myself that 'rate' is something that should only be applied to counters, and not ...
Cameron Kerr's user avatar
  • 4,109
3 votes

Prometheus - Use case of service discovery by role endpoints and role pod in Kubernetes

Kubernetes SD in Prometheus has a collection of so-called “roles”, which defines how to collect and display metrics. Each Role has its own set of labels which you already know from the official ...
Wytrzymały Wiktor's user avatar
3 votes

How do I configure the log level of Prometheus' Alertmanager?

On Ubuntu systems (if prometheus-alertmanager was installed via apt and from official repo). Open /etc/default/prometheus-alertmanager And add ARGS="--log.level=debug" to file (replace ...
Vsevolod Gromov's user avatar
3 votes

Wipe all stored prometheus metrics?

Prometheus stores its TSDB in /var/lib/prometheus in most default packages. It will initialize it on startup if it doesn't exist so simply clearing its content is enough. If you've played around with ...
Ginnungagap's user avatar
  • 2,694
3 votes
Accepted

Use let's encrypt certificates with the prometheus node exporter

Both the directry /etc/letsencrypt/archive containing the keys & the certificates and the directory /etc/letsencrypt/live containing the symbolic links to the current certificate & key are ...
Esa Jokinen's user avatar
  • 49.4k
3 votes
Accepted

How to share docker metrics with Prometheus using Ubuntu server Snap Docker Service

Docker Compose is creating a network called "prometheus_default" and it's attaching the Prometheus container to that network. You have Docker daemon set to advertise metrics on the docker0 ...
nijave's user avatar
  • 426
2 votes
Accepted

Prometheus with remote_write and backups

1) Do I need to back up the prometheus TSDB if data is being pushed into remote storage? You don't have to. Or will it attempt to query the long term storage for instance if it does not have ...
brian-brazil's user avatar
  • 3,952
2 votes

Set Grafana dashboard variable from Prometheus scalar

This works if you put this in the regex box in grafana /.*\s(.*)\s.*/
fargusto's user avatar
  • 121
2 votes

GitLab and Prometheus failure

The issue is gitlab runs Prometheus in a pyvenv setup which I can't find where it is. You can always pip install leveldb And then run the command.. it should work
Mike's user avatar
  • 22.5k
2 votes
Accepted

How to monitor downtime of a remote third party MySQL Server?

A simple script to bind to the database works for me when I need to monitor remote MySQL instances. I prefer Python because it integrates well with my monitoring system, but any script that binds to ...
Nate's user avatar
  • 36
2 votes
Accepted

What alerting setup can give me an overview of my Prometheus alert states?

Without getting prometheus-specific, a good monitoring system informs you both ways: it tells you what it believes you need to know, and it lets you find what you want to know as quickly and ...
MadHatter's user avatar
  • 80.4k
2 votes

Prometheus 1.5.2 behind Apache 2.4 reverse proxy

I'm running newer versions of prometheus now, I had this in the 1.X series as well, -web.external-url=https://<proxyhost>/prometheus Try and see if it works in your version (I can't find ...
Fredrik's user avatar
  • 550
2 votes
Accepted

How to check to exist a unit systemd on the servers by Prometheus?

My solution for this is just monitoring if someone listening to some port on the server, that used by service_1.
tutunak's user avatar
  • 63

Only top scored, non community-wiki answers of a minimum length are eligible