Monitoring the EC2 Thing when publishing messages – Operating and Monitoring IoT Networks
Now, we can start monitoring how the Thing is doing in publishing messages through Amazon CloudWatch:
Navigate to Services, search for CloudWatch, and click on it.
Click on All Metrics under the Metrics menu in the left pane.
Navigate to IoT –> Protocol Metrics and click on the checkbox for the PublishIn.Success metric. You will see the metrics that have been published successfully being reflected on the graph that is shown on the page.
Hence, you’ve created your first Greengrass solution with monitoring based on it!
Creating an AWS IoT Greengrass group for edge computing is a useful exercise to test and validate different edge computing scenarios. By using Greengrass core components such as Lambda functions, connectors, and machine learning models, you can gain practical experience in developing and deploying edge computing solutions that process and analyze IoT data locally, without the need for cloud connectivity. You can also use the AWS IoT Greengrass dashboard to monitor and manage the Greengrass group and its components, set up alerts and notifications, and troubleshoot issues as they arise.
Now, upload the code to GitHub and see whether you can also answer the following questions, based on your hardware/code for further understanding and practice on the concepts that you have learned through this practical:
Can you also try to connect the data to Prometheus?
Can you recreate a similar setup but with EC2s as the devices?
Important note
When working with different kinds of monitoring tools, concepts will often be similar between one program and the next. This is the reason why we ask you to try out different monitoring software on your own as well. Within industrial cases, you will also find that many types of monitoring tools are used, depending on the preferences of the firm and its use cases.
Summary
In this chapter, we explored the best practices for operating and monitoring IoT networks. We discussed the importance of continuous operation, setting KPIs and metrics for success, and monitoring capabilities both on-premises and in the cloud using AWS IoT services. We also looked at several practical exercises that can be used to gain hands-on experience in operating and monitoring IoT networks. These included simulating IoT networks using virtualization, developing AWS Lambda functions to process and analyze IoT data, creating AWS CloudWatch dashboards for IoT metrics, setting up AWS IoT Greengrass groups for edge computing, and using the AWS IoT simulator to test different operating and monitoring strategies.
By learning and applying these best practices and practical exercises, students can develop the skills and knowledge necessary to design, deploy, and manage robust and reliable IoT networks. They will gain experience in using AWS IoT services and tools to monitor and analyze IoT data, set up alerts and notifications, and troubleshoot issues as they arise. Ultimately, they will be well-equipped to meet the challenges of operating and monitoring IoT networks in a variety of real-world scenarios.
In the next chapter, we will be looking at working with data and analytics within IoT with services on AWS.
Further reading
For more information about what was covered in this chapter, please refer to the following links:
Learn more about data lakes and analytics relating to managing big data on AWS: https://aws.amazon.com/big-data/datalakes-and-analytics/
Understand more on how to use Grafana through its official documentation: https://grafana.com/docs/grafana/latest/
Explore further on AWS IoT Greengrass through its official documentation: https://docs.aws.amazon.com/greengrass/index.html
Learn more about different analytics-based deployments through AWS’ official whitepapers: https://docs.aws.amazon.com/whitepapers/latest/aws-overview/analytics.html
Learn more on different analytics solutions provided by AWS: https://aws.amazon.com/solutions/analytics/