Monitoring the Service
Once we deployed our IoT Platform in your domain, you will get an Admin Console which helps you to manage your customers and their devices, Web access console for your users, Kubernetes console to manage containers, Prometheus and Grafana console for monitoring the containers where all platform depend services is deployed.
There are two methods to configure Kubernetes to manage container where platform depend will run. The two methods are
- Restart Always – This method will take a replica or backup when starting a container and its functions. So, when the container fails, it will automatically create a new container with the backup and restart the service.
- Never Restart – This method does not take any backup of containers and when the container fails, it remains in inactive status and Kubernetes will not restart it.
We will deployed the kubernetes console with “Restart Always” method. With this method, kubernetes will take backup of each container. So, when the container fails the kubernetes will automatically create a new container and load the backup and restart the service.
Kubernetes observe each container CPU usage and automatically scale up or down based on CPU usage. When the platform service uses 80-90% CPU, then Kubernetes automatically create a new pod or container, then load the service from deployment and run the created pod, this will help service to scale up based on CPU usage. Also, when container uses minimum usage, then kubernetes scale down the pods based on usage. This setup will help Bevywise IoT Platform to scale up when millions of millions connected.
Humans can’t monitor each services and platform for 24X7. So, if any container reaches its maximum CPU level or memory level, then the container will hang and stop all the services running inside it. In such cases, we should configure a Alert and notification based on the CPU usage, Memory usage etc.
To configure alert and notification, we use Grafana set up in which we will set up a separate alert panel to create alert and for notification we will create a notification channel.
In the Notification channel, you can select notification type like Email notification, telegram notification, etc. Once you done, the alert will automatically send to your selected notification type.
In Alert panel, you can set a certain limit in percentage or in memory unit with condition check for CPU usage, Memory or RAM usage, CPU core usage and Disk usage. So, when the condition is satisfied, the alert will send to users via notification type