Please review my tiny PR. It adds support for the optional message_payload directive. It also supports to include %d which will increment over the number of the configured messages. Example log:
I am using mqtt_blackbox_exporter to test our MQTT broker which only supports a certain type of JSON formatted payload. This led me to adding support for custom payloads myself.
I did a fair amount of testing but have to warn you, that this is my first attempt in GO and the first PR i did ever in Github ;-). Looking forward to feedback, hoping that the code is acceptable.
Please review my tiny PR. It adds support for the optional
message_payload
directive. It also supports to include%d
which will increment over the number of the configured messages. Example log:I am using mqtt_blackbox_exporter to test our MQTT broker which only supports a certain type of JSON formatted payload. This led me to adding support for custom payloads myself. I did a fair amount of testing but have to warn you, that this is my first attempt in GO and the first PR i did ever in Github ;-). Looking forward to feedback, hoping that the code is acceptable.