Commit 36aad1c1 by Björn Rabenstein Committed by David

Prometheus: improve tooltips (#21247)

* Prometheus data source: Update tooltip for _Scrape interval_

The old tool tip was plainly wrong. The globally configured scrape
interval is not necessarily the most used scrape interval, so the new
wording is describing what actually matters. The evaluation interval
wasn't even mentioned before. And finally, the configured value is
not strictly a lower limit for the step query parameter as it can be
overridden by the panel option _Min time interval_.

I plan to explain the overriding intricacies in the tool tip for _Min
time interval_.

Signed-off-by: beorn7 <beorn@grafana.com>

* Improve tooltip for _Min step_

The previous tool tip was mostly addressing aspects that are not
specific to _Min step_ (and might be more appropriate to be added to
the _Min time interval_ tool tip as that setting has a wider
scope). The new version emphasizes the important gotchas: that this is
an _additional_ lower limit, and that it is _not_ multiplied by the
resolution factor.

Signed-off-by: beorn7 <beorn@grafana.com>

* Fixed snapshot

Co-authored-by: David <david.kaltschmidt@gmail.com>
parent 45b7de19
......@@ -128,9 +128,12 @@ export class PromQueryEditor extends PureComponent<Props, State> {
<div className="gf-form">
<FormLabel
width={7}
tooltip="Leave blank for auto handling based on time range and panel width.
Note that the actual dates used in the query will be adjusted
to a multiple of the interval step."
tooltip={
<>
An additional lower limit for the step parameter of the Prometheus query and for the{' '}
<code>$__interval</code> variable. The limit is absolute and not modified by the "Resolution" setting.
</>
}
>
Min step
</FormLabel>
......
......@@ -44,9 +44,16 @@ exports[`Render PromQueryEditor with basic options should render 1`] = `
className="gf-form"
>
<Component
tooltip="Leave blank for auto handling based on time range and panel width.
Note that the actual dates used in the query will be adjusted
to a multiple of the interval step."
tooltip={
<React.Fragment>
An additional lower limit for the step parameter of the Prometheus query and for the
<code>
$__interval
</code>
variable. The limit is absolute and not modified by the "Resolution" setting.
</React.Fragment>
}
width={7}
>
Min step
......
......@@ -34,8 +34,7 @@ export const PromSettings = (props: Props) => {
validationEvents={promSettingsValidationEvents}
/>
}
tooltip="Set this to your global scrape interval defined in your Prometheus config file. This will be used as a lower limit for the
Prometheus step query parameter."
tooltip="Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s."
/>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment