On Thu, 11 Jun 2020 at 05:50, Duane Schultz <[email protected]> wrote:

> 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.
>

Note that 2m is the maximum sane scrape interval.


> 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.
>

There's nothing in the Python client that'd do this, I'd presume something
else is hitting it over HTTP.

-- 
Brian Brazil
www.robustperception.io

-- 
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/CAHJKeLoS6ZQ6Y0J1oEza5f_VrkzVHxOOy3UBXdJN8eXjzn5n%2BA%40mail.gmail.com.

Reply via email to