Learn to move ops data where models can use it: stream alerts and metrics through Kafka, export Prometheus history, and check data quality first.
An AIOps model needs two things before it can help anyone: a history it can learn from, and a live stream it can act on.
For AIOps you need five Kafka ideas and a few settings, not the whole system. This topic covers what an ops pipeline actually uses.
You stream alerts by receiving them from Alertmanager and publishing each one to a topic, keyed by service.
A consumer group lets several workers share a topic, and offset reset lets you replay history through new logic.
Prometheus is built for recent data, so keeping months of history needs a long-term store or a regular export.
You export history by calling the Prometheus query_range API and loading the result into a pandas DataFrame.
An AIOps model needs two things before it can help anyone: a history it can learn from, and a live stream it can act on.
For AIOps you need five Kafka ideas and a few settings, not the whole system.
You stream alerts by receiving them from Alertmanager and publishing each one to a topic, keyed by service.
A consumer group lets several workers share a topic, and offset reset lets you replay history through new logic.
Prometheus is built for recent data, so keeping months of history needs a long-term store or a regular export.
You export history by calling the Prometheus query_range API and loading the result into a pandas DataFrame.
A model will happily learn from bad data, so you check the data first.
This lab streams real alerts through Kafka, replays them, then exports and checks two hours of metrics from the...
Quick reference Common mistakes Treating Kafka as the archive loses data quietly, because topics expire after their...
Roles that use the skills in this module.
Data Engineer
₹8L - ₹20L a year
Platform Engineer
₹10L - ₹22L a year
Backend Engineer
₹8L - ₹18L a year
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetAlerts and events arrive continuously from many systems, and models need a durable history to train on. Kafka buffers the stream, keeps it for a set time, and lets several consumers read it independently. It also lets you replay old events after you change a rule or a model.
By default Prometheus keeps data on local disk for 15 days, and you can change that with a retention flag. For months of history you need long-term storage or a regular export. Check the retention setting of your own server before you plan a training dataset.
No. Kafka is a durable log for events, not a store you query by time range or label. Use it to move and replay data, and keep metrics in Prometheus or a long-term metrics store.
Check for gaps in the timestamps, counter resets, missing values, duplicate rows, clock skew, and inconsistent labels. Any of these can look like an anomaly to a model. A short checker script run on every export catches most of them.