Can The Device / App Stats Be Exported In Any Way?

I put this in the developers category as I'm expecting it will likely be some kind of Community app / driver and/or HTTP endpoint that is the solution, but am open to any options....

I am curious to know if the device and app stats from the logs page can be exported in any way, whether to a file or more useful for me would be to InfluxDB. I think it would be useful to understand things that increase there usage, either dramatically in a short space of time, or slowly compared to stats from some time ago. Basically wanting to see a change in device or app behaviour / performance when trying to diagnose any change in overall hub performance.

1 Like

Maker API can spit out event details as they happen, if you have a suitable utility prepared to receive the JSON output and parse it for you. See the Maker API Docs.

1 Like

I use Maker API for that exact purpose, very useful. I have various temperature, humidity, power and hub info device events sent to influxdb and presented on Grafana dashboards.

Are you aware of where the data can get retrieved to then parse? For the device and app stats.

Have you looked at http://<hubIP>/logs/json

4 Likes

I will soon :slightly_smiling_face:

Admittedly the solution will likely be a combination of @Read_Only 's suggestion re a driver (maybe not Maker API in the end ) and @thebearmay 's suggestion of the JSON output of the logs page, but the the logs JSON output was the piece I was missing. Thanks guys.

2 Likes

This looks like what you are after:

From what I have read, that looks to be the logs, like errors, warnings, debug logs, etc. I am actually after the statistics. Still useful to know and have that available as an additional feed into InfluxDB / Grafana.

You are right in that the driver listed by Bill.D is all about getting the Live Logging events into InfluxDB so you can review them later. It doesn't even touch the App Device stats pages at all

What information would you like to get from those pages though. The problem as i see it is that those pages are not really instantaneous performance stats, but a stat that is a running total over time. In many cases when those stats would be visualized they would just be one long line, or maybe curve in some cases. The longer the time is between being reset, the less movement you would have with them. I like the idea of getting stats for this kind of thing, but not sure if that is the data i would want to export.

You're right, I hadn't considered that aspect of the data, percentages and averages will move less the longer the period of data behind the calculation, higher run-times in more recent times won't have as big an impact. Technically that is also true when looking at the page live, it's just it adds an additional complexity when trying to compare periods over time.

I suspect it would be hard to get the data behind the calculations en-masse, though I'd be happy to be proven wrong. The best alternative I could think of, and not sure if this would be possible, would be to reset the metrics on a consistent time-period, say daily or weekly, then compare the final result at the end of each time period. There would still be plenty of caveats and edge cases to deal with like hub restarts and users manually resetting the metrics (resulting in s shorter time-period compared to other days). Most of which I expect could be dealt with, but then you start to increase the work for what is likely a small gain.

I'd still be interested to build something simple to parse the JSON and send it through to Influx, leaving it as just that. The additional smarts that may be required for the kind of setup I described above could be left to the user to decide on and implement.

Or maybe an alternative would be to provide options for more fine-grained monitoring of thresholds and alerting....?

I'll have to think about it some more....

1 Like

Speaking of the Maker app, has anyone else noticed that identical text for POST URL appears under both Local and Cloud? Wonder if that's a typo (copy/paste), or intentional (i.e. no cloud-based analog). @gopher.ny any insights?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.