9.81.4.4 System Insight Forwarding Agent Example

This section describes an example of a scenario where the System Insight forwarding agent is used to send metrics samples from a workflow to the System Insight service for visualization. You create Measurement UDRs in the Aggregation agent to send the sample data to the System Insight forwarding agent.

Example workflow including a System Insight forwarding agent

In this instance, the TCP/IP collection agent receives data on the user, country and accumulated time. This data is sent to an Analysis agent that receives and analyses a customized UDR type, tcpip_internal, that includes this data. See the image below which shows the UDR fields. The Analysis agent then sends the UDRs on the r_4 route to the Disk forwarding agent where the output path is determined, and on the r_2 route to an Aggregation agent.

Analysis agent routing data to System Insight forwarding agent

Example UDR fields received in UDR from TCP/IP collection agent

The inclusion of an Aggregation agent to send the data to the System Insight forwarding agent is necessary to create meaningful metrics. It is recommended thatĀ an Aggregation agent with a 10 sec timeout precedes the System Insight forwarding agent in your workflow. In the Aggregation agent, you create a Measurement UDR which includes the data sent from the Analysis agent.

All of the metrics which are sent in a workflow to the System Insight service via a System Insight forwarding agent automatically have the category of customĀ which is assigned in the Measurement UDR, e g custom.user_data.


Example - Aggregating data to send to System Insight forwarding agent

sessionInit {
 session.country = input.country;
}
consume {
 listAdd(session.inputList, input);
}
timeout {
 debug(session); 
 si.Measurement m = udrCreate(si.Measurement);
map<string,string> tags = mapCreate(string, string);
 mapSet(tags, "country", session.country);
 map<string,int> fields = mapCreate(string, int);
 int records = listSize(session.inputList);
 for (int i = 0; i < records; i++) {
 SI.TelnetUF.tcpip_internal partial = (SI.TelnetUF.tcpip_internal)listGet(session.inputList, i);
 mapSet(fields, "accumulated_time", mapGet(fields, "accumulated_time") + partial.acc);
 }
 sessionRemove(session);
 m.fields = fields;
 m.tags = tags;
 m.name = "user_data";
 udrRoute(m);
}

The aggregated data is then sent to the System Insight forwarding agent, which sends theĀ data to the System Insight service in the form of metrics, to visualize the data gathered.

In this example, this data is then sent to InfluxDB where the output is visualized as shown in the image below.

Example of output from System Insight forwarding agent in InfluxDB