telegraf/plugins/serializers/msgpack
Joshua Powers 02473069f4
chore: Add metric and batch benchmark to serializers (#14277)
2023-11-13 09:30:19 +01:00
..
README.md chore: clean up all markdown lint errors in serializer plugins (#10158) 2021-11-24 11:47:23 -07:00
metric.go fix: Linter fixes for plugins/serializers/[a-z]* (#10181) 2021-11-30 14:50:00 -06:00
metric_gen.go Add MessagePack output data format (#8828) 2021-03-02 14:48:58 -05:00
metric_gen_test.go Add MessagePack output data format (#8828) 2021-03-02 14:48:58 -05:00
metric_test.go chore(linters): Fix findings found by testifylint: expected-actual (#14229) 2023-11-01 14:09:55 -06:00
msgpack.go chore(serializers.msgpack): Migrate to new-style framework (#13336) 2023-05-25 13:20:50 -06:00
msgpack_test.go chore: Add metric and batch benchmark to serializers (#14277) 2023-11-13 09:30:19 +01:00

README.md

MessagePack

MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON.

Format Definitions

Output of this format is MessagePack binary representation of metrics that have identical structure of the below JSON.

{
   "name":"cpu",
   "time": <TIMESTAMP>, // https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type
   "tags":{
      "tag_1":"host01",
      ...
   },
   "fields":{
      "field_1":30,
      "field_2":true,
      "field_3":"field_value"
      "field_4":30.1
      ...
   }
}

MessagePack has it's own timestamp representation. You can find additional informations from MessagePack specification.

MessagePack Configuration

There are no additional configuration options for MessagePack format.

[[outputs.file]]
  ## Files to write to, "stdout" is a specially handled file.
  files = ["stdout", "/tmp/metrics.out"]

  ## Data format to output.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
  ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
  data_format = "msgpack"