Marrow
EN
App StoreGoogle Play

Connects / Exports / Data and dashboards

Apple Health to Grafana: Grafana Cloud or your own InfluxDB

Automated

To chart Apple Health data in Grafana, an iPhone app has to push it into a data source Grafana reads, because Apple Health has no API. Marrow does this for free in two ways: straight to Grafana Cloud's hosted metrics, or straight to your own InfluxDB for a self-hosted Grafana, on a schedule with nothing to run in between.

Open in Marrow works on an iPhone with Marrow 1.7.1 or later.

Automated: Dashboards from InfluxDB Automated: Grafana Cloud

Automated (Dashboards from InfluxDB) Free

Marrow writes to it directly on a schedule, with the app closed. Nothing to run in between. You need: An InfluxDB API token with write on one bucket.

  1. In Marrow, open Connects, then Exports, and tap Grafana dashboards. Turn Automated on.
  2. In InfluxDB: Load Data, API Tokens, Generate, write to one bucket.
  3. In Marrow: tap Connect. Its page asks for:
    • Address: Where InfluxDB answers, with its port. It looks like https://influx.example.com:8086.
    • Organization: Your org's name. InfluxDB 1.8 and 3 do not need one.
    • Bucket: The bucket the token can write to, for example health.
    • API token: The token you just made.
    Tap Test connection, then Done. Marrow writes every hour unless you change it under Advanced, where you also pick the kinds of data and how far back the first run reaches (90 days unless you change it). Then point a Grafana dashboard at the InfluxDB bucket.

Automated (Grafana Cloud) Free

Marrow writes to it directly on a schedule, with the app closed. Nothing to run in between. You need: Grafana Cloud, the free tier works.

  1. In Marrow, open Connects, then Exports, and tap Grafana dashboards. Turn Automated on.
  2. In Grafana Cloud: Connections, Add new connection, Hosted Prometheus metrics, pick Influx line protocol, copy the URL, user and make a token.
  3. In Marrow: tap Connect. Its page asks for:
    • Address: The URL Grafana Cloud shows for Influx line protocol. It looks like https://influx-prod-13-prod-us-east-0.grafana.net.
    • User: The number Grafana Cloud shows as the user.
    • Token: The token you just made.
    Tap Test connection, then Done. Marrow writes every hour unless you change it under Advanced, where you also pick the kinds of data and how far back the first run reaches (90 days unless you change it). Then build a dashboard on the stack's Prometheus data source. No InfluxDB is needed.

What arrives, and how to chart it

Grafana Cloud

Marrow sends Influx line protocol to your stack's hosted metrics, and Grafana Cloud stores each field as a Prometheus series named after the measurement and the field, with the tags as labels. Query them from the stack's own Prometheus data source. Sample series:

daily_qty{metric="step_count", units="count"}  8746
daily_Avg{metric="heart_rate", units="bpm"}  71
daily_totalSleep{metric="sleep_analysis", units="h"}  7.4
workout_duration_min{activity="Running"}  31
set_weight{exercise="Bench Press", set_type="work"}  185
meal_kcal{meal="lunch"}  640

Two things differ from InfluxDB. Grafana Cloud keeps numbers only, so text such as a food's name does not arrive. And it refuses a changed value at a time it already holds, so Marrow sends each day's totals once, when the day is complete, about six hours after midnight. Yesterday's totals show up in the morning. Raw samples, workouts, sets and meals arrive as they happen.

A panel of steps per day is the query daily_qty{metric="step_count"} with the panel's minimum interval set to one day.

Self-hosted Grafana

With your own Grafana, Marrow writes to InfluxDB and Grafana reads the bucket through an InfluxDB data source. The measurements, tags and fields are listed on Apple Health to InfluxDB. Steps per day in an InfluxQL panel:

SELECT last("qty") FROM "daily" WHERE "metric" = 'step_count' AND $timeFilter GROUP BY time(1d)

On both routes the first run sends 90 days unless you pick 30 days, 365 days or All under Advanced, History.

Built with Grafana dashboards

Made something? Add it to Built with Marrow.

If it does not work

In Grafana dashboards

Automated checks

More fixes in the guides: Automated.

Questions

Do I need InfluxDB to use Grafana Cloud?

No. Grafana Cloud takes Marrow's writes itself through its Influx line protocol endpoint and stores them as Prometheus metrics. The free tier works.

Does it work with a Grafana I host myself?

Yes. Marrow writes to your InfluxDB (1.8, 2, 3 or Cloud) and your Grafana reads that bucket. Pick Dashboards from InfluxDB on this page.

Is there a ready-made dashboard?

Not yet from us. Built with Marrow has dashboards people have shared, with the code to copy.

Can Grafana's assistant read my data too?

Yes, that is a different connection: Grafana Assistant reads Marrow over MCP and answers questions about it.

Other ways to do it, and when to pick them

We make Marrow, so here are the alternatives as fairly as we can put them.

Related: Apple Health to InfluxDB · Apple Health to Home Assistant · Built with Marrow: shared dashboards

More help

More Data and dashboards