oracledb_exporter icon indicating copy to clipboard operation
oracledb_exporter copied to clipboard

oracledb_exporter how to add frequency for a query

Open SS30723 opened this issue 4 years ago • 5 comments

We are using oracledb_exporter to pull metrics from DB. I need certain custom queries to be called every 5 minutes and some to called every 1 hour. How to achieve this?

SS30723 avatar May 27 '21 18:05 SS30723

There is no way to do that. You can only set the scrapping frequency in Prometheus.

Yannig avatar Jun 03 '21 12:06 Yannig

You can (and we do) run multiple instances of oracledb_exporter with different custom queries. Configure Prometheus to scrape both as separate targets, and give each target it's own scrape_interval setting.

neilschelly avatar Jun 03 '21 12:06 neilschelly

It is indeed a good idea.

To avoid starting the exporter several times, another approach could be to do as for the system exporter: select the modules that you want to recover at the time of collection. But for the moment, the exporter don't handle this kind of feature.

PR welcome :)

Yannig avatar Jun 03 '21 13:06 Yannig

I would like to implement this feature. Please let me know if I need to follow any guidelines. I got it to work locally by following the node exporter approach with a custom handler.

PS: I am new to programming and open source so any guidance is much appreciated.

ekamdve avatar Jul 07 '21 20:07 ekamdve

Hi, I am running 4 instances of exporter to cover 4 dbs. Everything was running fine for a couple of days but now always one of the exporters is refusing to expose metrics on the port. I can see in debug that all of them are collecting metrics as expected, but one always stops exposing metrics on given port.

I tried changing ports around and still same issue occurs. Do you have similar problem when you run multiple exporters? Do you know what could cause that issue?

hestiacloud avatar Sep 22 '21 08:09 hestiacloud