- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Example configuration
Example configuration for broker mode using password authentication, certificate-based TLS and IP sourcefiltering. The sample points array shows all possible sample types.
Note:
To have the collected data delivered somewhere, a data-server configuration must be added too.
{
"ConfigName": "mqtt_broker_password_tlscert_ipfilter",
"ConfigDescription": "DCM MQTT collector as broker with passwordfile authorisation, certificate-based TLS and IP sourcefilter",
"Collectors":
[
{
"CollectorName": "DCM_MQTT",
"CollectorDescription": "mqtt_broker_pass_tlscert_ipfilter",
"Protocol": "MQTT",
"ConnectRetryMin": 10,
"ConnectRetryMax": 100,
"MQTTAccess":
{
"MQTTCollectorMode": "broker",
"MQTTBrokerConfig":
{
"BrokerIPAddr": "10.10.10.10",
"BrokerPortno": 8883,
"BrokerSourceFilteringFile": "ip-sourcefilter.txt",
"BrokerSourceFilteringMode": "IP-WHITELIST",
"BrokerAuthenticationMode": "PASSWORDFILE",
"BrokerPasswordFile": "passwordfile.pw",
"BrokerTLSMode": "TLS-CERT",
"BrokerSSLSecure": false,
"BrokerCACertificate": "rootca.crt",
"BrokerCertificate": "broker.crt",
"BrokerPrivateKey": "broker.key"
}
},
"SamplePoints":
[
{
"SampleName": "string_random",
"SampleDataType": "string",
"SamplesSaved": 36,
"MQTTTopic":
{
"TopicString": "dcm/string/random",
"TopicSubscribeQos": "qos0"
}
},
{
"SampleName": "binary_little_int8",
"SampleDataType": "sbyte",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/int8",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_uint8",
"SampleDataType": "byte",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/uint8",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_int16",
"SampleDataType": "int16",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/int16",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_uint16",
"SampleDataType": "uint16",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/uint16",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_int32",
"SampleDataType": "int32",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/int32",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_uint32",
"SampleDataType": "uint32",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/uint32",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_int64",
"SampleDataType": "int64",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/int64",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_uint64",
"SampleDataType": "uint64",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/uint64",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_float",
"SampleDataType": "float",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/float",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_little_double",
"SampleDataType": "double",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/little/double",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "little"
}
},
{
"SampleName": "binary_big_int8",
"SampleDataType": "sbyte",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/int8",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_uint8",
"SampleDataType": "byte",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/uint8",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_int16",
"SampleDataType": "int16",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/int16",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_uint16",
"SampleDataType": "uint16",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/uint16",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_int32",
"SampleDataType": "int32",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/int32",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_uint32",
"SampleDataType": "uint32",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/uint32",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_int64",
"SampleDataType": "int64",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/int64",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_uint64",
"SampleDataType": "uint64",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/uint64",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_float",
"SampleDataType": "float",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/float",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "binary_big_double",
"SampleDataType": "double",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/bin/big/double",
"TopicSubscribeQos": "qos0",
"PayloadEndianness": "big"
}
},
{
"SampleName": "string_int8",
"SampleDataType": "sbyte",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/int8",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_uint8",
"SampleDataType": "byte",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/uint8",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_int16",
"SampleDataType": "int16",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/int16",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_uint16",
"SampleDataType": "uint16",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/uint16",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_int32",
"SampleDataType": "int32",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/int32",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_uint32",
"SampleDataType": "uint32",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/uint32",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_int64",
"SampleDataType": "int64",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/int64",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_uint64",
"SampleDataType": "uint64",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/uint64",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_float",
"SampleDataType": "float",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/float",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
},
{
"SampleName": "string_double",
"SampleDataType": "double",
"SamplesSaved": 200,
"MQTTTopic":
{
"TopicString": "dcm/number/str/double",
"TopicSubscribeQos": "qos0",
"NumberAsString": true
}
}
]
}
]
}
Was this article helpful?