vpnkit icon indicating copy to clipboard operation
vpnkit copied to clipboard

Export stats to a time-series database

Open djs55 opened this issue 9 years ago • 3 comments

Since we're on the network data path we can measure the traffic as it passes through. We could measure

  • packets per second
  • bytes per second
  • DNS requests latency
  • DNS request failure rate
  • Number of active UDP NAT rules etc

This data could be sent to an external time-series database such as influxdb and then visualised.

This involves

  • writing a client for a time-series database (this may be as easy as connect()ing to it and writing .json messages)
  • adding some basic counters to the network stack
  • (stretch goal): allow the user to define their own filters via datakit and record these too

djs55 avatar May 18 '16 12:05 djs55

From Prometheus it's really quite simple, you'd only need to expose and HTTP /metrics endpoint, see docs about format.

errordeveloper avatar Feb 16 '17 15:02 errordeveloper

@djs55 have you seen https://github.com/mirage/prometheus ?

samoht avatar Feb 16 '17 15:02 samoht

Note: It's already being used in DatakitCI courtesy of https://github.com/mirage/prometheus

dave-tucker avatar Feb 20 '17 16:02 dave-tucker