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 the Query 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:

    Gauge Chart with Properties Panel - Example 2

    Figure 205. 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.