nano SIEM
Search Commands

inputlookup

Supported in:Self-hosted

Read one of your lookup tables as search results, or fetch rows from a URL.

Use inputlookup to read your lookup table as search results. You can also fetch rows from an HTTP(S) URL.

inputlookup is a generating command: it starts the search instead of reading events.

Syntax

| inputlookup <table>
| inputlookup url="<url>" [format=json|csv|ndjson] [key=<field>] [timeout=<seconds>] [max_rows=<n>] [cache_ttl=<seconds>]

The leading | is optional: inputlookup threat_iocs on its own also runs the command. To search for the words "inputlookup threat_iocs" instead, quote them or start with search.

ArgumentDefaultDescription
table—Name of one of your lookup tables. Letters, digits, _, - and ..
url="…"—URL to fetch instead of a table (see below).
formatjsonHow to parse the URL response: json (an array or a single object), csv (with a header row) or ndjson.
key—Enrichment mode: the event field whose value fills {field} placeholders in the URL.
timeout30Request timeout in seconds, clamped to 1–60.
max_rows10000Maximum rows to read, 1–100000. Values outside the range are a syntax error.
cache_ttl300Seconds to cache a URL response, capped at 3600. 0 disables the cache.

Examples

List a watchlist table:

| inputlookup threat_iocs

Read the asset inventory and keep the critical servers:

| inputlookup asset_inventory | where criticality="high" | table hostname, owner, criticality

Count assets per owner:

| inputlookup asset_inventory | stats count by owner | sort -count

Sweep every value in a table across your logs. This is a search term, not inputlookup; see retro:

ioc in lookup("threat_iocs") | stats count by metadata.log_source

URL mode

| inputlookup url="https://feeds.example.com/blocklist.csv" format=csv max_rows=50000

Fetches the URL and returns its rows. With key=<field>, the URL is fetched once per distinct value of that field, the value is substituted into the {field} placeholder, and the response columns are added to each row with an inputlookup_ prefix.

Run commands after enrichment

inputlookup is not compiled into the ClickHouse query. The search splits at the first lookup, prevalence, inputlookup, resolve_identity, ai or lateral stage, and every command after it runs in post-processing. Only these commands work there: where, head, tail, sort, table, stats, dedup, rename, fields, top, rare, fillnull, eval, timechart, rex, risk, reverse, tree.

What's next

  • lookup: add table columns to event rows
  • retro: ioc in lookup("…") sweeps a table's values across history
  • where: filter table rows

On this page