<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ozgur Kara</title>
    <description>The latest articles on DEV Community by Ozgur Kara (@ta2ozg).</description>
    <link>https://dev.to/ta2ozg</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3089135%2Fcc9322f3-f4ce-4fe8-a1db-094de95046fb.png</url>
      <title>DEV Community: Ozgur Kara</title>
      <link>https://dev.to/ta2ozg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ta2ozg"/>
    <language>en</language>
    <item>
      <title>Reflections on Rust and it’s impact on Modern Software Development</title>
      <dc:creator>Ozgur Kara</dc:creator>
      <pubDate>Wed, 21 May 2025 10:30:01 +0000</pubDate>
      <link>https://dev.to/ta2ozg/reflections-on-rust-and-its-impact-on-modern-software-development-2e12</link>
      <guid>https://dev.to/ta2ozg/reflections-on-rust-and-its-impact-on-modern-software-development-2e12</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvjwleqksksj5jj5qk1pi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvjwleqksksj5jj5qk1pi.png" alt="Image description" width="800" height="1200"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hello, I read some articles and I would like to share it so as i dive deeper into Rust and I have started noticing how it challenges conventional SDLC practices. At first glance, issues like limited documentation or unfamiliar workflows may appear as shortcomings however, these are often not deficiencies of #Rust itself rather, they stem from the traditional development mindset and we have been taught and used for years.&lt;/p&gt;

&lt;p&gt;So Rust doesnt just offer memory safety or performance; it promotes a fundamentally different way of thinking about software development. It shifts the focus from “build fast, fix later” to “build safely and correctly from the start” and a mindset that enforces reliability and long-term maintainability.&lt;/p&gt;

&lt;p&gt;This shift doesnt only affect individual developers. Even core teams of long-established projects, like &lt;a href="https://kernel.org" rel="noopener noreferrer"&gt;Linux &lt;/a&gt;kernel project, are beginning to adapt their development processes in response to Rust’s principles. That alone speaks volumes. In essence, Rust is not just a language, it’s a paradigm shift in software engineering and without letting go of some legacy assumptions, we might miss the full potential that Rust offers.&lt;/p&gt;

&lt;p&gt;Before you can document an object, you have to bend yourself towards that object. Do you remember the bending the spoon scene?&lt;/p&gt;

&lt;p&gt;Happy hacking.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>softwaredevelopment</category>
      <category>programming</category>
    </item>
    <item>
      <title>Celebrating 10 years of Rust 1.0 🦀</title>
      <dc:creator>Ozgur Kara</dc:creator>
      <pubDate>Thu, 15 May 2025 13:21:20 +0000</pubDate>
      <link>https://dev.to/goosey/celebrating-10-years-of-rust-10-53dg</link>
      <guid>https://dev.to/goosey/celebrating-10-years-of-rust-10-53dg</guid>
      <description>&lt;p&gt;Ten years ago, &lt;strong&gt;Rust&lt;/strong&gt; 1.0 was released, a bold step towards safer, concurrent and performant programming. Today, &lt;strong&gt;Rust&lt;/strong&gt; is no longer a niche language; it’s a core tool in the modern engineer’s toolkit, trusted by many companies.&lt;/p&gt;

&lt;p&gt;So what makes &lt;strong&gt;Rust Programming Language&lt;/strong&gt; unique is not just its performance but its philosophy: empowering developers to write code that is both safe and fearless without sacrificing control.&lt;/p&gt;

&lt;p&gt;As an engineer, I find Rust inspiring not only for its technical achievements but for how it challenges us to rethink systems design from the ground up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ownership&lt;/strong&gt; and &lt;strong&gt;borrowing&lt;/strong&gt; instead of garbage collection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory safety&lt;/strong&gt; without a runtime.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Concurrency&lt;/strong&gt; without data races.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Rust&lt;/strong&gt; has not only solved problems, it’s changed the way we think and looking ahead, Rust is poised to go even further: embedded, AI, OS, web servers, edge computin and maybe beyond.&lt;/p&gt;

&lt;p&gt;Born from &lt;a href="https://mozilla.org" rel="noopener noreferrer"&gt;Mozilla&lt;/a&gt;’s research labs, Rust emerged as a response to the persistent challenges of languages like C and C++, which, while powerful, were plagued by memory safety issues, concurrency pitfalls and unwieldy abstractions.&lt;/p&gt;

