Prometheus Scrapping Issue for query-exporter

27 views
Skip to first unread message

Pravin Patil

unread,
Jun 25, 2020, 2:21:48 PM6/25/20
to Prometheus Users

Hi,

Have developed db2 query exporter for Prometheus,
build below sample select query,
select name as "db2_mycounter_name", total as "db2_mycounter_total" from myfakecounter


and inserted 2 values into table

insert into myfakecounter values ( 'counter1', 100 )
insert into myfakecounter values ( 'counter2, 200 )


I'm able to see both values on Prometheus console.


However, after a while, i have deleted counter2 value i.e 200  from database.


But in Prometheus console still seeing 200 value which I have deleted
Its not showing me the existing results of select query i.e only counter 1 value


Want to know how to get the latest query results using promql?

Brian Candler

unread,
Jun 25, 2020, 3:31:45 PM6/25/20
to Prometheus Users
What does "curl" show if you try to scrape your exporter manually?

Pravin Patil

unread,
Jun 26, 2020, 2:27:39 AM6/26/20
to Prometheus Users



if I scrap it manually, it will show me the expected results

Stuart Clark

unread,
Jun 26, 2020, 9:37:32 AM6/26/20
to Pravin Patil, Prometheus Users
On 26/06/2020 07:27, Pravin Patil wrote:
>
> if I scrap it manually, it will show me the expected results


If that database change causes it to not output a particular metric at
all it will disappear from Prometheus after about 5 minutes.

Generally counters shouldn't just disappear, instead just continuing
with no changes to their value.

Reply all
Reply to author
Forward
0 new messages