Re: [prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Bo Liu
Sorry, forward to mail list manually.

Liu Bo 于2023年3月31日 周五上午9:53写道:

> Stuart Clark  writes:
>
> > On 2023-03-30 12:48, Ben Kochie wrote:
> >> No. As Brian says, it's intentional that this is not possible in order
> >> to avoid load spikes.
> >
> > And as Ben mentioned earlier the normal scrape intervals are usually
> > 15/30 seconds for normal metrics, or 1/2 minutes for slower use
> > cases. Therefore you'd only have to wait a short amount of time before
> > metrics start appearing - although often you need to wait for at least
> > a few scrapes to be able to do things like looking at counter increase
> > rates, etc.
>
> Thank you guys, I got it now, that's help me a lot.
>
> --
> Liu Bo
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABKmfmqdZJCN3Zp1AMTxoTCz1h4Wjp%2Bg30aEz%2Bk9-T3ptJfVvA%40mail.gmail.com.


Re: [prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Stuart Clark

On 2023-03-30 12:48, Ben Kochie wrote:

No. As Brian says, it's intentional that this is not possible in order
to avoid load spikes.


And as Ben mentioned earlier the normal scrape intervals are usually 
15/30 seconds for normal metrics, or 1/2 minutes for slower use cases. 
Therefore you'd only have to wait a short amount of time before metrics 
start appearing - although often you need to wait for at least a few 
scrapes to be able to do things like looking at counter increase rates, 
etc.


--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/328bf2ccb6b6eabf4fcd4205caa50835%40Jahingo.com.


Re: [prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Ben Kochie
No. As Brian says, it's intentional that this is not possible in order to
avoid load spikes.

On Thu, Mar 30, 2023, 12:46 Liu Bo  wrote:

> Ben Kochie  writes:
>
> > Prometheus is optimized to scrape at least every 1m. The typical
> > scrape interval is 15s.
>
> Thanks, so there's no way to actively ask prometheus to pull the
> target's metrics?
>
> --
> Liu Bo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/87tty2o6u1.fsf%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmoS03AQBg76KAVT2chLpQucUWcnhOMWh2SD87Q-Z4QvwQ%40mail.gmail.com.


Re: [prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Brian Candler
AIUI, it spreads them over the scrape interval. If it didn't, then when you 
add a whole load of new targets, they would all be scraped simultaneously 
in huge regular bursts.

On Thursday, 30 March 2023 at 11:46:06 UTC+1 Liu Bo wrote:

> Ben Kochie  writes:
>
> > Prometheus is optimized to scrape at least every 1m. The typical
> > scrape interval is 15s.
>
> Thanks, so there's no way to actively ask prometheus to pull the
> target's metrics?
>
> -- 
> Liu Bo
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/52126d24-fe01-462d-a002-cbcf28fc815cn%40googlegroups.com.


Re: [prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Liu Bo
Ben Kochie  writes:

> Prometheus is optimized to scrape at least every 1m. The typical
> scrape interval is 15s.

Thanks, so there's no way to actively ask prometheus to pull the
target's metrics?

-- 
Liu Bo

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/87tty2o6u1.fsf%40gmail.com.


Re: [prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Ben Kochie
Prometheus is optimized to scrape at least every 1m. The typical scrape
interval is 15s.

On Thu, Mar 30, 2023 at 12:01 PM Liu Bo  wrote:

>
> Hi guys, can I make prometheus to pull metrics from a target immediately
> after add this target to config?
>
> For now I have to wait scrape_interval after I add target to config,
> it's like if I set scrape_interval to 5m then I have to wait five
> minutes so that I cat query metrics from newly added target.
>
>
> --
> Liu Bo
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/87ileik16e.fsf%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CABbyFmo1GX5X8MxVoFvmPoAo-9Sq%2BQg-wB6DFgo2DdnT09kJDg%40mail.gmail.com.


[prometheus-users] Immediately pull metrics from target

2023-03-30 Thread Liu Bo


Hi guys, can I make prometheus to pull metrics from a target immediately
after add this target to config?

For now I have to wait scrape_interval after I add target to config,
it's like if I set scrape_interval to 5m then I have to wait five
minutes so that I cat query metrics from newly added target.


-- 
Liu Bo

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/87ileik16e.fsf%40gmail.com.