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)',
]}
/>
| Parameter Name | Description |
|---|---|
|
| (optional) Base URL of an API endpoint that handles PromQL queries. If provided, this is used instead of the default API for fetching data. |
|
| (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. |
|
| (optional) The default timespan for the graph in milliseconds - defaults to 1,800,000 (30 minutes). |
|
| (optional) Disable (do not display) data series with these exact label / value pairs. |
|
| (optional) Flag to disable the graph zoom controls. |
|
| (optional) Optionally filter the returned data series to only those that match these label / value pairs. |
|
| (optional) Set the end time for the displayed time range rather than showing data up to the current time. |
|
| (optional) Function that returns a string to use as the title for a single data series. |
|
| (optional) Component for rendering a link to another page (for example getting more information about this query). |
|
| (optional) Flag to hide the graph controls for changing the graph timespan, and so on. |
|
| (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. |
|
| (optional) If provided, data is only returned for this namespace (only series that have this namespace label). |
|
| (optional) Callback called when the graph is zoomed. |
|
| (optional) If set, determines how often the graph is updated to show the latest data (in milliseconds). |
|
| Array of PromQL queries to run and display the results in the graph. |
|
| (optional) Flag to enable displaying a legend below the graph. |
|
| Flag to enable displaying a graph control for switching between stacked graph mode and line graph mode. |
|
| (optional) The timespan that should be covered by the graph in milliseconds. |
|
| (optional) Units to display on the Y-axis and in the tooltip. |