collectd Output JSON Examples

This appendix provides examples collectd JSON output.

VTC has the following information to emit to the Centralized Collect-D :
  1. Master or Slave

  2. IP or Hostname of the VTC

  3. Stats Category—say number of tenants

  4. Stats Sub-Category—say the vtep name if we have tenants per vtep

  5. Count—count of tenants

Collect-D offers minimum attributes to set. They are:
  1. Host

  2. Plugin

  3. Plugin-Instance

  4. Type

  5. Type-Instance

Of this the default values of Type can be only guage and counter. To have custom types, the collect-d types.db needs to be updated with the custom types.

JSON Format

{
             "values": [1],
             "dstypes": ["counter"],
                "dsnames": ["value"],
             "time": 1515406938.687,
             "interval": 10.000,
             "host": "vtc-master-192.168.133.126”,
             "plugin": “tenants”,
             "plugin_instance": “”,
             "type": “vtep”,
             "type_instance": “vtep1”
        }     

Default Plugins—JSON Examples

CPU

{
    "values": [1270783],
    "dstypes": ["derive" ],
    "dsnames": ["value"],
    "time": 1515406948.326,
    "interval": 10.000,
    "host": "vtc126",
    "plugin": "cpu",
    "plugin_instance": "0",
    "type": "cpu",
    "type_instance": "user"
  }
Memory
{
    "values": [335605760],
    "dstypes": ["gauge"],
    "dsnames": ["value"],
    "time": 1515406938.400,
    "interval": 10.000,
    "host": "vtc126",
    "plugin": "memory",
    "plugin_instance": "",
    "type": "memory",
    "type_instance": "slab_recl"
  }

Custom Plugin—JSON Examples

Total Number of Tenants

{
    "values": [ 3],
    "dstypes": ["counter"],
    "dsnames": ["value"],
    "time": 1515406938.687,
    "interval": 10.000,
    "host": "vtc126",
    "plugin": "vtc",
    "plugin_instance": "",
    "type": "tenants",
    "type_instance": "vtc"
  }
Total Number of Tenant per VTEP
{
    "values": [1],
    "dstypes": ["counter"],
    "dsnames": ["value"],
    "time": 1515406938.687,
    "interval": 10.000,
    "host": "vtc126",
    "plugin": "vtc",
    "plugin_instance": "",
    "type": "tenants",
    "type_instance": "vtep1"
  }