storj/cmd/statreceiver
JT Olio 362f447d9f
cmd/statreceiver: lua-scriptable stat receiver (#636)
* cmd/statreceiver: lua-scriptable stat receiver

Change-Id: I3ce0fe3f1ef4b1f4f27eed90bac0e91cfecf22d7

* some updates

Change-Id: I7c3485adcda1278fce01ae077b4761b3ddb9fb7a

* more comments

Change-Id: I0bb22993cd934c3d40fc1da80d07e49e686b80dd

* linter fixes

Change-Id: Ied014304ecb9aadcf00a6b66ad28f856a428d150

* catch errors

Change-Id: I6e1920f1fd941e66199b30bc427285c19769fc70

* review feedback

Change-Id: I9d4051851eab18970c5f5ddcf4ff265508e541d3

* errorgroup improvements

Change-Id: I4699dda3022f0485fbb50c9dafe692d3921734ff

* too tricky

the previous thing was better for memory with lots of errors at a time
but https://play.golang.org/p/RweTMRjoSCt is too much of a foot gun

Change-Id: I23f0b3d77dd4288fcc20b3756a7110359576bf44
2018-12-11 11:24:31 -07:00
..
common.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
copy.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
db.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
example.lua cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
file.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
filter.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
graphite.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
main.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
parser.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
print.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
README.md cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
sanitizer.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
schema.sql cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00
udp.go cmd/statreceiver: lua-scriptable stat receiver (#636) 2018-12-11 11:24:31 -07:00

statreceiver

This package implements a Lua-scriptable pipeline processor for zeebo/admission telemetry packets (like monkit or something).

There are a number of types of objects involved in making this work:

  • Sources - A source is a source of packets. Each packet is a byte slice that, when parsed, consists of application and instance identification information (such as the application name and perhaps the MAC address or some other id of the computer running the application), and a list of named floating point values. There are currently two types of sources, a UDP source and a file source. A UDP source appends the current time as the timestamp to all packets, whereas a file source should have a prior timestamp to attach to each packet.
  • Packet Destinations - A packet destination is something that can handle a packet with a timestamp. This is either a packet parser, a UDP packet destination for forwarding to another process, or a file destination that will serialize all packets and timestamps for later replay.
  • Metric Destinations - Once a packet has been parsed, the contained metrics can get sent to a metric destination, such as a time series database, a relational database, stdout, a metric filterer, etc.

Please see example.lua for a good example of using this pipeline.