Statsly
Statsly is a stats collector leveraging redisDB and influxDB
Installation
Run npm install statsly
Usage
First of all you should register
your category (statsly.register('cat')
). after that you can start incrementing stats for your category:
statsly.increment('cat', 'successRequest', 1)
Now in-order to periodically insert data influx you should start stats collector:
const frequency = 5 * 60 * 1000 // 5 min
statsly.startCollector(frequency)
Collector only insert stats for registered categories
Example
Check out examples/
folder for more example and usages.