User Tools

Site Tools


hacks:stats

Recording Stats at VHS

VHS has an InfluxDB/Grafana instance to record and graph datapoints in the cloud.

InfluxDB

InfluxDB is a time-series database. What that means, is that it stores data with respect to time.

Consider a MySQL database. Except instead of sending a new value and overwriting the previous data, InfluxDB keeps track of both, along with the time they were sent (unless you specify a different time).

You can also specify “retention policies” that phase out old datapoints, basic arithmetic and soon, some native analytics.

Some use-cases are current temperature, price of Bitcoin, or common “open” times for isvhsopen.com

A Dataset Example

{

  "results": [
      {
          "series": [
              {
                  "name": "cpu_load_short",
                  "columns": [
                      "time",
                      "value"
                  ],
                  "values": [
                      [
                          "2015-01-29T21:55:43.702900257Z",
                          0.55
                      ],
                      [
                          "2015-01-29T21:55:43.702900257Z",
                          23422
                      ],
                      [
                          "2015-06-11T20:46:02Z",
                          0.64
                      ]
                  ]
              }
          ]
      }
  ]

}

A sample exploration

Login to the InfluxDB interface (linked below)

Select the “api” database in top right

SHOW SERIES

SHOW MEASUREMENTS

SHOW TAG KEYS FROM “api”

SHOW TAG VALUES FROM “api” WITH KEY = “name”

Grafana

Grafana takes those datapoints and makes pretty graphs out of them.

hacks/stats.txt · Last modified: 2016/09/20 05:28 by tyisi

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki