VOOZH about

URL: https://thenewstack.io/usenix-jupyter-notebooks-could-help-sres-better-sleuth-incidents/

⇱ USENIX: Jupyter Notebooks Could Help SREs Better Sleuth Incidents - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2021-01-05 09:02:18
USENIX: Jupyter Notebooks Could Help SREs Better Sleuth Incidents
news,
DevOps

USENIX: Jupyter Notebooks Could Help SREs Better Sleuth Incidents

Moshe Zadka, senior site reliability engineer at Twisted Matrix Laboratories, speaking at the USENIX SREcon20 America conference, talks about how to use Jupyter Notebooks for SRE diagnostic work.
Jan 5th, 2021 9:02am by Joab Jackson
👁 Featued image for: USENIX: Jupyter Notebooks Could Help SREs Better Sleuth Incidents
👁 Image

Science!

“Every incident is a detective story. The whole point is to figure out who done it,” asserted Moshe Zadka, senior site reliability engineer at Twisted Matrix Laboratories, speaking at the USENIX SREcon20 America conference, held virtually last month.

Jupyter notebooks, an open source tool originally designed for the scientific research community, could be a valuable aid in helping site reliability engineers (SREs) and other operational folk investigate, document and even recreate fixes for site incidents, Zadka said. Both jobs, after all, require sleuthing and scrupulous notetaking to get at the truth.

“Incident resolution is by nature exploratory,” Zadka said, an activity well supported by the notebook format. Much like the data scientist, the SRE has to do a lot of exploring, testing of multiple hypotheses to see what went wrong. “When you have an incident, you have no idea what is going on,” he said.

As much of the data science community knows, Project Jupyter provides a web interface for users to create and share documents with live code, equations, visualizations and text.

The researcher documents into the notebook the entire process of fact-finding, with live code, sample data and narrative notes. It can then be exported to  HTML where others can review and even step through the same steps.

A New Case Arrives…

Zadka offered a basic example of how an engineer would use Jupyter to document an incident. The most notable part of this example is that each step of the incident process was conducted within the Jupyter notebook itself.

“If someone needs to rewind the same step, they can just get the notebook and run it again,” he said.

In this hypothetical incident, a cloud-based service is failing to meet its services level agreements (SLAs). Servers are dipping below their P90 latency limits, though each server is acting somewhat differently. It turns out one of the services crashed, which is resulting in occasional long response times to queries. Which service? And what instance of that service?

The attending engineer will open a new Jupyter notebook and document each step — with data, the code used and commentary — even the dead-ends and missteps. Documenting each step along the way, the SRE in effect creates a document of how the problem was fixed. “That record will be relevant later on,” Zadka said.

In this hypothetical, the engineer opens Prometheus to get some performance numbers on the servers, not knowing what to look for, yet:

👁 Image

Eyeballing this graph, Zadka advises not to look at the highest or lowest line first, but rather the one showing the greatest amplitude. You could, in theory, write a detailed Prometheus query to get at that number, but “that’s often annoying,” he said, explaining that PromQL (Prometheus Query Language) is geared more towards basic queries (“Dear God, it is not really designed like a programming language.”)

Instead, parse the performance data with Python, a much easier task. Although originally created to run Python, Jupyter is a language-agnostic tool. The code needed here would be to query five minutes worth of performance data in 10-second increments, seeking the greatest amplitude across all the servers:

👁 Image

The next trick is to find out which EC2 instance the malfunctioning service is running on. Fortunately, Python has a tool to connect directly to the Amazon Web Services’ APIs. So another set of code can be crafted to query the AWS API that can describe all the instances, along with the handy identifying tags that the SRE put in place earlier:

👁 Image

Once the EC2 instance is identified, a next step is to connect to the instance, via SSH, to confirm it has a core dump file, indicating the crashed service:

👁 Image

And, to finish the job, the core file is moved elsewhere.  Easy peasy.

At least the incident itself is resolved. Any organization, however, would want to run a post-mortem or retrospective to shed light on what the problem was, how it was resolved. “Luckily, you already have most of the notes” already within the notebook itself, Zadka said. Usually, some additional documentation is needed at this point, usually the thought process behind the decisions, which can be added into the notebook with markdown.

Once done, the engineer can export to notebook to HTML, where it can be viewed as a presentation by anyone, and attached to the incident ticket.
Someone can even run that same code again, to do further analysis.

View the entire presentation here:

Amazon Web Services is a sponsor of The New Stack.

Feature image by shell_ghostcage de Pixabay

TRENDING STORIES
Joab Jackson is a senior editor for The New Stack, covering cloud native computing and system operations. He has reported on IT infrastructure and development for over 30 years, including stints at IDG and Government Computer News. Before that, he...
Read more from Joab Jackson
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.