7.6.2.60. QueryBrowser


A component that renders a graph of the results from a Prometheus PromQL query along with controls for interacting with the graph.

Example

<QueryBrowser
  defaultTimespan={15 * 60 * 1000}
  namespace={namespace}
  pollInterval={30 * 1000}
  queries={[
    'process_resident_memory_bytes{job="console"}',
    'sum(irate(container_network_receive_bytes_total[6h:5m])) by (pod)',
  ]}
/>

Expand
Parameter NameDescription

customDataSource

(optional) Base URL of an API endpoint that handles PromQL queries. If provided, this is used instead of the default API for fetching data.

defaultSamples

(optional) The default number of data samples plotted for each data series. If there are many data series, QueryBrowser might automatically pick a lower number of data samples than specified here.

defaultTimespan

(optional) The default timespan for the graph in milliseconds - defaults to 1,800,000 (30 minutes).

disabledSeries

(optional) Disable (do not display) data series with these exact label / value pairs.

disableZoom

(optional) Flag to disable the graph zoom controls.

filterLabels

(optional) Optionally filter the returned data series to only those that match these label / value pairs.

fixedEndTime

(optional) Set the end time for the displayed time range rather than showing data up to the current time.

formatSeriesTitle

(optional) Function that returns a string to use as the title for a single data series.

GraphLink

(optional) Component for rendering a link to another page (for example getting more information about this query).

hideControls

(optional) Flag to hide the graph controls for changing the graph timespan, and so on.

isStack

(optional) Flag to display a stacked graph instead of a line graph. If showStackedControl is set, it is still possible for the user to switch to a line graph.

namespace

(optional) If provided, data is only returned for this namespace (only series that have this namespace label).

onZoom

(optional) Callback called when the graph is zoomed.

pollInterval

(optional) If set, determines how often the graph is updated to show the latest data (in milliseconds).

queries

Array of PromQL queries to run and display the results in the graph.

showLegend

(optional) Flag to enable displaying a legend below the graph.

showStackedControl

Flag to enable displaying a graph control for switching between stacked graph mode and line graph mode.

timespan

(optional) The timespan that should be covered by the graph in milliseconds.

units

(optional) Units to display on the Y-axis and in the tooltip.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部