Troubleshooting
Troubleshoot missing data in a Node-RED InfluxDB Grafana stack
Short answer
Work the chain in order: acquisition into Node-RED, the InfluxDB service and its storage mount, the write settings, then the Grafana query. In a 2.x stack most empty panels trace to a wrong token, bucket, URL or a controller clock that stamps points outside the panel's time range.
On this page
- Match the symptom to the boundary
- Boundary 1: the acquisition link into Node-RED
- Boundary 2: the database service and its storage mount
- Boundary 3: write settings must match the database generation
- Boundary 4: the Grafana data source and the time range
- Worked example: a 4 h 10 min clock error blanks a live panel
- The fix for each finding
- Questions asked
An empty Grafana panel in a Node-RED, InfluxDB and Grafana historian almost always means something failed upstream of the dashboard. Work four boundaries in order and stop at the first one that fails: the acquisition link into Node-RED, the InfluxDB service and its storage mount, the write settings, and the Grafana data source and time range. In a 2.x database, two findings cover most blank panels: a write node whose token, bucket or URL does not match the database, and a controller clock that stamps points outside the panel's time window. The 1.8-and-InfluxQL variant follows the same walk with different setting names.
Match the symptom to the boundary #
One reading at each boundary tells you where to stop. Everything downstream of a failed boundary is untestable until it is fixed, so leave Grafana alone while the write path is in doubt.
| What you see | Boundary that failed | Next check |
|---|---|---|
| No values at the acquisition node | Physical link, device state or acquisition configuration | Device diagnostics, then the source node status |
| Values arrive, nothing reaches the write node | Flow routing or transformation | Debug node on the write node input |
| Write node has input, the database holds no points | Service, storage mount, credentials or payload | Write node status output, then the database's own explorer |
| The explorer shows points, the panel is blank | Grafana data source, query or time range | Same query over the same interval in the panel |
Three rules keep the walk honest:
- The database's own data explorer is the reference instrument, because it removes Grafana from the question. Points there mean the write path works, full stop.
- Inject known test values at the write node to separate the pipeline from the machine connection. Test values prove the pipeline; they say nothing about device addressing or scaling.
- As a count check, injecting three fields at 1 Hz for five minutes should return 3 × 300 = 900 values in the explorer. Zero means the write failed; 900 against a blank panel means the fault sits at the dashboard boundary.
Boundary 1: the acquisition link into Node-RED #
Take the first reading at the machine, before changing any database setting. On a fieldbus source, confirm the device is exchanging process data and that its values appear in the flow's source node. On an OPC UA source, confirm the session is up and the selected variables return usable values; a connection that works in a desktop client while the flow stays blank is its own failure mode, covered in troubleshooting Node-RED OPC UA when a desktop client connects. An MQTT source that shows no messages is diagnosed at the broker and subscription first, as in fixing MQTT sensor data missing in Node-RED.
Then put a debug node on the input of the write node. A working acquisition connection does not guarantee a usable payload: the flow still has to bind values to a measurement and named fields, and the values must stay numbers through every conversion and join. A value that arrives as text where a number is expected creates a field-type conflict, and that point is rejected on write.
Boundary 2: the database service and its storage mount #
Separate browser access from API access before you conclude anything. A 404 page from the web interface means the frontend is not being served: check that the app or container is installed and running, that its version matches the platform release, and launch it from the current entry point rather than an old bookmark. It says nothing about tokens and nothing about whether data exists. Node-RED and Grafana talk to a database URL, which can work while the web route is broken, and the reverse also happens.
Database workloads belong on mounted storage, not the OS volume. Work the storage in this order:
- Identify the device in the storage listing. An external microSD partition commonly appears as mmcblk1p1 and a removable USB device as sda1; those are typical Linux names, not identifiers, so read the actual listing, because names shift with slot and boot order.
- Back up anything on the device, format it as Ext4 through the supported storage workflow, mount it, and confirm the mount returns on its own after a reboot.
- Point the database at it the way the installed version documents. Current app generations pick up the mounted device on their own; older ones require exporting the app configuration, editing the database's storage paths to the mount, and re-importing. Check the app's storage status first and skip manual path edits whenever it already reports the external device in use.
If the format itself fails, read the media recognition and storage diagnostics before touching database configuration. A configuration restore is not a data restore: the mounted volume sits outside the app backup, so back it up as a volume and prove the recovery path with a test restore. For sustained write rates, the storage device is its own selection question, starting with choosing edge storage for high-rate vibration data. How large the stack should be from the start is a different question, answered in sizing a self-hosted Node-RED InfluxDB Grafana historian.
Boundary 3: write settings must match the database generation #
| Setting | InfluxDB 2.x | InfluxDB 1.8 with InfluxQL |
|---|---|---|
| Destination | Bucket | Database and retention policy |
| Access | API token, organization, bucket | Authentication off in the reference setup |
| First-time setup | Initial user and first bucket on the setup screen | Flow creates the database and retention policy over REST |
| Grafana query language | Flux | InfluxQL |
In 2.x, the URL, token, organization and bucket in the write node must match the database exactly, and failures here are quiet. The node package documents the error behavior: the read node always throws a 503 regardless of cause, while the write nodes pass the API's status codes through. So wire the write node's status and error output and read what it says. Unauthorized points at the token, not-found points at the bucket name or URL, and a rejected payload points at the measurement and field structure. Never diagnose from a read node's 503.
Create the token on the database's token page once the initial user and bucket exist, and paste it in full into both the Node-RED server configuration and the Grafana data source. A token truncated at copy time produces an unauthorized that looks like a deeper problem than it is.
Check the controller clock before any ingestion test. Points carry the writer's timestamp, InfluxDB accepts past-stamped and future-stamped points without complaint, and both land outside a panel whose window is anchored to now.
Boundary 4: the Grafana data source and the time range #
Match the query language to the generation. In a 1.x database, data lives in databases and retention policies; in 2.x, it lives in buckets. InfluxQL speaks the first model and Flux the second, so a Flux panel against an InfluxQL data source, or the reverse, returns nothing while the explorer shows points. This is the first thing to check on the Grafana side of the stack.
Build the query in the database's explorer first, then paste it into the panel. If the explorer returns points over an interval and the panel over the same interval stays blank, the fault is in the data source settings, not in the data.
Then the time range: default windows count back from now, so a clock error at boundary 3 shows up here as an empty panel. Change the dashboard's default administrative login at first use, and keep its port off any network wider than it needs.
Worked example: a 4 h 10 min clock error blanks a live panel #
Writes succeed, the explorer shows points, the panel is blank. The edge PC's clock runs 4 h 10 min behind the time source, and the panel is set to last 3 hours, so its window runs from now − 3:00 to now. The newest point was written at real time now but stamped now − 4:10, which is 4:10 − 3:00 = 1 h 10 min before the window opens. Every point falls outside, so the panel renders nothing while the write node reports no error, because the database accepted every point.
Confirm in one step: set the panel to an absolute range starting 6 hours back. The data appears, with its newest point sitting 4 h 10 min behind real time. Fix the clock against the time source, let one new write land, and return the panel to its rolling window. A clock set ahead behaves the same way: points stamped past the window's end are invisible, the confirmation step is identical, and so is the fix.
The fix for each finding #
- Nothing at the acquisition node: repair the link or the device configuration. Nothing downstream was ever at fault.
- Values reach the write node, the explorer returns zero: the service or the mount. Start the service, confirm the mount, then re-test.
- Write status reports unauthorized: re-copy the full token into the node and the Grafana data source. Not-found: bucket name or URL. Payload rejected: measurement and field structure, including values that arrived as text.
- Explorer shows points, panel blank: data source settings in this order — query language, token, URL — then the panel's time range.
- Points land outside the window: synchronize the clock, confirm with a widened absolute range, then restore the rolling window.
- InfluxDB 1.8 running with authentication off: restrict it to the local network with the controller's firewall before it carries production data. That compensating control is not optional.
Questions asked
Grafana shows no data but the InfluxDB explorer does. Is the data lost?
No. The points are stored; the panel is not reading them. Check the data source's query language first, then its token and URL, then the panel's time range. Copy the working query from the explorer into the panel over the same interval to confirm, and remember that points stamped in the future are as invisible as old ones.
The InfluxDB read node throws a 503 even though writes work. Is the server down?
Not necessarily, and that number is not evidence. The node package documents that the read node always throws a 503, while the write nodes pass the API's real status codes through. Treat a 503 as a failed read, and check the service and URL through the web interface or a direct query before changing credentials.
Does the controller's configuration backup include the data on the mounted storage card?
Do not count on it. Restores have been reported to come back without the mounted volume's data, because the app backup covers configuration, not external storage. Back the volume up as a volume, and prove the recovery path with a test restore to a spare card.
Do I need internet access on the edge PC for this stack?
Only for online palette installs and updates. The path from device to flow to database to dashboard is entirely local. The one thing you lose without internet is a public time source, so point the clock at a local NTP server instead, because timestamps ride the writer's clock.
The controller refuses to format the storage card as Ext4. What next?
One reported workaround is to format the card as exFAT on another computer first, then run the controller's storage workflow, which then completes the Ext4 format. If it still fails, read the media recognition and storage diagnostics before changing any database setting. The database filesystem ends up Ext4 either way.