ML
Kibana

Index Patterns, Data Views, and Runtime Fields

Kibana's data model is three layers. Confusing them is how you end up with dashboards that look right and count wrong.

August 02, 20257 min readKibanaData Modeling

Kibana queries data through Data Views (renamed from Index Patterns in 8.x). A Data View is a saved object that binds a glob of indices, a timestamp field, and a list of fields — including runtime fields that don't exist on disk.

The golden rule: one timestamp per Data View

If a pattern matches indices with different @timestamp semantics (for example, ingest time vs event time), your dashboards silently double-count or drop records during overlap windows. Keep timestamp fields consistent across the pattern.

Runtime fields — safe, but they cost CPU

A runtime field is a Painless script evaluated at query time. Great when you need a derived value once, or on historical data you can't reindex.

{
  "runtime_field_definitions": {
    "is_weekend": {
      "type": "boolean",
      "script": {
        "source": "def dow = doc['@timestamp'].value.getDayOfWeek().value; emit(dow > 5);"
      }
    }
  }
}

Use them to prototype. Promote to indexed fields once a dashboard depends on them — querying 90 days of logs with a runtime field is measurably slower than the same query over an indexed field.

Scripted fields are deprecated

Old Kibana scripted fields are still supported but shouldn't be added new. Runtime fields are the successor and are managed inside the Data View or inside the index mapping itself.

Field formats

Easy to miss: Data Views let you format a field (bytes, percent, duration) for display without touching storage. A raw long in bytes shows up as "1.2 GB" once you set the formatter. This is the fastest way to make dashboards readable without reindexing.

Where to draw the line

  • Derived values used in one visualisation → runtime field.
  • Derived values used across many dashboards → ingest pipeline or reindex.
  • Presentation only → Data View field format.
SharePostLinkedIn

Reader Discussion

7 replies// weighed in

TopNewestAuthor
Add to the thread
Disagree, agree harder, or share your own experience…
Email instead →markdown okbe kind
  1. Rodrigo Alves· Data AnalystFrom experience

    the KQL/Lucene gotcha on analyzed fields has bitten me 5+ times. status: "Active" returning zero hits because the field is text-analyzed and lowercased to "active". it's not a bug, it's a foundational pain.

    Aug 07, 2025·5 days later
  2. Fatima Al-Zahra· Security EngineerStory

    DLS/FLS is so under-rated. We were 3 sprints into building a custom tenancy proxy when someone surfaced these features in a brown bag. Cancelled the project. Saved an entire quarter of work.

    Aug 06, 2025·4 days later
  3. Takeshi Mori· PlatformAgrees

    the 'space membership + role + ES privilege' three-way alignment is the source of every "why does this dashboard return zero hits" ticket I've ever closed. should be a chart in onboarding.

    Aug 07, 2025·5 days later
  4. Evi Papadopoulou· Tech LeadFrom experience

    canvas is great until someone makes a 47-element dashboard and the page hangs for 8s. happy mediums exist somewhere between "4 KPI tiles" and "art project". still love it for exec readouts though.

    Aug 08, 2025·6 days later
  5. Clara Jensen· SREAgrees

    splitting on-call vs fyi connectors is one of those changes that pays for itself in two weeks and you spend the next two years wondering how you ever lived without it. people stopped muting #alerts. that's the metric.

    Aug 04, 2025·2 days later
  6. Léa Dubois· SREAsks

    any chance you'd publish these as a PDF collection? would love to print and read offline on flights. screen-fatigue is real.

    Aug 08, 2025·6 days later
  7. Ahmed Rahman· Full StackKind words

    concise + opinionated = my favourite kind of engineering post. so many blogs hedge every claim into mush. give me the spicy take with the receipts. more please.

    Aug 03, 2025·1 day later

Worked on something similar? Email ducminhldm@gmail.com — I read every one. The good ones become future posts.

Comments seeded · live discussion via email