Build connection graph
arkime_connectionsBuild a source/destination connection graph to trace lateral movement or map which hosts a suspect IP communicated with.
Instructions
Build a source/destination connection graph of who talked to whom.
Returns nodes and links between two fields — useful for tracing lateral
movement or mapping which hosts a suspect IP communicated with. NOTE the
src/dst fields take Arkime *db* names (srcIp, dstIp, dstPort, node) or
the dotted storage paths (source.ip, destination.port), which resolve to
the same graph; the one vocabulary this route rejects is the expression
names arkime_sessions uses in `expression` (ip.src, port.dst). For
distinct field-tuple pairs as text rather than a graph use
arkime_multiunique; for a nested top-N hierarchy use
arkime_spigraphhierarchy. Returns the raw Arkime connections response
(nodes and links).
The graph is drawn from `sessions` of the matching sessions, not from
all of them. When more sessions matched than were used, a "Note:" line
above the JSON gives both numbers; narrow with expression or raise
sessions before reading a sparse graph as "these are the only hosts
talking".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time_to | No | End time as EPOCH SECONDS (NOT a dateparser string). Empty = now. | |
| sessions | No | How many matching sessions the graph is drawn from (Arkime's length; its own default is 100). More sessions find more hosts and take longer: on Malcolm's training instance a query matching 41,768 sessions drew 8 nodes from 100 sessions, 23 from 10,000 (1.4 s) and 39 from 50,000 (3.5 s). | |
| dst_field | No | Arkime db field for destination nodes (default dstIp; dstPort graphs by port instead of by host). Same vocabulary as src_field: db column or dotted storage path, never the exp column. | dstIp |
| src_field | No | Arkime db field for source nodes (default srcIp). Common choices: srcIp, dstIp, dstPort, node — arkime_field_search's db column. The dotted storage path works here too and gives the identical graph: srcIp/dstIp and source.ip/destination.ip draw the same nodes and links. What this route will NOT take is the exp column: srcField=ip.src gets HTTP 403 and dstField=port.dst HTTP 500 "TypeError: Cannot read properties of undefined", so the expression names whose db spelling differs are refused here before the request is sent. | srcIp |
| time_from | No | Start time as EPOCH SECONDS (NOT a dateparser string). Empty = Arkime's recent-only default. | |
| expression | No | Optional Arkime expression syntax to scope the graph. Empty = all sessions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |