We have been using the Logentries.com service for years now on a wide variety of devices and platforms. It’s great to have a central location to access and search all the logs from multiple projects in one place. I recently found NodeRed which is a fantastic visual experience for wiring up Internet of Things devices on the net. It runs on server instances providing the cloud computing for IoT or actually out on the devices themselves for edge-based activity. It is powered by NodeJs and it is possible to create modules or “nodes” to extend its capabilities. We created one such module and posted it on github for you to freely use. You can get started on all this for free by using IBM’s Bluemix to get a free instance of NodeRed (or install locally) and Logentries.com for a free trial. There could be huge benefit from having all these “things” out there logging to a central location on the cloud since many of them are inacessible for the manufacturers or administrators.
Watch the video for a tutorial on the installation process and see it actually in action or you can dive right in and install the module yourself with just:
npm install node-red-contrib-logentries
Further details for usage and guidance:
When you have installed it, you can start NodeRed with the command: node red.js
With NodeRed running, you can now drag the new module onto the worksheet:
Double clicking on the logentries node allows you to set the configuration so the logs arrive in your account. First, get an account on logentries.com and create a log using the following Token TCP type:
Then navigate to that log and you can grab its “token code”. That token is what goes into the configuration of the node red node.
Now when your Node-Red flow sends logs to the cloud, they appear in the consolidated log account:
From there then you can do lots more like create alerts for when values go out of range or there are too many errors etc. You can also create dashboards and graph the values of data within the logs.
Another fun exercise is to see how easy it is to send a log of all the MQTT activity to logs for analysing:
We hope you have fun and please do pop us a message if you find this tool helpful.