&lt;p&gt;C, the bedrock of systems programming since the 1970s, offered unparalleled performance and low-level control. However, its manual memory management invited a host of vulnerabilities so programmers were responsible for allocating and freeing memory using malloc and free, a process prone to errors like dangling pointers, double frees and buffer overflows. These issues were not mere inconveniences; they were exploitable. According to the MITRE CVE database, over 60% of software vulnerabilities in the early 2010s were tied to memory mismanagement in C and C++ applications.&lt;/p&gt;

&lt;p&gt;As multi-core processors became ubiquitous in the 2000s and concurrency became critical. C and C++ relied on low-level primitives like POSIX threads or platform-specific APIs, which were notoriously difficult to use correctly. Data races, deadlocks and undefined behavior were common when multiple threads accessed shared memory without proper synchronization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rust&lt;/strong&gt;’s 1.0 release introduced a language that tackled these issues head-on, blending academic rigor with a hacker’s pragmatism. It’s key innovations ownership, borrowing and lifetimes so eliminated entire classes of bugs at compile time, without sacrificing performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ownership&lt;/strong&gt; and &lt;strong&gt;Borrowing&lt;/strong&gt; = &lt;strong&gt;Memory Safety&lt;/strong&gt; without a *&lt;em&gt;Garbage Collector&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rust&lt;/strong&gt;’s ownership model enforces strict rules: each value has a single owner, and when the owner goes out of scope, the value is dropped. Borrowing allows temporary access to data, with the compiler ensuring that references do not outlive the data they point to. This eliminates dangling pointers and use-after-free bugs.&lt;/p&gt;

&lt;p&gt;Now, that &lt;a href="https://rustfoundation.org" rel="noopener noreferrer"&gt;The Rust Foundation&lt;/a&gt; contributes to the &lt;strong&gt;Rust Programming Language&lt;/strong&gt; so we as &lt;a href="https://goosey.org" rel="noopener noreferrer"&gt;Goosey Inc&lt;/a&gt;, are already close to putting all our projects behind &lt;strong&gt;Rust&lt;/strong&gt; and becoming a wholehearted &lt;a href="https://rustfoundation.org" rel="noopener noreferrer"&gt;The Rust Foundation&lt;/a&gt; supporter.&lt;/p&gt;

&lt;p&gt;A decade after &lt;strong&gt;Rust&lt;/strong&gt; 1.0, the language stands as a testament to what happens when academic precision meets hacker ingenuity and by solving the memory safety, concurrency and abstraction problems that plagued C and Rust has redefined systems programming. It’s not just a tool, it’s a movement, one that empowers developers to build software that’s faster, safer and more reliable. Here’s to another decade of &lt;strong&gt;Rust&lt;/strong&gt;, where the only crashes are the ones we choose to write!&lt;/p&gt;

&lt;p&gt;Here’s to the next decade of fearless engineering. 🦀&lt;/p&gt;

</description>
      <category>rust</category>
    </item>
    <item>
      <title>Introducing rust-lxc: Manage Linux Containers with Rust 🦀</title>
      <dc:creator>Ozgur Kara</dc:creator>
      <pubDate>Fri, 09 May 2025 13:53:51 +0000</pubDate>
      <link>https://dev.to/ta2ozg/introducing-rust-lxc-manage-linux-containers-with-rust-1214</link>
      <guid>https://dev.to/ta2ozg/introducing-rust-lxc-manage-linux-containers-with-rust-1214</guid>
      <description>&lt;p&gt;LXC (Linux Containers) is a powerful tool for OS-level virtualization but there hasn't been a native Rust tool to manage it, until now!&lt;/p&gt;

&lt;h2&gt;
  
  
  Meet &lt;code&gt;rust-lxc&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://crates.io/crates/rust-lxc" rel="noopener noreferrer"&gt;&lt;code&gt;rust-lxc&lt;/code&gt;&lt;/a&gt; is a fully open-source Rust crate CLI that allows you to manage LXC containers using native Rust code.&lt;/p&gt;

