Monitor ML models in production

Suchismita Sahu
2 min readSep 23, 2022

We all know that ML model deployment is not the final step for us, we need to also own and monitor models in production. A very simple step is to monitor the Cloudwatch logs, about the error reason of failed cases, which should be displayed to everyone who does not have AWS access. This we can do through Elasticsearch Kibana Dashboard.
Steps to Stream Cloudwatch Data to Elastic search:
1. Cloudwatch can forward logs to three services for now. They are S3 bucket, Elasticsearch, and Lambda.
We will discuss streaming to Elasticsearch as it comes with kibana and provides additional filters to view the logs.
2. Go to AWS console and access Cloudwatch.
3. Go to the logs tab in the left column.
4. Go to the log group that we want to stream to Elasticsearch.
5. Select the log group and click on Actions.
6. Select Stream to Amazon Elasticsearch Service.
7. In the next window, you will be prompted to choose the ES cluster.
8. If the ES cluster is in the same account as Cloudwatch, select This Account. Otherwise, select Another account.
9. Then, open the dropdown and select the ES cluster that we are using.
10. Now, Click on Next. This will open a new window where it will ask for a log format.
We will be using the JSON format for this example. But we can also use any other format based on our usage.
11. The next option will be to select a filter pattern where we can use filters to only send specific log output to the ES cluster
12. If we did not use any patterns, All log content will be streamed to the ES cluster.
13. Finally, A review page will show up to verify all the configuration we have made.
14. Click Next and it will show the success page and the Start Streaming button will be enabled.
15. Here, it will show the lambda function that will convert the data to the selected format, JSON in our case, and then submits the data to Elasticsearch.
16. Once we select Start streaming, the Cloudwatch log for that group will start streaming to the ES cluster we selected.
17. When we go back to the logs, we can now see that Lambda is visible in the Streaming column.

To view Logs From Kibana Dashboards, First, we need to create index patterns, once we start entering the index name it would automatically recognize the indexes available under the given index-name and add it

--

--

Suchismita Sahu

Working as a Technical Product Manager at Jumio corporation, India. Passionate about Technology, Business and System Design.