InfluxDB Logger Support

That would certainly do it, and that is a driver issue.

No, I haven't seen anything like this on my instances. I have alarms that go off from the Grafana side if the data goes stale.

It sounds like cron dumped everything. This could come from a memory issue. I have had an instance of a sudden out of memory situation on one of my hubs, which affected pretty much all the events on the hub at the time.

When you save the app (like enabling logging), it recreates the entire state, subscriptions and timers, so that it resumed publishing definitely makes sense.

If you haven't already rebooted the hub in question, I would recommend doing so.

Yep. "n/a" from the driver. Lines 412-416.

InfluxDB does not allow mixing of types in a column. String, double or integer, you have to pick one and stick with it. If you want to log this data as a numeric value to InfluxDB, you will need to modify the driver to either use zero as the unknown value, or simply not post an event if the value is unknown. There are arguments in favor of either approach, but my personal preference is "don't post it if you don't know it."

thank you very much! Appreciate it! I will see if i can get it fixed with the driver.

I have a rule that restarts the hub at low memory and it did triger last night becuase though the hub recovered the memory hit never really did. Strangely though there wasn't a memory issue when this occured and it wasn't everything. Just a few device drivers and INfluxDB Logger. It was far from everything. It was more like jobs that ran in small interval couldn't schedule their next run so they got stuck and didn't complete there method they were running

I suspect that Hub just kind of lost it's brain about how to scedule jobs. All of the things that failed depend on the previous run to complete to schedule the next one in a way.

1 Like

How are you getting the memory value? If cron dumped, things like Hub Information are not going to update.

FWIW, what I saw on my memory event was that almost all events just stopped processing, including the Hub Information driver. The only indication I had of a memory issue was a system alert.

Well i should clarify there was no memory issue before it occurred, or more simply it wasn't low. I am not saying something could have just killed the hub memory momentarily. just that leading up to that point the memory looked fine and it had enought that i am suprised something would have caused a memory problem. Anything is possible and clearly something happened.

maybe unrelated question! How do you get hub memory and cpu utilization information?

You can get hub memory and CPU utilization information from the driver described and linked in this post:

2 Likes

My experience was the similar. No advance indication--stuff just stopped.

Interestingly, I just checked my dev C-7, and was rewarded with this:

Somewhat similar to the one event I saw previously on the production hub.

@dennypage,

Because I had two occasions with this recently I updated the InfluxDB Logger to include some notification functionality. I have created a pull request to add my edits into the main repo.

@dennypage not sure how you wanted issues report (or if you will see the github issue I posted)? Found an issue with the Power Source definition and posted it on github: Power Sources dropdown does not populate · Issue #62 · HubitatCommunity/InfluxDB-Logger · GitHub

Also might I suggest a little more info in the first post, like where to find it on GitHub and a mention about installing it from HPM?

1 Like

Any tips on migrating from influxdb1.x to influxdb2.x?

I just spun up a new VM with influx 2, is it a matter of just creating a database on it and changing the post url in the app to post to it instead?

Basically, yes, but the login method is different so you will want to make an API token in Influx as well.

Or, Influx has upgrade / migration docs which if done correctly you will keep your data and it will create legacy DBRP mappings so any existing integrations will work with the same credentials.

If you want to start from scratch on a new database this post has a bunch of instructions for setting up InfluxDB Logger: Using HE with with InfluxDB, Grafana, with InfluxDB Logger

1 Like

Thanks. I'm gonna check that post out in a few.

I just tried making my first database as I was used to in v1, and holy cow they changed everything. I wasn't using any authentication before with any of my stuff. :slight_smile:

Just FYI if you have any existing dashboards tied to Influx v1, you will need to create a DBRP mapping and point your existing datasource in Grafana to it so they keep working. The new v2.x Flux language is totally different for the queries in the dashboards.

Here is a little bit of info on it, Influxdb2 and HE integration - #9 by jtp10181 . At a minimum you only need the v1 DBRP and not the v1 Auth, since Grafana supports using a token to authenticate for InfluxQL by adding a manual authorization header. Here is the guide from Influx, giving you a link right to the key piece which is the token authentication: Use Grafana with InfluxDB OSS | InfluxDB OSS 2.7 Documentation

May be best if you have any questions to post over on the Guides post and we can chime in there.

Think there's really much reason to migrate? My main reason was, I'm spinning up a new VM and starting fresh because I'm having some issues with my existing setup. Plus it's running on an out dated version of ubuntu.

I figured now was the time to migrate, but the more looking I do the more I see folks talking about influx v2 nearing it's end of life with v3 coming out.

Thinking maybe I just hold off..

I am not sure what the upgrade to v3 is going to look like. I suspect they will keep building upon the Flux query language and the structure of the 2.x release, so hopefully it will be a fairly easy upgrade. I did a little searching but could not find much for details, just marketing type info.

Also with 2.x / Flux you can use my prebuilt dashboards that are being tested right now: Ready-to-Use Grafana Dashboards! - Beta Test / Feedback

Flux is going away in 3.x from what I've gathered. A lot of folks aren't happy.

I didn't realize I'd have to update my dashboards to go from 1 to 2. I might just stick with the old until I can't anymore. :frowning:

Nothing set in stone, but it sounds like they want to push to a more SQL like query language.

:person_facepalming: :person_facepalming: :person_facepalming: :person_facepalming: :person_facepalming:
Influx v1 (InfluxQL) already WAS very similar to SQL.... then they changed it to Flux.
Sounds like they regret that decision and are switching to native SQL now, what a :poop: :cloud_with_lightning_and_rain: this is going to be. Good thing is I already know SQL very well.

You don't have to, you can also setup a DBRP mapping in Influx and then set that up as a InfluxQL data source in Grafana, which allows you to use the v1 query language on the v2 database.

3 Likes