From 36aad1c101bea11be5b9a1dec2e888ac7d709ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Rabenstein?= Date: Fri, 27 Dec 2019 09:49:42 +0100 Subject: [PATCH] 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 * 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 * Fixed snapshot Co-authored-by: David --- .../prometheus/components/PromQueryEditor.tsx | 9 ++++++--- .../__snapshots__/PromQueryEditor.test.tsx.snap | 13 ++++++++++--- .../prometheus/configuration/PromSettings.tsx | 3 +-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx b/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx index 75883e4cef3..91c1c98e317 100644 --- a/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx +++ b/public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx @@ -128,9 +128,12 @@ export class PromQueryEditor extends PureComponent {
+ An additional lower limit for the step parameter of the Prometheus query and for the{' '} + $__interval variable. The limit is absolute and not modified by the "Resolution" setting. + + } > Min step diff --git a/public/app/plugins/datasource/prometheus/components/__snapshots__/PromQueryEditor.test.tsx.snap b/public/app/plugins/datasource/prometheus/components/__snapshots__/PromQueryEditor.test.tsx.snap index d2dedc0392e..9723b983c4d 100644 --- a/public/app/plugins/datasource/prometheus/components/__snapshots__/PromQueryEditor.test.tsx.snap +++ b/public/app/plugins/datasource/prometheus/components/__snapshots__/PromQueryEditor.test.tsx.snap @@ -44,9 +44,16 @@ exports[`Render PromQueryEditor with basic options should render 1`] = ` className="gf-form" > + An additional lower limit for the step parameter of the Prometheus query and for the + + + $__interval + + variable. The limit is absolute and not modified by the "Resolution" setting. + + } width={7} > Min step diff --git a/public/app/plugins/datasource/prometheus/configuration/PromSettings.tsx b/public/app/plugins/datasource/prometheus/configuration/PromSettings.tsx index d3b3f80a2e0..d56f226dc8e 100644 --- a/public/app/plugins/datasource/prometheus/configuration/PromSettings.tsx +++ b/public/app/plugins/datasource/prometheus/configuration/PromSettings.tsx @@ -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." />