5. System Insight Example

This section provides an example on how you can use System Insight to display throughput in a  workflow. The example shows the stages required to use System Insight to display the throughput of a workflow in a Grafana dashboard.

For the purpose of this example, it is assumed that you have installed System Insight with InfluxDB and Grafana.

Configuration in


Example workflow

The workflow includes a System Insight forwarding agent, which means the metrics sent to the System Insight service have the category of custom which is assigned in the Measurement UDR.

The Analysis agent contains the following APL code:


consume {
    map<string,string> tags = mapCreate( string, string);
    map<string,string> fields = mapCreate( string, string);
    PulseUDR mock_data = (PulseUDR)input;

    si.Measurement coll = udrCreate(si.Measurement);

    mapSet(tags,"WF", "SI_TEST");
    mapSet(fields,"SEQ", (string)mock_data.Sequence);
    mapSet(fields, "DATA", baToStr(mock_data.Data, "utf-8"));

    coll.tags = tags;
    coll.fields = fields;
    coll.name = "filter.test";

    udrRoute(coll);
}


  1. You create a System Insight profile in the Desktop. In the Filters tab, in this case, the profile description is Custom data, the retention policy of one week is selected, and you select the System Insight Profile Enabled check box.


    Filters tab - Creating a System Insight profile

  2. You can use the Detected Metrics tab to create a filter that sends all the custom-related data to the System Insight service. The filter created is custom\..*, which is listed in the Filter tab when you click Create Filter.


    Detected Metrics tab - example of creating a filter

    The data is sent to InfluxDB and you can visualize the data throughput in Grafana.

Visualization in Grafana

To visualize the workflow throughput in Grafana, you add a dashboard with a graph component as follows:

  1. You go to your instance of Grafana, and click the logo to the top left. Select Dashboards, then + New

  2. In this instance the Graph panel is selected to visualize data.
     
  3. You click the panel title on the graph and then select Edit.
     
  4. You can add metrics based on those available in InfluxDB. To create the query that Grafana will use to plot on, click the three dash button to the right; by clicking Toggle Edit Mode, you can select to edit by entering free text, or by selecting values from the drop boxes.
     
  5. In this example, mims are enabled.  To see what the forwarding agent's inbound udr throughput is, create the query according to the image below:


    Editing the Grafana panel

    In this instance, the retention policy is set to one_week. The field selected is SEQ, which is an incremented value. Using the function last retrieves the last value to be plotted in a graph.

  6. If everything is ok, the data is visible in the graph. You can modify the graphs to update the interval to show the latest 5 minutes and update every 5 seconds to get continuous data in the graph.

    This provides you with a visualization of the SEQ field into the System Insight forwarding agent, so you can keep track of how many increments that have been produced in a workflow:



    Grafana dashboard example