Recently I discovered a tool that extracts k8s-event-logger and wanna try to use to improve monitoring against k8s events.
Let’s create a cluster and install our package:
$ helm install k8s-event-logger deliveryhero/k8s-event-logger
After that, we can look for logs using the command:
$ kubectl logs deploy/k8s-event-logger
With that we can see several lines of JSON logs that represent our k8s events, let’s take a look at the data structure that was created:
|
|
Looking for a specific line we can how more about the structure that k8s-event-logger will give us and think some insights about it data:
- Alerts based on count size (if some event occurs several times it can represent a bad behavior inside the cluster)
- We can filter by .type property for got a warning and other noninfo events.
- Filter by specific reasons that can be used for self-healing workflows
- Had the message/involved object with type and reason is suitable for creating valuable alerts.
Good app for more contextualized events alerts (and to long term storage of cluster events).