This blog post explains how to monitor data of your Linux IoT edge devices remotely using a simple method.
Time to read:
The Internet of Things concept is all about doing things remotely. In industrial environments such as a manufacturing plant or a worksites, agricultural fields etc., it’s increasingly becoming popular to use remote monitoring tools to monitor sensor data (percentage humidity, temperature) and many more parameters obtained by sensors connected to linux devices far away from you. Sometimes, it can even be a parameter that’s directly bound to the Linux edge devices in the field such as a variable within the hardware or the software of the device such as USB device connectivity status. Regardless, the data that can be retrieved from those edge devices play a significant part in remote linux device monitoring, which can be used to analyse the conditions and make decisions accordingly.
So, wouldn’t it be nice to have a feature that allows you to monitor data coming from your remote Linux device, and maybe set some alerts (an Email, dashboard notification etc.) if a certain type/value of data is observed?
If you’ve been following up with the previous articles about Upswift remote edge Linux IoT device management platform, you might already have a good understanding of how useful our platform can be when it comes to both industrial/commercial and personal projects. Today in this post, we’ll be discussing one of our Remote Monitoring tools, the Data Monitor, which can be a very powerful remote data monitoring tool for your applications.
Upswift device management platform is an all-in-one platform for Controlling, Managing and Monitoring your linux-based IoT edge devices from anywhere in the world. To the left side of your dashboard, you can find the Data Monitor tool under the Monitor section to help you monitor data coming from your Linux device. This tool allows you to monitor data being sent from your linux IoT device or any other Linux-based remote IoT device conveniently using our Platform.
The Upswift Data Monitor uses HTTP POST requests using an ID-Token pair which is unique to your device running Upswift agent. The API can be called through any program written by any programming language, given that the language supports HTTP POST/GET requests and JSON objects handling. For the sake of simplicity, we’ll be using Python to send some data from your Linux Device to cloud IoT platform through HTTP POST request.
Before beginning, make sure that you have enrolled your device to your Upswift dashboard and if not, follow this guide to quickly enroll your linux device.
Go through the Navigation Pane -> Monitor -> Data to reach the Upswift Data Monitor dashboard. Here you will find the necessary sections to setup Data Parameters, Alert Logics, and view data from Devices and Recent Alerts.
Click ‘New Parameter’ and provide a name for your parameter. And provide a data type for the dashboard to expect from that parameter name. The following example shows a parameter names ‘SampleData1’ and it’s data will be of type ‘String’.
Click Create Parameter and confirm to create the item.
3. Add new alert logic(s) [optional step]
In order to be notified about certain data, you can set ‘alerts’ through the Alert Logic section. The received data from a specific parameter can be compared with a predefined value and alerts can be setup to trigger upon matching.
4. Sending data to Upswift Data Monitor from your Linux device
Now that the dashboard side is set up and configured to receive data from your Linux device, let’s send some actual data from your device to your dashboard. To do this, you need to call the API https://api.upswift.io/v1/send_app_monitor with a JSON object following the below format:
Instead of manually fetching tokens by yourself, you can automatically obtain them through the script itself as well.
A complete example script written in Python is as follows:
5. Run the script!
When you execute the script, if everything is correct, you will be able to see the data sent from your device under the Stats section in the Upswift Data Monitor Dashboard.
Additionally, the Device section shows information about the telemetry data from each device that sends data to the Data Monitor, and Recent Alerts show the triggered alerts according to the ruleset you may have specified.
You can use this feature to monitor all kinds of data that can be embedded into a JSON object. Typical use cases where you can use this includes:
and the list goes on and on.
The Upswift Data Monitor tool is one of the most used tools in the Upswift linux remote IoT device management platform to monitor data being sent from linux edge devices. With this tool, you can set up alerts on data being sent to the dashboard to keep and eye on any irregularities in the data to make sure that your IoT devices are functioning as intended.
The Remote Data Monitoring tool is just one feature Upswift offers. Interested in what else Upswift might have to offer? Visit Upswift.io and sign up to get a first-hand experience on our next generation Edge Linux IoT Device Management platform!