Closed mteodor closed 4 years ago
To pick up messages from local mainflux instance you need to make nats_topic= "channels"
Amazing! Your fixes worked. It sends data now. Unfortunately it seems to receive the wrong messages. Is there a special subtopic maybe?
Export Service:
{"level":"debug","message":"Published to: channels.7ff9d68a-f9d3-4ded-97a3-e8f388c8ad4a, payload: \n$7ff9d68a-f9d3-4ded-97a3-e8f388c8ad4a\u001a$4f570e52-8","ts":"2020-07-28T19:20:03.437240103Z"}
Mainflux:
mainflux-influxdb-writer | {"level":"warn","message":"Failed to handle Mainflux message: failed to decode s
enml : invalid character '$' looking for beginning of value","ts":"2020-07-28T19:19:59.38070581Z"}
Used messages from one of the examples:
[{"bn":"name","bu":"A", "n": "voltage", "u": "V", "v": 1755 }, { "n": "current", "t": -2, "v": 2888 },{ "n": "current", "t": 1, "v": 19431 }, { "n": "current", "t": 0, "v": 28065 }]
@mteodor is this documented in the official documentation? If not, please add it.
@michaelkargl I've updated PR and this will fix problem with messages not getting saved
however you have to take into account some changes
MF_EXPORT_CONFIG_FILE
replaces MF_EXPORT_CONF_PATH
and you need to specify route type
nats_topic = "channels"
subtopic = ""
type = "mfx"
@drasko sure, docs will be updated
With the new changes and configuration, the export succeeded! Big thanks to all of you!
Hey,
I have been following along the mainflux/export instructions. The freshly built exporter runs, but can't seem to get any messages.
The exports taken were:
Running this results in a valid connection to the 'mainflux-hub' server, but the 'gateway' is still waiting for messages:
Changing the
nats_topic
to'.>'
or'*'
resulted in an errorNo routes have been configured
The Setup is two servers on different hosts with direct connection without firewall. The docker-compose file from mainflux/ui was used to setup the servers.
For testing purposes a bash script is sending readings via
to the the Mainflux Gateway MQTT server. The readings are logged and can be visualized via Grafana. As instructed I opened up the port for the NATS servers
6222/tcp, 0.0.0.0:4222->4222/tcp, 8222/tcp
and used an existing redis instance as cachees-redis