SShortSingh.
Back to feed

How to Build a Lightweight SIEM Using Python, SQLite, and Telegram for Free

0
·1 views

A developer tutorial on DEV Community outlines how to build a minimal Security Information and Event Management (SIEM) system using Python, SQLite, and Telegram alerts in under 400 lines of code. The lightweight setup is designed for teams that cannot afford enterprise tools like Splunk or Elastic SIEM and can run on a single VM, Raspberry Pi, or a low-cost VPS. The system covers three core SIEM functions: log collection from multiple sources, event correlation against detection rules, and real-time alerts when a rule is triggered. SQLite is used as the database backend due to its file-based nature and ability to handle tens of millions of rows without a dedicated server process. The guide includes code for tailing SSH auth logs, detecting brute-force attempts, and storing raw events and detections in a structured schema with WAL mode enabled for concurrent read-write performance.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds Sitelo, a zero-config static site generator that skips browser JavaScript by default

A developer frustrated with the complexity of modern web frameworks has created Sitelo, a lightweight static site generator built on top of Vite. Sitelo uses JavaScript functions in specially named files to generate plain HTML at build time, sending no JavaScript to the browser unless explicitly required. It supports file-based routing, TypeScript, JSX, dynamic routes, and build-time data loading with minimal configuration. A standout feature called server islands allows individual page sections to be rendered dynamically at request time without converting the entire site to a server-rendered application. Sitelo also includes deployment presets for major platforms like Netlify, Vercel, and Cloudflare Pages, along with built-in support for sitemaps, RSS feeds, and static search.

0
ProgrammingDEV Community ·

BR-DE-15 XRechnung Error Explained: Missing Buyer Reference Field BT-10

Developers generating XRechnung invoices may encounter a fatal BR-DE-15 validation error from the KoSIT validator, which is not a tool malfunction. The error indicates that the buyer reference field BT-10 is absent from the invoice. For German public sector invoices, this field must contain the Leitweg-ID, while business-to-business invoices should use whatever reference was agreed upon with the buyer. The fix requires setting the invoice.buyer_reference field in the submitted data. A dedicated documentation page and a free XML validation tool are available for developers who need to check compliance without creating an account.

0
ProgrammingDEV Community ·

Modular Monolith Often Beats Microservices for Early-Stage Projects, Experts Argue

A widely circulated developer essay argues that most early-stage projects fail not because of monolithic architecture but because engineers adopt microservices before their product complexity justifies it. The piece outlines four architectural patterns — monolith, modular monolith, microservices, and the problematic 'distributed monolith' — noting that the last is the most common outcome of premature service splits. The author highlights that microservices introduce real costs including network latency, distributed transaction complexity, and multiplied CI/CD pipelines that small teams are ill-equipped to manage. As a counterexample, Shopify is cited as running a 2.8-million-line Rails monolith with enforced internal boundaries using a tool called Packwerk. The essay concludes that a modular monolith offers most of the structural benefits of microservices without the operational overhead, and that splitting too early is costlier than splitting too late.

0
ProgrammingDEV Community ·

Developer fixes V8 memory leaks and Redis cache stampedes in Next.js e-commerce API

A developer building a personal high-throughput e-commerce API with Next.js SSR and Redis encountered severe instability as simulated flash-sale traffic scaled up. The system suffered recurring out-of-memory crashes and HTTP 502 errors caused by two interlinked bugs: a V8 garbage collection failure from storing large request objects in a global array, and a Redis cache stampede that flooded PostgreSQL whenever a cache entry expired. The memory leak was resolved by removing module-level state and decoupling the request object from the metrics closure entirely. The stampede was addressed using a probabilistic early-expiration algorithm called XFetch, which volunteers a single background request to refresh the cache before expiry rather than allowing thousands of simultaneous database hits. Together, the fixes eliminated the cascading failure without requiring expensive distributed mutex locks.