Event Management

Json structures

Get events for current user

[
    {
        "type": "cmd_result",
        "level": "ERR"/"WARNING"/"INFO"/"CRITICAL",
        "data": { ... }
    }
]

cmd result

{
    "id": "17",
    "code": "0",
    "message": "Success"
}

tool online / tool offline

Raised when a tool of the active rule set becomes usable or stops being usable, that is when the link of one of its ports moved and, with it, the is_online field of the tool (see Tool Management). The type of the event is "tool_online" or "tool_offline", both carrying:

{
    "id": 7
}

Changing which rule set is active raises none of them, although it does change the field for every tool at once: the new state is derived silently, so the tools have to be read back after activating, deactivating or deleting a rule set.

tool group failover

Raised when the tool carrying the traffic of a tool group changes, including when the last online member drops and no tool is left to take over.

{
    "id": 4,
    "active_tool_id": 7
}

As with the tool events, a failover is only raised while a rule set stays active: activating, deactivating or deleting one derives the carrying tool of every group silently.

When an enabled traffic chain of the active rule set goes through the tool or the group that changed, and the change alters how the chain is realized — a hop with bypass_enabled whose tool went offline or came back, or an "active_passive_ha" group whose carrying tool changed — the daemon deploys that rule set again on the spot (see Chain Management).

Back to X2-SERIES API Home