Custom Graph Widget Creation

Last updated on 26 April, 2024

The Custom Graph widget allows you to see patterns in historical data at an intersection of datasource instances and a particular datapoint. The Custom Graph permits glob expressions in it’s configuration, enabling aggregate and top ten data to be displayed. For more information, see Using Glob Expressions Throughout the LogicMonitor Portal.

You can use the Custom Graph widget to see the ten most important DataSource Instances from a single datapoint. For example, MemoryUitilizationPercent, CPUBusyPercent, or any other metric across your infrastructure. If the composition of the data changes during monitoring, the graph automatically updates based on the refresh frequency you delivered. This allows you to compare performance of any metric across resources.

Configuring a Custom Graph widget involves configuring datapoints, lines and legends behavior, and widget display settings.

Requirements for Creating a Custom Graph Widget

Keep in mind the following requirements when creating a Custom Graph widget:

  • The Custom Graph has a 100 line limit in text entry fields.
  • There’s no limitation on the types of datapoints that can be included in the Custom Graph widget, but as the values are displayed on one graph with a single Y access, it is recommended they be comparable units.

Configuring a Custom Graph Widget

  1. Create a Custom Graph widget. For more information, see Widget Creation.
  2. Configure Basic Information fields. For more information, see Configuring Standard Widget Settings.
  3. In the Default Time Range field, select a default time range.

Note: This default time range only becomes the time range for this widget if the dashboard time range is set to Default (Varies per widget).

  1. In the Graph Data settings, select a Graph Type.

Note: This allows you to configure whether the graph displays the top or bottom 5, 10, 25, or 100 lines per datapoint, or aggregates each datapoint to one line. When Aggregate is selected, you’ll be prompted to determine whether the aggregate is calculated based on the average, max, min, or sum of the datapoints.

  1. Select + Add Record to configure datapoints:
    1. Add a datapoint or virtual datapoint. For more information see Widget Datapoint Configurations.
    2. (Optional) In the Line & Legend Behavior field, select one of the following settings:
      • Default: To apply the standard color, display type (line), and legend (host, DataSource, and Instance names) to the graph series.
      • Custom: To configure the following fields to whatever the user value is:
        1. In the Legend field, insert a token to populate datapoint-specific information.
          This expands the amount of relevant information viewable within the graph’s legend. For more information, see Legend Tokens.
        2. In the Series Type field, choose how the graph displays data.
        3. In the Data Series field, select a value. For more information, see Line & Legends Data Series.
        4. In the Color field, select the line color to display in the graph. For more information, see Line & Legend Colors.
      • Do not display: To prevent the datapoint from displaying on the graph.
        This is used to configure a datapoint that is referenced in a virtual datapoint configuration.
    3. Select Apply.
  2. (Optional) In the Display Settings, configure how you want the information in the widget to display:
    1. In the Data Display Presets settings, select to whether to display the Y-axis data as Numbers, Percentages, or a Custom option.
    2. In the Y-Axis Label field, enter a unit of measurement as the label for the Y-axis.
    3. In the Autoscale Unit field, select whether you want your units to autoscale by 1000 or 1024.
      This option defaults to 1024 when your Y-axis is set to “bytes.” For all other Y-axis labels, it will default to 1000.
    4. In the Graph Range field, toggle on Automatically adjust minimum and Automatically adjust maximum to ensure that your graphs adjust to fit the full scope of the data displayed.
      By default, Automatically adjust maximum will be toggled on and Automatically adjust minimum will be toggled off so that the default minimum value on your y-axis is 0.
    5. In the Display Granularity settings, select one of the two options to consolidate data in your Custom Graph widget:
      • Use Visually Significant Trending (VaST): Calculates the significant inflection points of your time series data and preserves them. Use VaST for detailed views of your data, particularly when dealing with longer time frames.
      • Use visual average: Consolidates the view of your data based on the Consolidation Function specified in your datapoint configuration (min, max, or average). Use this option when dealing with shorter time frames or to smooth out data peaks for easier trend analysis.
  3. Complete the standard widget configurations, and then Save the widget. For more information, see Configuring Standard Widget Settings.

Legend Tokens for Custom Graph Widget

Tokens are supported in the Legend field. The supported tokens are:

  • ##HOSTNAME##: The name of the device whose data is being graphed.
  • ##DSIDESCRIPTION##: The DataSource instance description (if any) of the line.
  • ##DEFAULT##: This is equivalent to ##HOSTNAME##_##DATASOURCENAME##-##INSTANCE##.
  • ##DATASOURCENAME##: The display name of the DataSource being graphed.
  • ##INSTANCE##: The instance being graphed by this line.

Note: You can change the Legend to any text you want, but you must have at least one token present in the legend. If you do not use a token, the default legend will be added, distinguishing which resource/DataSource/instance is associated with the line.

Lines & Legends Data Series

This option is only relevant when the Use Visual Average option is selected. It’s used to control how the data is displayed when you view the graph data over a longer time period.

For example, consider a datapoint “aborted_clients” that returned a value of zero for every sample interval during a day, except for one sample where it instead returned 100 with a consolidated function of:

  • Max: When you look at the graph over a month-long view, including the day described above, the day will have a value of 100 (the max value of all samples in the day).
  • Min: When you look at the graph over a month-long view including the day described above, the day will have a value of 0 (the min value of all samples in the day).
  • Average: When you look at the graph over a month-long view including the day described above, the day will have a value of 0.5 (the average value during the day).

Line & Legends Colors

This setting contains an option to automatically assign colors to your lines. Keep in mind the following about the auto-assigned color option:

  • It assigns the next unused color int he set to the line, avoiding any colors that are statically assigned.
  • It’s automatically used if you are using a blog expression in any of the datapoint configuration fields and if you are not configuring an aggregate graph type.
In This Article