---
title: Live Analytics
url: https://docs.kaltura.com/docs/rich-media-cms-apis/analytics/analytics-live
---

## Live Analytics

Real-time analytics for active live streams.

### liveReports.getEvents

**Parameters**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `reportType` | string | Yes | Report type string. Use `ENTRY_TIME_LINE` for per-entry live viewer timeline |
| `filter[objectType]` | string | Yes | Always `KalturaLiveReportInputFilter` |
| `filter[entryIds]` | string | Yes | Live entry ID(s) to monitor |
| `filter[fromTime]` | int | Yes | Start of time window as Unix timestamp in seconds |
| `filter[toTime]` | int | Yes | End of time window as Unix timestamp in seconds |
| `filter[live]` | int | No | Set to `1` to include only live (not DVR) viewers |

```bash
# Calculate time window: now - 110s to now - 20s (90-second window)
FROM_UNIX=$(($(date +%s) - 110))
TO_UNIX=$(($(date +%s) - 20))

curl -X POST "$KALTURA_SERVICE_URL/service/liveReports/action/getEvents" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "reportType=ENTRY_TIME_LINE" \
  -d "filter[objectType]=KalturaLiveReportInputFilter" \
  -d "filter[entryIds]=$KALTURA_ENTRY_ID" \
  -d "filter[fromTime]=$FROM_UNIX" \
  -d "filter[toTime]=$TO_UNIX" \
  -d "filter[live]=1"
```

The 20-second offset accounts for data propagation delay. Use the 90-second window for reliable real-time viewer counts.

### Stream Health via beacon.list

**Parameters**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `filter[objectType]` | string | Yes | Always `KalturaBeaconFilter` |
| `filter[eventTypeIn]` | string | Yes | Beacon types (comma-separated). Health: `0_healthData,1_healthData`. Diagnostics: `0_staticData,0_dynamicData,1_staticData,1_dynamicData` |
| `filter[indexTypeEqual]` | string | Yes | `log` for health alerts (time-series), `state` for diagnostics (latest snapshot) |
| `filter[relatedObjectTypeIn]` | string | Yes | Object type. Use `4` for entry-level beacons |
| `filter[objectIdIn]` | string | Yes | Entry ID(s) to monitor |
| `filter[orderBy]` | string | No | Sort order. Use `-updatedAt` for most recent first |

#### Health Beacons (Alerts)

```bash
curl -X POST "$KALTURA_SERVICE_URL/service/beacon/action/list" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "filter[objectType]=KalturaBeaconFilter" \
  -d "filter[eventTypeIn]=0_healthData,1_healthData" \
  -d "filter[indexTypeEqual]=log" \
  -d "filter[relatedObjectTypeIn]=4" \
  -d "filter[objectIdIn]=$KALTURA_ENTRY_ID" \
  -d "filter[orderBy]=-updatedAt"
```

#### Diagnostics Beacons (Encoder Data)

```bash
curl -X POST "$KALTURA_SERVICE_URL/service/beacon/action/list" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "filter[objectType]=KalturaBeaconFilter" \
  -d "filter[eventTypeIn]=0_staticData,0_dynamicData,1_staticData,1_dynamicData" \
  -d "filter[indexTypeEqual]=state" \
  -d "filter[relatedObjectTypeIn]=4" \
  -d "filter[objectIdIn]=$KALTURA_ENTRY_ID"
```

**Beacon event type prefixes:** `0_` = primary stream, `1_` = backup/secondary stream.

**Stream health severity levels:**

| Level | Name | Description |
|-------|------|-------------|
| 0 | Debug | Verbose diagnostic data |
| 1 | Info | Normal operational events |
| 2 | Warning | Potential issues requiring attention |
| 3 | Error | Stream quality degradation |
| 4 | Critical | Stream failure or severe degradation |

### Recommended Polling Intervals

| Data Type | Interval | Endpoint |
|-----------|----------|----------|
| Stream status | 5 seconds | `entryServerNode.list` |
| Stream health alerts | 10 seconds | `beacon.list` (log index) |
| Stream diagnostics | 30 seconds | `beacon.list` (state index) |
| Live viewer analytics | 30 seconds | `liveReports.getEvents` |

### Realtime Report Types

Use these report types with `report.getTable` / `report.getGraphs` for live dashboard panels:

| ID | Name | Description |
|----|------|-------------|
| `10005` | USERS_OVERVIEW_REALTIME | Current concurrent viewers and engagement |
| `10006` | QOS_OVERVIEW_REALTIME | Quality of Experience: buffer rate, bitrate, error rate |
| `10001` | MAP_OVERLAY_COUNTRY_REALTIME | Live geographic distribution by country |
| `10002` | MAP_OVERLAY_REGION_REALTIME | Live geographic distribution by region |
| `10003` | MAP_OVERLAY_CITY_REALTIME | Live geographic distribution by city |
| `10004` | PLATFORMS_REALTIME | Live device breakdown |
| `10008` | ENTRY_LEVEL_USERS_DISCOVERY_REALTIME | Per-entry live viewer counts |
| `10011` | PLAYBACK_TYPE_REALTIME | Live vs DVR vs VOD breakdown |
| `10007` | DISCOVERY_REALTIME | Real-time content discovery metrics |
