Low cost IoT device monitoring with Node.js
The usage of resources is one of the critical factors in IoT contexts; it is common to observe that devices can suddenly disconnect when their available resources are exceeded; monitoring, however, can be worse due to the additional resource consumption required for such tracking.
N|Solid SaaS allows you to monitor and observe the behavior of your applications and devices built in Node.js with an overhead of less than 1% running from our servers, without the need to maintain the necessary infrastructure to store and serve the monitoring data, with a simple configuration, a single line will be able to connect and start monitoring your Node.js application.
Monitoring an actual IoT device with N|Solid
Note: This is a simple IoT project that sends messages through apache Kafka by lighting a led light in the direction that the joystick connected to johnny five is moved.
🚀 Link to the project: https://github.com/mafesernaarboleda/kafka-node-iot/
You must have an NSolid SaaS account (if you don't have an account, follow this blog post to learn how to create one).
The console address and connection token can be accessed from the main NodeSource accounts portal page, here.
First, visit https://downloads.nodesource.com/ to download and install the N|Solid runtime on your device.
The process will be monitored by N|Solid by adding the following few lines (saas will be equal to NSOLID_SAAS provided by https://accounts.nodesource.com/).
Run the services using the command
nsolid main.js in the device's terminal, and you can now view the processes being tracked by NSolid from the SaaS console website.
The console will represent this distributed system (project) like this:
Within the metrics, you will see CPU usage versus ram usage and many more.
To learn more about all metrics available, visit 'Metrics in Detail N|Solid'.
Also, to learn how to monitor the node.js processes in real-time and get more details go to 'N|Solid Process Monitoring'.
Wrapping Things Up!
In N|Solid we have amazing features to support your Node.js Journey.
Check our top here:
🧭 Project and Applications Monitoring in N|Solid
🌌 Process Monitoring in N|Solid
🔍 CPU Profiling in N|Solid
🕵️♂️ Worker Threads Monitoring in N|Solid
📸 Capture Heap Snapshots in N|Solid
🚨 Memory Anomaly Detection in N|Solid
👣 HTTP Tracing Support in N|Solid
⏰ Global Alerts & Integrations in N|Solid
🪄 Distributed Tracing in N|Solid
As always, we're happy to hear your thoughts – feel free to get in touch with our team or reach out to us on Twitter at @nodesource.