Time Series Publisher Block Config
The Time Series Publisher block can be instantiated by using the block type timeseries
.
See The Blocks Section for an explanation of what a block
is in the Cloud Gateway.
config
portion of the block configuration) for the timeseries
block are as follows:Field | Type | Required | Default |
---|---|---|---|
log_name | String | no | <block name> |
log_level | String | no | 'off' |
mqtt/transport_addr | String | no | mqtt-tcp://predix-edge-broker |
mqtt/qos | Integer | no | 0 |
mqtt/client_id | String | no | |
mqtt/topics | Array of Strings | yes | |
policy | String | no | store_on_failure |
store_forward | Object | yes | |
store_forward/max_store_percent | Integer | no | 10 |
store_forward/max_batch_interval | Integer | no | 1000 |
timeseries/compress | Boolean | no | true |
timeseries/transport_addr | String | yes | |
timeseries/predix_zone_id | String | yes | |
timeseries/token_file | String/Object | no | /edge-agent/access_token |
timeseries/proxy_url | String | no |
The following is a sample block config for the timeseries
block. This should be placed in the blocks
section of the overall configuration file.
The block below is configured to subscribe to the MQTT topic input_data
on the Predix Edge Broker and ingest all data received from that topic to a Predix Time Series instance with the Predix Zone ID xxx-xxx
at the URL wss://dummy_url.run.aws-usw02-pr.ice.predix.io/v1/stream/messages
.
time_series_sender
, but it can be any string
you wish to
use."time_series_sender": {
"type": "timeseries",
"config": {
"log_name": "time_series_block",
"log_level": "debug",
"mqtt": {
"transport_addr": "mqtt-tcp://predix-edge-broker",
"qos": 2,
"client_id": "time_series_mqtt_client0",
"topics": [
"input_data"
]
},
"store_forward": {
"max_store_percent": 30,
"max_batch_interval": 2000,
"policy": "store_on_failure"
},
"timeseries": {
"transport_addr": "wss://dummy_url.run.aws-usw02-pr.ice.predix.io/v1/stream/messages",
"predix_zone_id": "xxx-xxx",
"token_file": "/edge-agent/access_token",
"proxy_url": "$http_proxy"
}
}
}
log_level and log_name
For details on the log_level
and log_name
fields of the Time Series Publisher block's config
section, see Common Block Config Fields.
mqtt
For details on fields within the mqtt
portion of the Time Series Publisher block's config
section, see Common Block Config Fields.
store_forward/max_store_percent and store_forward/max_batch_interval
For details on the store_forward/max_store_percent
and store_forward/max_batch_interval
fields of the Time Series Publisher block's config
section, see Common Block Config Fields.
timeseries/compress
The timeseries/compress
tag is an optional boolean (true/false) that defaults to 'true'. When enabled, the Time Series service will receive JSON payloads compressed (GZIP) by the cloud gateway. The size limit for the actual JSON payload is 512 KB regardless of the ingestion request format. For compressed payloads, this means the decompressed payload cannot exceed 512 KB.
timeseries/transport_addr
The transport_addr
field within the timeseries
section should be set to the URI of whatever Predix Time Series instance you wish to publish data to.
timeseries/predix_zone_id
The predix_zone_id
field within the timeseries
section should be set to the Predix Zone ID of whatever Predix Time Series instance you wish to publish data to.
timeseries/token_file
token_file
field within the timeseries
section
should usually be set to the path to the file on your Predix Edge device that holds
your UAA token for authentication with your Predix Time Series instance. token_file
path unless your application
requires you to change it.uaa_url
- The URL of the host where the UAA service is running. The UAA service provides the access token that is subsequently used to push to the Timeseries server. The pathoauth/token
is appended and the resulting URL is used to request the access token.client_id
- The client ID associated with an account that has access to the desired Timeseries zone.client_secret
- The secret associated with the client_id.proxy_url
- The proxy required to access the UAA URL.
Key | Type | Required | Default |
---|---|---|---|
timeseries/token_file/uaa_url | String | Only if a separate Time Series UAA is used | |
timeseries/token_file/client_id | String | Only if a separate Time Series UAA is used | |
timeseries/token_file/client_secret | String | Only if a separate Time Series UAA is used | |
timeseries/token_file/proxy_url | String | Only if a separate Time Series UAA is used |
timeseries/proxy_url
proxy_url
field within the timeseries
section
should be set to the URL of whatever proxy you want to use (if any) to connect to
whatever Predix Time Series instance you wish to publish data to. This field can be
omitted or set to an empty string if no proxy is desired.$http_proxy
or a URL in
the format <protocol>://<FQDN or IP Address>:<port>
.
The $http_proxy
variable is set via PETC. See Configuring the Network and Proxy
Settings.