Kafka Connector Reference
Review the complete list of supported data entities and data streaming parameters
Supported Data Entities
The Samsara Kafka Connector supports the following data entities:
- Asset Locations (GPS) and Speeds
- Vehicle Diagnostics (full list below)
- Events (full list below)
Feedback requested
Samsara plans to support additional data entities over time based on customer feedback. We want to know what additional entities we should prioritize based on your data pipelining objectives and business goals. If you would like to see other data entities supported, please share your feedback with your Samsara representatives.
Asset Readings
GPS and Speed
{
"happenedAtTime": "2023-12-19T17:57:21Z",
"asset": {
"id": "154924973293665"
},
"location": {
"latitude": 38.253265915,
"longitude": -80.018465004,
"headingDegrees": 102,
"accuracyMeters": 0,
"geofence": {}
},
"speed": {
"gpsSpeedMetersPerSecond": 43.8
"ecuSpeedMetersPerSecond": 51.2
}
}
Vehicle Diagnostics
AUX Inputs
AUX Input Example
{
"vehicle": {
"id": "281474990577720"
},
"auxInput1": {
"name": "Boom",
"time": "2020-01-27T07:06:25Z",
"value": true
},
}
NFC Card Scan
{
"vehicle": {
"id": "281474990577720"
},
"nfcCardScan": {
"card": {
"id": "835063"
},
}
Engine Diagnostics
Ambient Air Temp
{
"vehicle": {
"id": "281474991840886"
},
"ambientAirTemperatureMilliC": {
"time": "2024-08-28T20:00:40Z",
"value": 736094
}
}
Barometric Pressure
{
"vehicle": {
"id": "281474991840886"
},
"barometricPressurePa": {
"time": "2024-08-21T22:24:24Z",
"value": 7000
}
}
Engine Coolant Temp
{
"vehicle": {
"id": "281474991840886"
},
"engineCoolantTemperatureMilliC": {
"time": "2024-08-28T20:04:40Z",
"value": 185000
}
}
Engine Oil Pressure
{
"vehicle": {
"id": "281474991840886"
},
"engineOilPressureKPa": {
"time": "2024-08-21T22:24:24Z",
"value": 56
}
}
Intake Manifold Temp
{
"vehicle": {
"id": "281474991840886"
},
"intakeManifoldTemperatureMilliC": {
"time": "2024-08-21T22:24:32Z",
"value": 0
}
}
Engine Immobilizer
Immobilizer State
{
"vehicle": {
"id": "281474991956423"
},
"engineImmobilizer": {
"connected": false,
"state": "ignition_enabled",
"time": "2024-08-20T19:36:47Z"
}
}
Engine Metrics
Engine Hours (ECU)
{
"vehicle": {
"id": "281474991840886"
},
"obdEngineSeconds": {
"time": "2024-08-28T20:49:49Z",
"value": 22931460
}
}
Engine Hours (Synthetic)
Engine Load Percent
{
"vehicle": {
"id": "281474991840886"
},
"engineLoadPercent": {
"time": "2024-08-21T22:24:24Z",
"value": 50
}
}
Engine RPM
{
"vehicle": {
"id": "281474991840886"
},
"engineRpm": {
"time": "2024-08-21T22:24:24Z",
"value": 6038
}
}
Engine States
Engine States
{
"vehicle": {
"id": "281474991840886"
},
"engineStates": {
"time": "2024-08-21T22:24:32Z",
"value": "Off"
}
}
EV Battery Diagnostics
Battery Avg. Temp (EV)
{
"vehicle": {
"id": "281474990577720"
},
"evAverageBatteryTemperatureMilliCelsius": {
"time": "2020-01-27T07:06:25Z",
"value": 1000
},
}
Battery Charging Current (EV)
{
"vehicle": {
"id": "281474991840886"
},
"evChargingCurrentMilliAmp": {
"time": "2024-08-21T19:34:40Z",
"value": 0
}
}
Battery Charging Energy (EV)
{
"vehicle": {
"id": "281474991956423"
},
"batteryMilliVolts": {
"time": "2024-08-27T22:48:47Z",
"value": 9889
}
}
Battery Charging Status (EV)
{
"vehicle": {
"id": "281474991840886"
},
"evChargingStatus": {
"time": "2024-08-21T22:24:32Z",
"value": 0
}
}
Battery Charging Voltage (EV)
{
"vehicle": {
"id": "281474991840886"
},
"evChargingVoltageMilliVolt": {
"time": "2024-08-21T19:34:40Z",
"value": 0
}
}
Battery State of Health (EV)
{
"vehicle": {
"id": "281474991840886"
},
"evBatteryStateOfHealthMilliPercent": {
"time": "2024-08-21T22:23:46Z",
"value": 98800
}
}
Distance Driven (EV)
{
"vehicle": {
"id": "281474991840886"
},
"evDistanceDrivenMeters": {
"time": "2024-08-21T19:34:44Z",
"value": 15
}
}
Regenerated Energy (EV)
{
"vehicle": {
"id": "281474991840886"
},
"evRegeneratedEnergyMicroWh": {
"time": "2024-08-21T22:24:32Z",
"value": 761502200000
}
}
Battery Voltage (non-EV)
{
"vehicle": {
"id": "281474991840886"
},
"batteryMilliVolts": {
"time": "2024-08-28T20:40:38Z",
"value": 11694
}
}
Exhaust Measures
DEF Level
{
"vehicle": {
"id": "281474991840886"
},
"defLevelMilliPercent": {
"time": "2024-08-21T22:23:15Z",
"value": 67200
}
}
Fault Codes
Fault Codes
{
"vehicle": {
"id": "281474991840886"
},
"faultCodes": {
"canBusType": "CANBUS_CAN1_J1939_9PIN_PINS_C_D",
"j1939": {
"checkEngineLights": {
"emissionsIsOn": true,
"protectIsOn": false,
"stopIsOn": false,
"warningIsOn": false
},
"diagnosticTroubleCodes": [
{
"fmiDescription": "Data Drifted High",
"fmiId": 20,
"milStatus": 1,
"occurrenceCount": 100,
"sourceAddressName": "Engine #1",
"spnDescription": "Automatic Gear Shifting Enable Switch",
"spnId": 1666,
"txId": 0
},
{
"fmiDescription": "Low—most severe",
"fmiId": 1,
"milStatus": 0,
"occurrenceCount": 50,
"sourceAddressName": "Suspension - Drive Axle #1",
"spnDescription": "Aux Valve 0 Retract Port Measured Flow",
"spnId": 1900,
"txId": 21
}
]
},
"time": "2024-08-21T19:37:12Z"
}
}
Fuel Levels
Fuel Levels
{
"vehicle": {
"id": "281474991840886"
},
"fuelPercents": {
"time": "2024-08-21T22:24:24Z",
"value": 6
}
}
Odometer
Odometer meters (OBD)
{
"vehicle": {
"id": "281474991840886"
},
"obdOdometerMeters": {
"time": "2024-08-21T22:24:32Z",
"value": 2482355
}
}
Odometer meters (GPS)
Seatbelt Statuses
Seatbelt Statuses
{
"vehicle": {
"id": "281474991840886"
},
"seatbeltDriver": {
"time": "2024-08-21T22:24:32Z",
"value": "Unbuckled"
}
}
Speed
Speed MPH (ECU)
{
"vehicle": {
"id": "281474991840886"
},
"ecuSpeedMph": {
"time": "2024-08-21T22:24:32Z",
"value": 0
}
}
Spreader Diagnostics
Spreader Active
{
"vehicle": {
"id": "281474991840886"
},
"spreaderActive": {
"time": "2024-08-15T20:07:16Z",
"value": "On"
}
}
Spreader Air Temp
{
"vehicle": {
"id": "281474991840886"
},
"spreaderAirTemp": {
"time": "2024-08-16T19:42:02Z",
"value": 0
}
}
Spreader Blast State
{
"vehicle": {
"id": "281474991840886"
},
"spreaderBlastState": {
"time": "2024-08-16T19:42:03Z",
"value": "Off"
}
}
Spreader Granular Name
{
"vehicle": {
"id": "281474991840886"
},
"spreaderGranularRate": {
"time": "2024-08-16T19:42:03Z",
"value": 0
}
}
Spreader Liquid Name
Spreader Liquid Rate
{
"vehicle": {
"id": "281474991840886"
},
"spreaderLiquidRate": {
"time": "2024-08-15T20:10:58Z",
"value": 0
}
}
Spreader On State
{
"vehicle": {
"id": "281474991840886"
},
"spreaderOnState": {
"time": "2024-08-28T20:55:59Z",
"value": "On"
}
}
Spreader Plow Status
Spreader Prewet Name
{
"vehicle": {
"id": "281474991840886"
},
"spreaderPrewetName": {
"time": "2024-08-15T20:07:01Z",
"value": "PWT"
}
}
Spreader Prewet Rate
{
"vehicle": {
"id": "281474991840886"
},
"spreaderPrewetRate": {
"time": "2024-08-15T20:10:58Z",
"value": 28
}
}
Temperatures
Spreader Road Temp
{
"vehicle": {
"id": "281474991840886"
},
"spreaderRoadTemp": {
"time": "2024-08-16T19:42:02Z",
"value": 0
}
}
Events
- See sample data payloads on Webhooks 2.0 Reference
Address
Address Created
"entityType": "addressCreated",
"data":{}
Address Deleted
"entityType": "addressDeleted",
"data":{}
Address Updated
"entityType": "addressUpdated",
"data":{}
Alerts
Alert Incidents
Driver
Driver Document Submitted
{
"document": {
"createdAtTime": "2024-08-28T19:29:45.000Z",
"documentType": {
"id": "2c541bb5-d033-4a8e-9d53-f3db85d366ff",
"name": "Bill of Lading"
},
"driver": {
"id": "51732619",
"name": "test driver"
},
"fields": [
{
"label": "Photos",
"type": "photo",
"value": {}
},
{
"label": "Reference #",
"type": "string",
"value": {}
}
],
"id": "51732619_1724873385298",
"state": "submitted",
"updatedAtTime": "2024-08-28T19:29:45.000Z",
"vehicle": {
"externalIds": {
"samsara.serial": "G7E5GM59H7"
},
"id": "281474991565165",
"name": "Test G7E5-GM5-9H7"
}
},
"eventType": "documentSubmitted"
}
Driver Created
{
"driver": {
"carrierSettings": {},
"createdAtTime": "2024-08-28T18:56:08.388Z",
"driverActivationStatus": "active",
"eldAdverseWeatherExemptionEnabled": false,
"eldBigDayExemptionEnabled": false,
"eldExempt": false,
"eldPcEnabled": false,
"eldYmEnabled": false,
"id": "51899168",
"name": "test streaming driver",
"timezone": "America/Los_Angeles",
"updatedAtTime": "2024-08-28T18:56:08.388Z",
"username": "teststreamingdriver"
},
"eventType": "driverCreated"
}
Driver Updated
{
"driver": {
"carrierSettings": {},
"createdAtTime": "2024-08-28T18:56:08.388Z",
"driverActivationStatus": "active",
"eldAdverseWeatherExemptionEnabled": false,
"eldBigDayExemptionEnabled": false,
"eldExempt": false,
"eldPcEnabled": false,
"eldYmEnabled": false,
"id": "51899168",
"name": "test streaming driver updated",
"timezone": "America/Los_Angeles",
"updatedAtTime": "2024-08-28T18:56:57.609Z",
"username": "teststreamingdriver"
},
"eventType": "driverUpdated"
}
Forms
Form Submitted
{
"eventType": "formSubmitted",
"form": {
"createdAtTime": "2024-08-28T18:54:20Z",
"fields": [
{
"id": "7dfc8ba4-47ca-48ff-8793-f4b41de8096b",
"label": "submit forms?",
"multipleChoiceValue": {
"value": "Yes"
},
"note": "Test",
"type": "multiple_choice"
}
],
"formTemplate": {
"id": "b3a18c2f-1a6b-402c-96c1-bdb764611c40",
"revisionId": "39140122-2f3a-49a5-b5cb-d5cb7e6a1423"
},
"id": "f1e68f82-76f5-4303-869c-45a37c8e6f4d",
"location": {
"latitude": 42.11847729042255,
"longitude": -87.93395625558578
},
"status": "",
"submittedAtTime": "2024-08-28T18:54:20Z",
"submittedBy": {
"id": "51732619",
"type": "driver"
},
"updatedAtTime": "2024-08-28T18:54:20Z"
}
}
Maintenance
DVIR Submitted
{
"dvir": {
"authorSignature": {
"signatoryUser": {
"id": "51732619",
"name": "test driver"
},
"signedAtTime": "2024-08-28T18:52:49.000Z",
"type": "driver"
},
"driver": {
"id": "51732619",
"name": "test driver"
},
"endTime": "2024-08-28T18:52:49.000Z",
"formattedLocation": "Vancouver – Blaine Highway, Surrey, BC, V3S 9N7",
"hasDefects": false,
"id": "624372548",
"needsCorrection": false,
"safetyStatus": "safe",
"startTime": "2024-08-28T18:52:42.086Z",
"type": "postTrip",
"vehicle": {
"externalIds": {
"samsara.serial": "G7E5GM59H7"
},
"gateway": {
"serial": "G7E5GM59H7"
},
"id": "281474991565165",
"licensePlate": "09999",
"name": "Test G7E5-GM5-9H7"
}
},
"eventType": "dvirSubmitted"
}
Engine Fault On
{
"eventType": "engineFaultOn",
"fault": {
"j1939": {
"fmi": {
"description": "Low—most severe",
"id": "1"
},
"occurrenceCount": 50,
"spn": {
"description": "Aux Valve 0 Retract Port Measured Flow",
"id": "1900"
},
"txId": "21"
}
},
"vehicle": {
"externalIds": {
"samsara.serial": "GYWYJ42G8E",
"samsara.vin": "3ALACWFC5NDNB5090"
},
"id": "281474991840886",
"name": "GYWY-J42-G8E"
}
}
Engine Fault Off
{
"eventType": "engineFaultOff",
"fault": {
"j1939": {
"lamps": {
"emissions": true
}
}
},
"vehicle": {
"externalIds": {
"samsara.serial": "GYWYJ42G8E",
"samsara.vin": "3ALACWFC5NDNB5090"
},
"id": "281474991840886",
"name": "GYWY-J42-G8E"
}
}
Location & Movement
Geofence Entry
{
"address": {
"formattedAddress": "I-5, Blaine, WA, USA",
"geofence": {
"circle": {
"latitude": 48.99867107485855,
"longitude": -122.75289223295576,
"radiusMeters": 322
}
},
"id": "170886751",
"name": "test Geofence"
},
"eventType": "geofenceEntry",
"vehicle": {
"assetType": "vehicle",
"externalIds": {
"samsara.serial": "G7E5GM59H7"
},
"id": "281474991565165",
"licensePlate": "09999",
"name": "Test G7E5-GM5-9H7"
}
}
Geofence Exit
{
"address": {
"formattedAddress": "I-5, Blaine, WA, USA",
"geofence": {
"circle": {
"latitude": 48.99867107485855,
"longitude": -122.75289223295576,
"radiusMeters": 322
}
},
"id": "170886751",
"name": "test Geofence"
},
"eventType": "geofenceExit",
"vehicle": {
"assetType": "vehicle",
"externalIds": {
"samsara.serial": "G7E5GM59H7"
},
"id": "281474991565165",
"licensePlate": "09999",
"name": "Test G7E5-GM5-9H7"
}
}
Routing
Route Stop Arrival
{
"driver": {
"id": "51732619",
"name": "test driver"
},
"eventType": "routeStopArrival",
"operation": "stop departed",
"route": {
"actualRouteEndTime": "2024-08-28T18:48:36.400Z",
"actualRouteStartTime": "2024-08-28T18:47:02.593Z",
"id": "6009862266",
"name": "test route",
"scheduledRouteEndTime": "2024-08-28T18:55:00.000Z",
"scheduledRouteStartTime": "2024-08-28T18:47:00.000Z",
"settings": {
"routeCompletionCondition": "arriveLastStop",
"routeStartingCondition": "departFirstStop"
},
"stops": [
{
"actualArrivalTime": "2024-08-28T18:47:02.593Z",
"actualDepartureTime": "2024-08-28T18:47:02.593Z",
"id": "6066522712",
"liveSharingUrl": "https://cloud.samsara.com/o/5005929/fleet/viewer/job/vG0yIZb6eySjP4MMoa2S",
"name": "Wheeling, IL, USA",
"notes": "",
"scheduledDepartureTime": "2024-08-28T18:47:00.000Z",
"singleUseLocation": {
"address": "Wheeling, IL, USA",
"latitude": 42.1391927,
"longitude": -87.9289591
},
"state": "departed"
},
{
"actualArrivalTime": "2024-08-28T18:48:36.400Z",
"actualDepartureTime": "2024-08-28T18:48:36.400Z",
"enRouteTime": "2024-08-28T18:47:02.593Z",
"id": "6066522713",
"liveSharingUrl": "https://cloud.samsara.com/o/5005929/fleet/viewer/job/ymbM5oebsE3Ng0hHDG66",
"name": "Buffalo Grove, IL, USA",
"notes": "test notes",
"scheduledArrivalTime": "2024-08-28T18:55:00.000Z",
"singleUseLocation": {
"address": "Buffalo Grove, IL, USA",
"latitude": 42.1662831,
"longitude": -87.9631308
},
"state": "departed"
}
]
},
"routeStopDetails": {
"actualArrivalTime": "2024-08-28T18:48:36.400Z",
"actualDepartureTime": "2024-08-28T18:48:36.400Z",
"enRouteTime": "2024-08-28T18:47:02.593Z",
"id": "6066522713",
"liveSharingUrl": "https://cloud.samsara.com/o/5005929/fleet/viewer/job/ymbM5oebsE3Ng0hHDG66",
"state": "departed"
},
"time": "2024-08-28T18:48:36.400Z",
"type": "route tracking"
}
Route Stop Departure
{
"driver": {
"id": "51732619",
"name": "test driver"
},
"eventType": "routeStopDeparture",
"operation": "stop departed",
"route": {
"actualRouteStartTime": "2024-08-28T18:47:02.593Z",
"id": "6009862266",
"name": "test route",
"scheduledRouteEndTime": "2024-08-28T18:55:00.000Z",
"scheduledRouteStartTime": "2024-08-28T18:47:00.000Z",
"settings": {
"routeCompletionCondition": "arriveLastStop",
"routeStartingCondition": "departFirstStop"
},
"stops": [
{
"actualArrivalTime": "2024-08-28T18:47:02.593Z",
"actualDepartureTime": "2024-08-28T18:47:02.593Z",
"id": "6066522712",
"liveSharingUrl": "https://cloud.samsara.com/o/5005929/fleet/viewer/job/vG0yIZb6eySjP4MMoa2S",
"name": "Wheeling, IL, USA",
"notes": "",
"scheduledDepartureTime": "2024-08-28T18:47:00.000Z",
"singleUseLocation": {
"address": "Wheeling, IL, USA",
"latitude": 42.1391927,
"longitude": -87.9289591
},
"state": "departed"
},
{
"enRouteTime": "2024-08-28T18:47:02.593Z",
"eta": "2024-08-30T01:56:09.786Z",
"id": "6066522713",
"liveSharingUrl": "https://cloud.samsara.com/o/5005929/fleet/viewer/job/ymbM5oebsE3Ng0hHDG66",
"name": "Buffalo Grove, IL, USA",
"notes": "test notes",
"scheduledArrivalTime": "2024-08-28T18:55:00.000Z",
"singleUseLocation": {
"address": "Buffalo Grove, IL, USA",
"latitude": 42.1662831,
"longitude": -87.9631308
},
"state": "en route"
}
]
},
"routeStopDetails": {
"actualArrivalTime": "2024-08-28T18:47:02.593Z",
"actualDepartureTime": "2024-08-28T18:47:02.593Z",
"id": "6066522712",
"liveSharingUrl": "https://cloud.samsara.com/o/5005929/fleet/viewer/job/vG0yIZb6eySjP4MMoa2S",
"state": "departed"
},
"time": "2024-08-28T18:47:02.593Z",
"type": "route tracking"
}
Safety
Severe Speeding Started
{
"data": {
"startTime": "2024-08-23T17:25:53.101Z",
"tripStartTime": "2024-08-23T17:25:53.101Z",
"vehicle": {
"id": "281474991565165"
}
},
"eventType": "severeSpeedingStarted"
}
Severe Speeding Ended
{
"data": {
"endTime": "2024-08-28T18:37:52.834Z",
"startTime": "2024-08-28T18:36:07.713Z",
"tripStartTime": "2024-08-28T18:35:52.027Z",
"vehicle": {
"id": "281474991565165"
}
},
"eventType": "severeSpeedingEnded"
}
Vehicle
Vehicle Created
Vehicle Updated
{
"eventType": "vehicleUpdated",
"vehicle": {
"createdAtTime": "",
"externalIds": {
"samsara.serial": "G7E5GM59H7"
},
"gateway": {
"model": "VG54NA",
"serial": "G7E5-GM5-9H7"
},
"harshAccelerationSettingType": "automatic",
"id": "281474991565165",
"licensePlate": "09999",
"model": "VG54NA",
"name": "Test G7E5-GM5-9H7",
"serial": "G7E5-GM5-9H7",
"staticAssignedDriver": {
"id": "51732619",
"name": "test driver"
},
"vehicleRegulationMode": "regulated"
}
}
Data Streaming Parameters
- Date Entities - Select among dozens of data entities detailed below. Each entity can be streamed to a designated Kafka topic in your connected cluster. For each stream subscription, a unique message is produced in the Kafka topic with the data payload for the specific entity. For more information about setting up Samsara's Kafka Producer see our Product Guide.
- Data Granularity - Data is streamed as it is updated on the Samsara cloud. Exact data granularity depends on the specific entity. For example, when a platform event occurs a message payload is emitted to the designated Kafka topic in real-time. For diagnostic data, please consult this reference for data update frequencies. Note that GPS data updates every 5 seconds when the vehicle is on, and every 5 minutes when the vehicle is off or idle.
Feedback requested
As you set up stream subscriptions for the available data entities, please share your feedback with your Samsara representatives. We want to hear where you encounter any friction in the setup process or with streaming, or any other feedback you may have.
Updated 2 days ago