MinIO Audit Logs in ElasticSearch in Kubernetes
Whether you are on-prem or in the Cloud, you want to ensure you set up your tools and processes in a homogenous way. No matter where the infrastructure is being accessed you want to ensure the tools used to interact with the various pieces of infrastructure are similar to the other regions.
With that in mind, having insight into your storage infrastructure is paramount when it comes to deploying your own MinIO object storage infrastructure. When any unexpected activity is happening in your storage infrastructure you would want to surface those logs quickly and in a succinct manner. This tutorial will give you a full overview of how you can surface MinIO audit logs in ElasticSearch so they can be searchable.
Setup Configuration
Deploy MinIO operator on a Kubernetes cluster
We need to deploy the tenant with ElasticSearch WebHook enabled
Encode your user and password in base64
Create the namespace where the secret will be located
Create the secret using the base64 user/password generated earlier. Create a file called secret.yaml
and save the contents in there.
Apply the secret as follows
Let’s configure the webhook so that it can fetch the credentials from the secret
Install the tenant using Kustomize
Lets curl the index to see the output
You should expect to see audit logs similar to below
The output will be very long so we truncated the output so it's legible.
Final Thoughts
As you can see, it's very important to take notice of these audit logs quickly. In fact you can set Alerts via your monitoring system or directly via ElasticSearch to send you alerts based on certain logs so you can be on top of your MinIO storage infrastructure.
More importantly, you need to think about the cloud as an operating model rather than a location. Meaning ensure no matter where you deploy your tools and infrastructure, whether it’d be Hybrid Cloud, Private Cloud, On-Prem, you want to make sure you send your MinIO audit logs to a log processor, doesn’t have to be ElasticSearch. This way no matter where you deploy MinIO you ensure it gets monitored every step of the way.
If you have any questions on how to get your MinIO audit logs into ElasticSearch be sure to reach out to us on Slack!