Replies: 3 comments 4 replies
-
Ideally these options would be simplified, however it is difficult to obtain agreement on what single format should be adopted. From our (commercial) perspective we'd like to see all of these files in JSON. |
Beta Was this translation helpful? Give feedback.
-
For reference, adding a snippet of Device MQTT config in different serialization formats; [Writable]
LogLevel = "INFO"
# InsecureSecrets are required for when Redis is used for message bus
[Writable.InsecureSecrets]
[Writable.InsecureSecrets.DB]
path = "redisdb"
[Writable.InsecureSecrets.DB.Secrets]
username = ""
password = ""
[Writable.InsecureSecrets.MQTT]
path = "credentials"
[Writable.InsecureSecrets.MQTT.Secrets]
username = ""
password = ""
[Writable.Reading]
ReadingUnits = true
[Writable.Telemetry]
Interval = "30s"
PublishTopicPrefix = "edgex/telemetry" # /<service-name>/<metric-name> will be added to this Publish Topic prefix
[Writable.Telemetry.Metrics] # All service's metric names must be present in this list.
# Device SDK provided Service Metrics
EventsSent = false
ReadingsSent = false
# Common Security Service Metrics
SecuritySecretsRequested = false
SecuritySecretsStored = false
SecurityConsulTokensRequested = false
SecurityConsulTokenDuration = false
[Writable.Telemetry.Tags] # Contains the service level tags to be attached to all the service's metrics
# Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. Writable:
LogLevel: INFO
# InsecureSecrets are required for when Redis is used for message bus
InsecureSecrets:
DB:
path: redisdb
Secrets:
username: ''
password: ''
MQTT:
path: credentials
Secrets:
username: ''
password: ''
Reading:
ReadingUnits: true
Telemetry:
Interval: 30s
PublishTopicPrefix: edgex/telemetry # /<service-name>/<metric-name> will be added to this Publish Topic prefix
Metrics: # All service's metric names must be present in this list.
# Device SDK provided Service Metrics
EventsSent: false
ReadingsSent: false
# Common Security Service Metrics
SecuritySecretsRequested: false
SecuritySecretsStored: false
SecurityConsulTokensRequested: false
SecurityConsulTokenDuration: false
Tags: {} # Contains the service level tags to be attached to all the service's metrics
# Gateway="my-iot-gateway" # Tag must be added here or via Consul Env Override can only chnage existing value, not added new ones. {
"Writable": {
"LogLevel": "INFO",
"InsecureSecrets": {
"DB": {
"path": "redisdb",
"Secrets": {
"username": "",
"password": ""
}
},
"MQTT": {
"path": "credentials",
"Secrets": {
"username": "",
"password": ""
}
}
},
"Reading": {
"ReadingUnits": true
},
"Telemetry": {
"Interval": "30s",
"PublishTopicPrefix": "edgex/telemetry",
"Metrics": {
"EventsSent": false,
"ReadingsSent": false,
"SecuritySecretsRequested": false,
"SecuritySecretsStored": false,
"SecurityConsulTokensRequested": false,
"SecurityConsulTokenDuration": false
},
"Tags": {}
}
}
} |
Beta Was this translation helpful? Give feedback.
-
In fact, all formats look good to me. However, we need to choose one for consistency. |
Beta Was this translation helpful? Give feedback.
-
A device service can have four types of configuration files:
(The list of supported serializations may not be complete.)
This is all very confusing and difficult to work with.
Can YAML be used as a common serialization for all config files?
If TOML is the preferred format (although nowadays not as common), why the device profile and provision watcher are different?
Beta Was this translation helpful? Give feedback.
All reactions