Skip to content

Quickstart

Inobi is a real-time security detection engine for streaming event data. It processes JSON events, applies detection rules using configurable expressions, and outputs alerts.

Initial Setup

To get started, download the latest release.

Create a Rule

Create a directory for your rules:

mkdir test_rules

Define your first detection rule:

test_rules/test-rule.yaml
title: Suspicious login
id: 1
description: Login from blocklisted IP
level: high
status: experimental
type: event

detection:
  match: >
    event.action == "login-success"
      and ipInCIDRs(event.source.ip, "192.168.10.0/24", "192.168.50.0/24")

This rule alerts on successful logins where the source IP belongs to one of the listed subnets.

Create a Config

Create config.yaml to configure input, output, and rule directory path:

config.yaml
input:
  type: file
  path: events.json
  start_position: beginning    # Read the whole file on every start

rules:
  directory: test_rules/

outputs:
  - type: stdout    # Alerts printed to console
    indent: true

Validate

Before running, validate your config and rule syntax:

./inobi validate -c config.yaml

Expected output:

OK: 1 rule

Run the Engine

Create the input file:

touch events.json

Start the detection engine:

./inobi run -c config.yaml

Inobi is now watching events.json for new events. Operational logs are also written to stdout by default.

Send Events

In another terminal, append JSON events to events.json:

echo '{"action": "login-success", "source": {"ip": "192.168.50.10"}, "user": {"name": "admin"}}' >> events.json
echo '{"action": "login-success", "source": {"ip": "10.0.0.5"}, "user": {"name": "user"}}' >> events.json

An alert matching the first event should be printed to stdout:

{
   "timestamp": "2030-01-01T09:00:00+00:00",
   "rule": {
      "id": 1,
      "title": "Suspicious login",
      "type": "event",
      "level": "high",
      "status": "experimental",
      "description": "Login from blocklisted IP",
      "file": "test-rule.yaml"
   },
   "event": {
      "action": "login-success",
      "source": {
         "ip": "192.168.50.10"
      },
      "user": {
         "name": "admin"
      }
   }
}