Search code examples
sqlinfluxdbprometheus

How to extract values from time series database written from Prometheus to Influxdb


hi i need help on how to actually view values being written to the database, no matter what i do i cant seem to get at the actually numbers.

I cant seem to write a influxdb query that will return actual values, ive been at it for hours.

I am trying to validate that certain data is being written into a influxdb database.

My setup node_exporter sends data to prometheus which then writes to an Influxdb database.

I have confirmed data node_exporter is sending the data, and prometheus is capturing it. On prometheus I am able to run query and get results:

tcp_count_by_http_2019{apache_component="category1",apache_rpc="category2"} 93983

jumping on the influxdb i am able to see a ton of data by executing

show series

but the output is to huge for me to validate the part of data i need. As ouput scrolls passed i can see labels from what i saw in the prometheus gui, and i have graphs that successfully pull in most of the data from influxdb so i know metrics are going in.

In Influxdb:

I ran the below with confirms the correct keys and fields are in the database but i want to view the value stored for the below.

> show tag keys on "test_influxdb"
name: _
tagKey
------
apache_component
apache_rpc

> show tag values on "test_influxdb" with key = "blaze_rpc" limit 5
name: _
key       value
---       -----
apache_component category1
apache_component category3
apache_rpc category2
apache_rpc category4

> show field keys
name: _
fieldKey fieldType
-------- ---------
f64      float

Hopefully the above is enough to explain what I am after. I want to look up these values show below in bold.

tcp_count_by_http_2019{apache_component="category1",apache_rpc="category2"} 93983


Solution

  • SELECT * FROM tcp_count_by_http_2019
    WHERE apache_component = 'category1' AND apache_rpc='category2'