All documentation

Destinations

InfluxDB

Write line protocol directly to InfluxDB.

Format
InfluxDB line protocol
Versions
1.8, 2.x and 3.x
Default measurement
health

Hozz writes line protocol directly to InfluxDB's write endpoint.

Setting it up#

  1. Put the whole write URL in the address field#

    Include the query string: /api/v2/write with org, bucket and precision, or /write?db=… for 1.8.

  2. Put the authorization value in the secret field#

    For 2.x and 3.x, enter Token YOUR_API_TOKEN.

  3. Set the measurement and precision under Details#

    The measurement defaults to health. Match the URL's precision.

  4. Send a test#

    The probe writes one hozz_connection_test point without Health data.

InfluxDB 2.x and 3.x#

Address and secret
POST http://influxdb.local:8086/api/v2/write?org=YOURORG&bucket=health&precision=ns
Authorization: Token YOUR_API_TOKEN
Content-Type: text/plain; charset=utf-8

InfluxDB 1.8#

Address
POST http://influxdb.local:8086/write?db=health&precision=ns

What gets written#

Line protocol
health,type=heart_rate,source=Apple\ Watch,device=Apple\ Watch,unit=count/min value=62.5 1787433046500000000
health,type=sleep_analysis,source=Apple\ Watch value=3.0,duration=1800.0 1787436000000000000
health_workouts,type=workout,activity=Running,source=Apple\ Watch duration=1800.0,id="7b21c0de-0000-4000-8000-000000000001" 1787382000000000000
health_deletions,type=step_count,id=9c40c0de-0000-4000-8000-000000000002 deleted=true

Measurements#

Measurements and what each holds
MeasurementHolds
healthEvery sample with a numeric value.
health_workoutsWorkouts.
health_eventsRecords with no numeric value at all, such as a correlation.
health_deletionsTombstones.

health is the configurable part; the four suffixes follow whatever you set it to.

Tags#

Tags written on each point
TagValue
typeThe metric name, e.g. heart_rate. workout for a workout.
sourceThe app or device that recorded it. Omitted when unknown.
deviceThe hardware name. Omitted when unknown.
unitHealthKit’s unit string. Omitted for types without one.
activityWorkouts only — Running, Cycling, and so on.

Tags stay low-cardinality. Record identifiers are not tags, except on deletions.

Fields#

Fields written on each point
FieldTypeWhere
valueFloatSamples.
durationFloatSeconds. Present when the record covers an interval.
idStringWorkouts and events, for tracing a point back to a record.
deletedBooleanTombstones.

Limits#

Deletions are recorded, not applied. Reconcile tombstones from <measurement>_deletions. Their ids are tags because tombstones have no source timestamp and would otherwise overwrite one another.

Non-finite values go to <measurement>_events.