Different databases for different targets

14 views
Skip to first unread message

Guna Kambalimath

unread,
Nov 25, 2020, 6:36:59 AM11/25/20
to Prometheus Users
Hey there,

Question1:
How does prometheus internally store the metrics ? Is it possible to view the same (not in prometheus UI). Just like we can view influx Time Series Data Base, is it possible to view the Prometheus DB ? Does prometheus have any structure of storing data like, databases and measurements in influx ?

Question 2:

Currently, I have my targets configured like this:
scrape_configs:
- job_name: 'job1'
  metrics_path: /job1/metrics
  static_configs:
  - targets: ['<ip1>:<port1>']
    labels:
      vmid: vm1

- job_name: 'job2'
  metrics_path: /job2/metrics
  static_configs:
  - targets: ['<ip2>:<port2>']
    labels:
      vmid: vm2

In the metrics obtained from targets, we can query anything based on job, for example:  kube_pod_container_info{job="<job-name>"},
wouldn't it be efficient to have Database sort of a thing?

Please excuse me, as I am not aware of internally how prometheus interaction with Time Series Data base works.

Thanks,
Guna

Stuart Clark

unread,
Nov 25, 2020, 7:12:25 AM11/25/20
to Guna Kambalimath, Prometheus Users
Prometheus stores data in a time series database, which is designed specifically for the needs of the application. That data is stored on disk in a variety of files and directories, including a Write Ahead Log (WAL) and set of blocks.

Running PromQL queries is how you can see what is stored in the database.

I'm not really sure what you are asking in your second question. Prometheus is storing everything in time series database.

One big difference between the database within Prometheus and something like InfluxDB or MySQL is that Prometheus isn't a general purpose database you would use with other applications. It is an intrinsic part of Prometheus, which manages all reading and writing of data via the scraping process and query APIs.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Reply all
Reply to author
Forward
0 new messages