I've written a CustomCollector to capture some device information via API 
calls. I'm registering my CustomCollector() code as follows;

   start_http_server(8000)
    REGISTRY.register(CustomCollector())
    while True:
        time.sleep(1)

The API calls I'm making to generate data are fairly expensive, and I only 
want to update the information every 5 minutes. I have Prometheus scraping 
this target at 5 minute intervals - that part is fine.

However, the CustomCollector code is being executed every 60 seconds, 
regardless of whether there has been a scrape request.

Is this default 60s interval configurable? I've looked through the register 
code in detail and browsed the client_python code but I haven't found 
anything significant.

Cheers,
Duane.

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/530a50d4-3793-4af1-95c7-9074a49c19e8o%40googlegroups.com.

Reply via email to