Fixing a hole (where the rain gets in)


A few days ago I uploaded a month of my home IoTaWatt data to influxBD as a base to work with grafana. That went smoothly as an overnight activity (while still logging locally and uploading to Emoncms). Then I started doing some development, loading interim versions of firmware to my home system.

Somewhere along the way, I ended up with a two hour hole in the influx data starting about 30 hours ago. What to do. IoTaWatt queries the database when it starts to find the last time posted and resumes there. This is a hole.

The solution was simple. I stopped the influx upload service and did a delete of the last 32 hours of data using the influxDB command line interface over ssh:

delete where iota='home' and time > now()-32h

Then started the influx service back up. IoTaWatt recognized that the last entry was now 32 hours ago and it took about ten minutes to upload the history from it’s datalog. (9 measurements every ten seconds = 103,680 measurements / 600sec = 173 measurements/second.)

Don’t know how I’d have addressed the problem with the other web service. This wasn’t the only solution. Influx will accept an upload of just the missing data, so I’m thinking an ad-hoc service to upload a subset of the data, bounded by time and/or measurement will be handy.

Look ma, no holes!