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:

This is NodeJs code which adds functionality to the NodeRed suite. You should have NodeJS and NodeRed installed. Then you can call: npm install node-red-contrib-logentries

How to install the module

How to install the module

 

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:

Adding the new node to sheet

Adding the new node to sheet

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:

Create a cloud based log destination where lots can be streamed into

Create a cloud based log destination where lots can be streamed into

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.

Find the token of your new log

Find the token of your new log

 

Now when your Node-Red flow sends logs to the cloud, they appear in the consolidated log account:

Cloud based logs instantly searchable

Cloud based logs instantly searchable

 

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:

An esy way to log MQTT activity

An easy way to log MQTT activity

 

We hope you have fun and please do pop us a message if you find this tool helpful.

WordPress Backup