Microservice Monitoring in Cumulocity IoT


Cumulocity IoT can be extended with Microservices which are deployed to tenants. Large IoT solutions often consist of multiple microservices serving different purposes and might be critical for the overall success of that solution. In that case, you might not want to rely on “luck” or “prayers” but you want to make sure that your microservices are operating normal and if not instantly get informed about it. In short: You want to monitor your microservices.

In this article, I will explain what microservice monitoring is and why it is important. I will also look into possible solutions for microservice monitoring in the form of basic microservice monitoring and advanced microservice monitoring.

What is Microservice Monitoring?

Microservice Monitoring is the solution to answer the following questions:

  • What is the status of my microservice?
  • Are there any issues? Memory Leak? Thread leak? High CPU Utilization?
  • Is the resource assignment correct? Do I need to assign more resources?
  • What are lows and peaks of usage of my microservice?
  • What is the response time of the requests?
  • How do multiple microservice impact each other?
  • Which endpoint has been called how often?
  • How many devices are handled by my microservices?
  • How long a job is executing in my microservice?

These questions above are very common questions which come up when you implement an IoT solution involving microservices. For small solutions and microservices the questions will be very limited and the answers to the questions are not so critical for the overall operability of the solution maybe.

Definition: Microservice Monitoring means to collect (operating) metrics of microservices over a period and visualize them either in dashboards or create alarms to be informed in case of issues.

In short: Microservice Monitoring enables you with insights to answer the questions above!

But why should I care about the answers, you might asking…

Why is Microservice Monitoring important?

Two examples:

Example one: If you have a solution in place and only one microservice that cleans up “old” devices & data from Cumulocity IoT it might not be so critical if that microservice is down for some minutes.

Example two: If you have a server-side-agent and several data mapping/processing microservices to integrate thousands of devices, the impact on the overall solution is indeed very critical if only one microservice is down just for a couple of seconds, because device data may be lost.

So the why depends on your solution and use case but in general here the benefits of having a Microservice Monitoring in place:

  • Make sure that your IoT solution operates “normal”
  • Avoid downtimes of microservices (before they get down)
  • Reduce costs due to unexpected downtimes
  • Keep the SLA agreed with your customers of your IoT solution
  • Supports root-cause analysis
  • Get informed when something is wrong (Push vs. Pull)
  • Enables optimization & reporting
  • Increase overall quality of the solution (by improving it before issues occur)

Red or Blue pill?

We have two guides prepared for you, based on your requirements to implement Microservice Monitoring:

  1. Basic Microservice Monitoring - Storing Data directly in Cumulocity IoT
  2. Advanced Microservice Monitoring - Setup a dedicated monitoring environment independent of Cumulocity IoT to monitor multiple microservices.

Basic Microservice Monitoring

Advanced Microservice Monitoring

This article is part of the TECHniques newsletter blog - technical tips and tricks for the Software AG community. Subscribe to receive our quarterly updates or read the latest issue.