Skip to content
Nilesh Simaria edited this page Jun 6, 2018 · 1 revision

JTIMON JSON support

JTIMON supports converting telemetry packet to JSON.

$ ./jtimon-darwin-amd64 --json --config cfg.json

$ cat cfg.json
{
    "host": "jtisim-host",
    "port": 32767,
    "paths": [{
        "path": "/interfaces",
        "freq": 4000
    }],
    "log" : {
        "file" : "jtimon.log"
    }
}

Take a look at the log file to see telemetry data in JSON.

2018/05/24 00:39:46 Connecting to jtisim-host:32767
2018/05/24 00:39:47 gRPC headers from host jtisim-host:32767
2018/05/24 00:39:47   content-type: [application/grpc]
2018/05/24 00:39:47   grpc-accept-encoding: [identity,deflate,gzip]
2018/05/24 00:39:47   init-response: [response { subscription_id: 1 } path_list { path: "/interfaces/" sample_frequency: 4000 } ]
2018/05/24 00:39:47 Receiving telemetry data from 10.102.178.208:32767
2018/05/24 00:39:49 {
  "system_id": "r0edge",
  "component_id": 65535,
  "path": "sensor_1000_3_1:/interfaces/:/interfaces/:mib2d",
  "timestamp": 1527147589744,
  "kv": [
    {
      "key": "__timestamp__",
      "Value": {
        "UintValue": 1527147589746
      }
    },
    {
      "key": "__prefix__",
      "Value": {
        "StrValue": "/interfaces/interface[name='lo0']/"
      }
    },
    {
      "key": "state/type",
      "Value": {
        "StrValue": "other"
      }
    },
    {
      "key": "state/mtu",
      "Value": {
        "UintValue": 4294967295
      }
    },
    {
      "key": "state/admin-status",
      "Value": {
        "StrValue": "UP"
      }
    },
    {
      "key": "state/oper-status",
      "Value": {
        "StrValue": "UP"
      }
    },
    ... ... ...
    ... ... ...

Clone this wiki locally