Hi,
i have some Sensors that are reporting the last transmitting time. My System works like Sensor → InfluxDB → Grafana
is it possible to add the last timestamp of a receive to the value list in that graph ?
Hi,
i have some Sensors that are reporting the last transmitting time. My System works like Sensor → InfluxDB → Grafana
is it possible to add the last timestamp of a receive to the value list in that graph ?
you can try this way to resove your issue
Step : 1 Verify your sensor data in InfluxDB
Confirm your sensor data is correctly stored.
Typical schema:
Measurement: sensor_data
Tags: sensor_name
Fields: value
Timestamp: automatic time of data point
Step : 2 Run a test query in InfluxDB
from(bucket: "your_bucket")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "sensor_data" and r.sensor_name == "your_sensor_name")
|> last()
this returns the latest value, timestamp, and sensor name.
Step : 3 Write the correct query in Grafana to get last sensor value
from(bucket: "your_bucket")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "sensor_data" and r.sensor_name == "your_sensor_name")
|> last()
Step : 4 Create and configure your Grafana panel
Add a Stat panel in your dashboard.
Set the data source to your InfluxDB.
Paste the query from Step 3.
Configure the panel to display:
The last sensor value, sensor name and timestamp
FInal output look like