OpenSearch provides us the ability to analyze out logs. Let’s begin by navigating to the OpenSearch Dashboard
OSMasterUser
for the password enter AwS#OpenSearch1
You should now see a window that looks like this
When we deployed Kinesis Data Firehose we configured it to create a new index in OpenSearch every 1 hr. We also configured it to name each index starting with workshop-log
This means that open search will have 1 index for each hour it is sent logs, and that these indices' names will start with workshop-log
In order to work with all of the logs (ie. multiple hours) we will create an index pattern in OpenSearch. The index pattern will be a representation of all of the workshop-log indexes for all of the hours
workshop-*
under the index pattern name sectionWe have now created an index pattern! We can use the index pattern to analyze our logs
OpenSearch provides the ability to easily search log data. Let’s run a few simple searches on our logs
This will bring you to the discovery page. By default this view of the log data views the last 15 minutes. Let’s adjust it to display the last two years of data.
We can now see the log data we sent via. the Cloud9 Python application
We can now run a few different searched against our index pattern. To get started lets look for any log messages that related to spark broadcast operations.
"spark" AND "broadcast"
OpenSearch displays the 74 logs of the total 2000 logs. Now that you have run a search. Try running at least 3 other searches. A few search suggestions are below. However feel free to come up with you own
Suggested searches
date:2021-01-01
date:2021-01-01 AND message:Memory
date<2021-01-01
After you have run a few searches. We can look at creating a visualization and dashboard
"spark" AND "broadcast"
in the search barThis will produce a gauge chart visual.
Dashboards allow you to combine multiple visualizations in a single place. Let’s build a simple dashboard
Use the create new button or repeat the earlier process to create at least 2 additional visuals. Try to create visuals that can show
When you are ready proceed to the next step Clean Up if you want to delete the resources we used for this workshop