How Automatic Root Cause Analysis Works
It can take hours or days to identify the root cause of an issue, and often, the reason is left unidentified and lurking in the background waiting to reappear.
Join the DZone community and get the full member experience.Join For Free
devops practitioners face significant problems in today's world of dynamic applications that are composed of hundreds or possibly thousands of components. first of all, when things break they need to restore the service as quickly as possible. secondly, after reinstating the service, they need to figure out and fix the exact root cause, to ensure the problem does not occur again. practitioners trawl through log files, look at metrics, comb through events, consult crystal balls, and do whatever it takes to find the answer. it can take hours or days to identify the root cause of an issue, and often, the reason is left unidentified and lurking in the background waiting to reappear. thankfully, instana has made significant strides in managing incidents and accelerating the identification of root cause. let's explore how instana accomplishes this. first i need to explain some of the terminologies.
instana automatically detects changes to the monitored environment such as:
- environment variables
the detected changes are recorded against the entity in the dynamic graph; i'll explain the dynamic graph in the next section.
for every sensor, there is a curated knowledgebase of health signatures that are constantly evaluated against the incoming metrics. some example heath signatures are:
- high cpu - host sensor
- high garbage collection - jvm sensor
- high memory usage - docker sensor
- unschedulable pod - k8s sensor
the health signatures will trigger an issue with either warning or critical severity. the issues are recorded against the entity in the dynamic graph.
for every service the kpis of throughput, latency and error rate are monitored (a.k.a. red - rate, errors, duration). instana's ai, a.k.a. stan, looks for sudden changes and/or abnormal behavior of these kpis. when the ai detects a potential problem, if the service is not customer facing, an issue is triggered. an incident is only triggered for services that are customer facing. an incident is also triggered if there is a critical severity issue on the supporting infrastructure for a customer facing service. the incident is recorded against the entity in the dynamic graph.
instana's dynamic graph
there is a very comprehensive previous article that covers the dynamic graph in great detail if you want to read more. for those of you in a hurry, here is the extremely condensed description of the dynamic graph; instana's proprietary technology data store.
entities are monitored items such as: host, language runtime, data store, service, and events.
the dynamic graph does not have a fixed schema, it is a graph database that stores entity relationships over time. the dynamic graph is continuously updated as the data arrives. therefore, instana knows at any point in time what entity is related to what entity and the state of those entities.
automatic root cause identification
when a problem occurs with one particular microservice in an application it will introduce a ripple effect and have an impact on other microservices, which will also affect other microservices, etcetera. all these microservices will trigger their own issues or incidents and thus an alert storm is created. a traditional monitoring solution would just fire off every event to the operator's inbox and leave them to figure it out.
this is a well-known problem and there are other solutions available that attempt to quell these storms. the monitoring solution sends all its events to the event management solution, which requires the manual configuration of complex rules that are evaluated against the incoming events in an attempt to deduce cause and effect. it's better than nothing but not ideal as it requires the purchasing of an extra solution. additionally, the constant change present in a microservices application means that there is the burden of continually trying to keep the aggregation rules synchronized.
at instana we don't like doing tedious repetitive manual configuration, that's why we have stan, our ai-powered assistant, to automate all the boring bits. the dynamic graph is just one of stan's ai skills and is used to automatically quash alert storms and provide automatic root cause identification. when an incident is triggered, the dynamic graph is traversed and relationship links followed to ascertain the state of those related entities. this is way more sophisticated and accurate than just time-based correlation because events that do not have a relationship to the triggering entity are ignored even if they happened inside the same time window; they may belong to a totally separate incident. knowing the interconnectedness of everything is the key.
related events are collected and everything is rolled up into the incident. instana then fires just one alert for the incident with all the associated data included.
this partial screenshot shows an example of an incident where 21 separate events have been rolled up into one incident, not spewed out individually. from the roll-up of events, it is clear that the elasticsearch datastore became unstable due to the loss of node two, this was the root cause. this had a ripple effect across a number of other dependent services such as product search, products, and demo. now the operator knows that if they fix the elasticsearch problem all the other problems will disappear.
the devops team is busy enough building and running microservices applications. a monitoring solution should decrease the burden, not increase it by firing out a shedload of events since this is just data, not information. the devops team needs actionable information extracted from the data to make running microservices applications easier. instana automates the monitoring of microservices applications from the installation of the agent, the collection and processing of the data, to producing actionable information easily consumed by everybody. sign up for a free trial of instana to see automatic root cause analysis working in your own applications.
don't slow down, let stan do the work.
Published at DZone with permission of Steve Waterworth, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.