Display Query Memory

If you use LogScale to monitor your costs in terms of memory consumption, you can display the average memory allocated for your queries activity.

  1. In the Search page, type this query in theQuery Editor:

    logscale
    "direct memory allocated"
    | group=query
    | avg(bytes)

    This search extracts the events having query as the value found for the group field, and uses the avg() function to calculate the average memory allocation of queries in the system, in bytes.

  2. Save your widget as explained at Create Widgets

  3. Click the menu icon on top-right of the widget and select Styling, the Styling panel is displayed on the side of the widget:

    Screenshot showing a radial needle gauge displaying value 17.49M with color-coded arc segments (blue, light blue, pink, red) ranging from 1M to 30M, with Format Gauge panel visible on the right showing configuration options including type, padding, value format, range settings, color palette with threshold values, and a timeline histogram at the top

    Figure 221. Gauge chart with properties panel - Example 2


  4. Set the properties as desired:

    • Layout → choose Radial Needle type in this example

    • Value → choose the Abbreviated format to show the values as millions (M)

    • Range → define the min and max values your widget should display

    • Colors → choose a palette among those available

    • Thresholds → set consistent thresholds according to your data: for example, you want values exceeding 20 millions bytes of memory displayed in red.