Comment on page
This example Data Stream demonstrates how to use the Action Agent to write pump data to an InfluxDB bucket measurement.
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.
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)'.
Select the Agent and click Configure. In this case, keep the default Collection.
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.
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.
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.