You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
MQTT Recorder provides a configuration section to the Ignition Gateway. These can be seen in the Configure section of the Ignition Gateway web UI on the left-hand navigation pane - Configure → MQTT Recorder → Settings.
General
These are the general MQTT Recorder configuration settings.
Main
- Enabled
- This denotes whether to enable or disable the MQTT Recorder module.
- Datasource
- A dropdown list to select the database connection to use for record storage. This list is populated with the database connections set up within the Ignition Gateway.
- Partition Period
- The partitioning scheme to use for record tables within database. Each table name will be appended with a date indicating the partition time period. For example, if table were created for "alarm" records on September 25, 2018 at 2:00 AM, they table name for each partition type would be:
- None: rs_alarm
- Hourly: rs_alarm_2018_09_25_02
- Daily: rs_alarm_2018_09_25
- Weekly: rs_alarm_2018_39
- Monthly: rs_alarm_2018_09
- Yearly: rs_alarm_2018
Tables
These are the settings for the database tables that MQTT Recorder will insert the records into.
Table Settings
A Table Setting consists of a Table Name and various optional filters.
- Table Name
- The name of the table where records will be inserted. This name can be statically defined or be dynamically build up using the following tokens
- ${type} - The Record Type of the record being inserted
- ${group} - The Sparkplug Group ID of the record being inserted
- ${edgenode} - The Sparkplug Edge Node ID of the record being inserted
- ${device} - The Sparkplug Device ID of the record being inserted
- ${field:<name>} - The value of any field of the record being inserted where <name> is the name of the field
- Enabled
- Whether this Table Setting is enabled
- Record Type
- An optional Record Type to filter on. If specified, only records with this Record Type will be placed in the table.
- Group ID
- An optional Sparkplug Group ID to filter on. If specified, only records with this Group ID will be placed in the table.
- Edge Node ID
- An optional Sparkplug Edge Node ID to filter on. If specified, only records with this Edge Node ID will be placed in the table.
- Device ID
- An optional Sparkplug Device ID to filter on. If specified, only records with this Device ID will be placed in the table.
- Field Filters
- An optional semicolon delimited list of field filters. Each field filter is declared using one of the following forms: {<field>:<operator>:<value>}, {<field>:NULL}, or {<field>:NOTNULL}
- <field> - the name of the field to filter on.
- <operator> - the filter operator. Must be one of the following: ==, !=, >, <, >=, or <=
- <value> - the value of the field.
- Values that contain ':', ';', or '\' characters must have the character escaped with a leading '\' character.
- Examples:
- To only insert records that match a "serial_number" field equal to "0123456" the filter would be: {serial_number:==:0123456}
- To only insert records that contain a "temp1" field the filter would be: {temp1:NOTNULL}
- To exclude records that match a "unit_id" field equal to "112:008:32455" the filter would be: {unit_id:!=:112\:008\:32455}