davidkirwan / ardtweeno

Ardtweeno is an application gateway which bridges devices connected via Serial Link and an Internet Protocol network. The system is designed as a PaaS (platform as a service) for the Raspberry Pi ARM platform.
GNU General Public License v3.0
5 stars 0 forks source link

Flesh out functionality of /api/v1/system/status #8

Closed davidkirwan closed 11 years ago

davidkirwan commented 11 years ago

Flesh out functionality of /api/v1/system/status to potentially also include load information from the host the system is running on.

davidkirwan commented 11 years ago

I've added load averages and memory usage values to the /api/v1/system/status then created a basic highcarts graph to display the values. As the image shows I've added a tab system on the front end and added this graph to the status tab. This tab system will fix #11 when its merged into dev. While the changes to the code base I've made to construct this load graph will fix #8 when merged into dev.

ardtweeno-status-loadavg

davidkirwan commented 11 years ago

The graph data is currently stored clientside, so tab switching resets the graph. I don't want this data being serialised alongside the mesh network data, nor do I want something similar to a rrdtool db constantly being written to the Raspberry Pi's flash storage, so I decided to just go with the client side javascript option. I may implement something like a circular array in Ruby and store the last hours worth of data in system RAM at a later date.

davidkirwan commented 11 years ago

/api/v1/system/status no longer requires authentication with an APIKEY. It now returns a JSON string similar to the following format which can be used for graphing or statistical purposes:

{"running":true,"cpuload":"0.0","memload":"0.0"}
davidkirwan commented 11 years ago

Fixed on dev branch