Example

This example Data Stream demonstrates how to use the Action Agent to write pump data to an InfluxDB bucket measurement.

Refer to configuration to understand all configuration options of this Agent

Step 1: Add the Agent

Drag the Influx DB Action Agent onto the canvas and rename it. Link the input endpoint to the pump data, the output to the printer, and save the Data Stream.

Step 2: Input Mapping

Select the InfluxDB Action Agent's input arrow and click Configure. Map one of the parent Agent's output attributes to the measurementTitle. In this case, select 'Location (String)'.

Step 3: Configure General

Select the Agent and click Configure. In this case, keep the default Collection.

Step 4: Configure Database

Enter the authentication details of the Influx Data Cloud to which you want to connect: URL, Token and Org.

Select the bucket, timeout, and GZip settings. In this case, select the AssetEvents bucket and keep the other defaults.

Step 5: Configure Payload

Add the tags and fields to be written to the measurement, and click Apply. In this case, add:

  • a tag with the key named Pump and value taken from the incoming PumpID attribute.

  • a field with the key named Flow and value taken from the incoming FlowRate attribute.

Step 6: Results

Apply the changes, save the Data Stream and publish it.

Let's look at the Live Data View. Observe the pump data is printed, as well as written to the InfluxDB bucket.

Let's look at the AssetEvents bucket in InfluxDB. Observe the flow fields - tagged with the relevant pump - are written to the location measurements of Dallas and Houston.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream.

Last updated