&lt;p&gt;No more shell scripts, no more wrappers, just pure Rust and full control :-)&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Native FFI bindings to &lt;code&gt;liblxc&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;✅ Rust-based CLI (via &lt;a href="https://docs.rs/clap" rel="noopener noreferrer"&gt;&lt;code&gt;clap&lt;/code&gt;&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;✅ Easily run commands like:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run &lt;span class="nt"&gt;--&lt;/span&gt; create &lt;span class="nt"&gt;--name&lt;/span&gt; mycontainer &lt;span class="nt"&gt;--template&lt;/span&gt; download
cargo run &lt;span class="nt"&gt;--&lt;/span&gt; start &lt;span class="nt"&gt;--name&lt;/span&gt; mycontainer
cargo run &lt;span class="nt"&gt;--&lt;/span&gt; stop &lt;span class="nt"&gt;--name&lt;/span&gt; mycontainer
cargo run &lt;span class="nt"&gt;--&lt;/span&gt; delete &lt;span class="nt"&gt;--name&lt;/span&gt; mycontainer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📦 Getting Started
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Clone the repo:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/ta2ozg/rust-lxc
&lt;span class="nb"&gt;cd &lt;/span&gt;rust-lxc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Build and run:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo run &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;ls&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Or use it as a library:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="c"&gt;# Cargo.toml&lt;/span&gt;
&lt;span class="nn"&gt;[dependencies]&lt;/span&gt;
&lt;span class="py"&gt;rust-lxc&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"0.1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why we built this
&lt;/h2&gt;

&lt;p&gt;LXC deserves a fast, safe and modern Rust interface, &lt;code&gt;rust-lxc&lt;/code&gt; fills that gap. As the Linux kernel begins embracing Rust, it's time our tooling does too.&lt;/p&gt;

&lt;p&gt;This project aims to offer both a &lt;strong&gt;command-line interface&lt;/strong&gt; and a &lt;strong&gt;reusable library&lt;/strong&gt; for other Rust-based container tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Contributions welcome
&lt;/h2&gt;

&lt;p&gt;This project is open to the community, if you have any ideas, feedback PRs are welcome!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/ta2ozg/rust-lxc" rel="noopener noreferrer"&gt;https://github.com/ta2ozg/rust-lxc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Crate: &lt;a href="https://crates.io/crates/rust-lxc" rel="noopener noreferrer"&gt;https://crates.io/crates/rust-lxc&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you like this project, please add ⭐ star it, test it and help grow the ecosystem!&lt;/p&gt;




&lt;p&gt;🦀 Let's build the future of container tooling in Rust.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>linux</category>
      <category>containerapps</category>
      <category>container</category>
    </item>
    <item>
      <title>What is AIOps?</title>
      <dc:creator>Ozgur Kara</dc:creator>
      <pubDate>Fri, 25 Apr 2025 13:04:46 +0000</pubDate>
      <link>https://dev.to/ta2ozg/what-is-aiops-h66</link>
      <guid>https://dev.to/ta2ozg/what-is-aiops-h66</guid>
      <description>&lt;p&gt;&lt;strong&gt;The AI behind Autonomous Plants and Critical Infrastructure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkcqtvnrdvisf4j1aw2a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkcqtvnrdvisf4j1aw2a.png" alt="Sleep comfortably thanks to AIOps" width="800" height="750"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sleep comfortably thanks to AIOpsWelcome to AIOps, Artificial Intelligence for IT Operations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Collect&lt;/strong&gt;&lt;br&gt;
Ingests everything from logs, metrics, events not just monitors but also extracts context.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;&lt;br&gt;
Learns what is "normal" or what is "abnormal" with ML.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Guess&lt;/strong&gt;&lt;br&gt;
AI sees this and warns in advance, for example:&lt;br&gt;
"This CPU spike is causing this service to crash after 30 minutes every time."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automate&lt;/strong&gt;&lt;br&gt;
Doesn't create alerts from logs only takes action:&lt;br&gt;
Restart, scale, rollback. Whatever is needed and no human needed.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DevOps was cute. GitOps was clean. Then infra started scaling like hell, sensors started screaming and logs became novels.&lt;br&gt;
Now, it's AIOps time!&lt;/p&gt;

&lt;p&gt;No more manual dashboards at 4AM, no more "wait, which pod is on fire?" with AIOps, we're not just monitoring we're teaching the system to think, learn and action. Autonomously!&lt;/p&gt;

&lt;p&gt;So last night irolled out our AIOps module for mission-critical container workloads at &lt;a href="https://goosey.org" rel="noopener noreferrer"&gt;Goosey Inc. &lt;/a&gt;and i thought it might just run silently overnight. Turns out it kept me awake and not from errors but from excitement. At Goosey, we are building next-gen observability for data centers, powered by real-time sensor analytics and AI and from anomaly detection to early warning systems &lt;a href="https://goosey.org" rel="noopener noreferrer"&gt;Goosey Inc.&lt;/a&gt; is turning noise into insight. From anomaly detection to early warning systems, turning noise into insight.&lt;br&gt;
Stay tuned, something nuclear is coming :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technologies Stack&lt;/strong&gt;:&lt;br&gt;
Machine Learning&lt;br&gt;
Log &amp;amp; Metric correlation engines&lt;br&gt;
Natural Language Processing&lt;br&gt;
Automation tools&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core Stack (The AIOps Skeleteon)&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Data Ingestion&lt;br&gt;
Prometheus → metric&lt;br&gt;
Loki&lt;br&gt;
Fluentd&lt;br&gt;
OpenTelemetry&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Store&lt;br&gt;
Elasticsearch&lt;br&gt;
InfluxDB&lt;br&gt;
NATS.IO&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Correlation&lt;br&gt;
Grafana Machine Learning&lt;br&gt;
Yelp's ElastAlert&lt;br&gt;
OpenObserve&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;AI &amp;amp; ML Layer:&lt;/strong&gt;&lt;br&gt;
Facebook's Kats&lt;br&gt;
LangChain&lt;br&gt;
NVIDIA Morpheus&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automation Layer:&lt;/strong&gt;&lt;br&gt;
Terraform or Pulumi&lt;br&gt;
k8s Operators&lt;br&gt;
n8n&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observability&lt;/strong&gt;:&lt;br&gt;
Grafana&lt;br&gt;
Kibana&lt;br&gt;
PagerDuty&lt;/p&gt;

&lt;p&gt;Scenario: 04:00 AM, CPU spike and memory leak! So AI scans old data and observability records, sees what caused the crash before, finds root cause and restarts container, pods or applications.&lt;/p&gt;

&lt;p&gt;And writes note on Dashboard:&lt;br&gt;
"incident auto-resolved. go back to sleep. 🙂"&lt;/p&gt;

&lt;p&gt;So you wake up like:&lt;br&gt;
"oh. we didn't even crash."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The PoC Steps:&lt;/strong&gt;&lt;br&gt;
First, we will collect logs on Docker containers and we will set up a simple container application (nginx or another service) and get its logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collecting:&lt;/strong&gt;&lt;br&gt;
Docker logs will be directed to Elasticsearch or a log management tool and we will collect logs with tools like Fluentd.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn:&lt;/strong&gt;&lt;br&gt;
We will run the AI ​​model on these logs and detect anomalies for example we will detect abnormal increases in CPU usage or faulty requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Guess:&lt;/strong&gt;&lt;br&gt;
We will predict potential problems in the system using the AI ​​model and then trigger an automatic action (restart a container or application and send an alarm).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Step-by-Step Setup&lt;/strong&gt;:&lt;br&gt;
Run the example Docker container&lt;br&gt;
We will start an nginx container again, because it needs to produce logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collect Logs&lt;/strong&gt;:&lt;br&gt;
We can get Docker logs directly with Rust instead of Filebeat and it's possible to get logs via Docker API.&lt;br&gt;
Process Logs:&lt;br&gt;
We can use libraries like serde and regex to get and process logs in Rust.&lt;/p&gt;

&lt;p&gt;Okay, will write a simple algorithm for anomaly detection for example calculating the probability of a "problem" as error messages increase in the log.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intervention&lt;/strong&gt;:&lt;br&gt;
We can trigger an action after anomaly detection for example we can restart a Docker container.&lt;/p&gt;

&lt;p&gt;for &lt;strong&gt;Rust&lt;/strong&gt;:&lt;br&gt;
serde: process JSON data&lt;br&gt;
regex: analyze logs&lt;br&gt;
reqwest: communicate with Docker API&lt;br&gt;
tokio: For asynchronous operations&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First Step: Running the Docker Container&lt;/strong&gt;&lt;br&gt;
To start, let's run an nginx container with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run - name nginx -d -p 8080:80 nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Second Step: Create a Rust Project:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cargo new aiops
cd aiops
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Add the required Libraries: &lt;/strong&gt;&lt;br&gt;
Let's add the following dependencies to the cargo.toml file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[dependencies]
serde = "1.0"
serde_json = "1.0"
regex = "1.5"
reqwest = { version = "0.11", features = ["json"] }
tokio = { version = "1", features = ["full"] }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step Three: Fetching Docker Logs&lt;/strong&gt;&lt;br&gt;
We can use Docker API to fetch Docker logs. For example simple Rust code could be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use reqwest::Client;
use serde_json::Value;
#[tokio::main]
async fn main() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {
 let client = Client::new();
// get logs
 let logs_url = "http://localhost:2375/containers/nginx/logs?stdout=true";
 let logs: Value = client.get(logs_url)
 .send()
 .await?
 .json()
 .await?;
println!("{:#?}", logs);
 Ok(())
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step Four: Process Logs and Detect Anomalies&lt;/strong&gt;&lt;br&gt;
In Rust, we can use regex to analyze logs for example if there is an error message and we can detect anomalies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use regex::Regex;
fn detect_anomaly(log: &amp;amp;str) -&amp;gt; bool {
 let re = Regex::new(r"error|fail|down").unwrap();
 re.is_match(log)
}
fn main() {
 let log = "2025–04–24 04:01:10 error: something went wrong bla bla";
 if detect_anomaly(log) {
 println!("anomaly detected: {}", log);
 } else {
 println!("no anomaly detected");
 }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step Five: Automate Proactive Intervention&lt;/strong&gt;&lt;br&gt;
When an anomaly is detected we can take action. For example restart a Docker container to do this we can send a request to Docker API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;use reqwest::Client;
async fn restart_container() -&amp;gt; Result&amp;lt;(), Box&amp;lt;dyn std::error::Error&amp;gt;&amp;gt; {
 let client = Client::new();
 let restart_url = "http://localhost:2375/containers/nginx/restart";
 client.post(restart_url)
 .send()
 .await?;
println!("Anomaly detected, container restarted!");
 Ok(())
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Observability:&lt;/strong&gt;&lt;br&gt;
Prometheus&lt;br&gt;
Grafana&lt;/p&gt;

&lt;p&gt;So we will collect metrics of Docker application (CPU, memory bla bla) and we will pull and save these metrics using Prometheus and Grafana.&lt;/p&gt;

&lt;p&gt;Integrating Grafana with Prometheus we will visualize all metrics on the application or container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version: "3"
services:
prometheus:
image: prom/prometheus
container_name: prometheus
ports:
 - "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana
container_name: grafana
ports:
 - "3000:3000"
environment:
GF_SECURITY_ADMIN_PASSWORD=admin
depends_on:
- prometheus
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A simple configuration file for Prometheus (prometheus.yml):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;global:
scrape_interval: 15s
scrape_configs:
- job_name: 'nginx'
static_configs:
- targets: ['nginx:9113']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So login to Grafana admin interface and add Prometheus DataSource.&lt;br&gt;
After logging in to Grafana go to the Data Sources section and add Prometheus then in a Dashboards tab, you can select a ready-made Nginx or other dashboard.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Anomaly Detection with Rust:&lt;/strong&gt;&lt;br&gt;
You can pull data with Rust using Prometheus metrics and again remember that you can get metrics from Prometheus /metrics endpoint using libraries like reqwest or tokio in Rust.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Action:&lt;/strong&gt;&lt;br&gt;
After getting metrics for example if the CPU usage is very high or there is a memory error so we can detect this as anomaly and take action. When anomaly is detected we can restart container using Docker API.&lt;br&gt;
Also, you can get anomaly detection and alerts on the dashboard with Prometheus Alertmanager or Grafana Alerting and this will relax you at 04:00 AM.&lt;/p&gt;

&lt;p&gt;Finally, I would be happy to provide information about AIOps (Artificial Intelligence for IT Operations) so AIOps refers to the use of Artificial Intelligence and Machine Learning technologies in IT operations. It's main purpose is to strengthen IT infrastructure monitoring, problem detection, correlation of events and automatic solution generation processes with AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The basic components of AIOps are as follows:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Collection&lt;/strong&gt;&lt;br&gt;
Collects and combines data from different systems and sources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machine Learning&lt;/strong&gt;&lt;br&gt;
Used for anomaly detection correlation of events and problem prediction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automation&lt;/strong&gt;&lt;br&gt;
Increases operational efficiency by automating repetitive tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main benefits of AIOps:&lt;/strong&gt;&lt;br&gt;
Faster problem detection and resolution&lt;br&gt;
Reducing downtime&lt;br&gt;
Automation of manual processes&lt;br&gt;
Proactive problem management&lt;br&gt;
Error detection time: 5 min → 30 sec.&lt;br&gt;
Reduce: Reduce by 80%.&lt;/p&gt;

&lt;p&gt;Bonus Dashboard: Stylish charts in Grafana and view anomaly trends.&lt;/p&gt;

</description>
      <category>aiops</category>
      <category>ai</category>
      <category>devops</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
