cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
881
Views
1
Helpful
1
Replies

Debugging visualization metadata and datapoints requests

huntc
Level 4
Level 4

Hi there,

I've configured my CAF hosted application to provide metrics for the purposes of Visualization. My app's summary shows a "Visualize" button which, when clicked, displays an empty screen as per:

Screen Shot 2018-03-24 at 12.27.43 am.png

If you zoom in on that image you can see two horizontal bars.

I believe my app is correctly sending data as, before I had configured certificates, the above screen informed me that no data had been received. Now it doesn't, it is just blank.

Could you tell me what this may signify and how I may be able to further diagnose what's going on?

Here is a sample of the metadata content I send:

{

  "datapoints": {

   "lora-server.downlink-packets-rx,lora-server.downlink-packets-tx": {

   "units": "Pkts",
   "max": "",
   "displayName": "Downlink Rx,Tx",
   "graphType": "bar",
   "min": ""
   },
   "lora-server.uplink-packets-rx,lora-server.uplink-packets-tx": {

   "units": "Pkts",
   "max": "",
   "displayName": "Uplink Rx,Tx",
   "graphType": "bar",
   "min": ""
   },
   "lora-server.messages-appended/lora-server.uplink-packets-rx": {

   "units": "Msgs",
   "max": "100",
   "displayName": "Valid",
   "graphType": "gauge",
   "min": "0"
   },
   "lora-server.messages-cannot-append/lora-server.uplink-packets-rx": {

   "units": "Msgs",
   "max": "100",
   "displayName": "Invalid",
   "graphType": "gauge",
   "min": "0"
   },
   "lora-server.incorrect-fcnt/lora-server.uplink-packets-rx": {

   "units": "Msgs",
   "max": "100",
   "displayName": "Bad FCnt",
   "graphType": "gauge",
   "min": "0"
   },
   "lora-server.incorrect-mic/lora-server.uplink-packets-rx": {

   "units": "Msgs",
   "max": "100",
   "displayName": "Bad MIC",
   "graphType": "gauge",
   "min": "0"
   }

  }

}

...and a sample of the data:

{

  "lora-server.messages-cannot-append/lora-server.uplink-packets-rx": [

    {

      "value": "0"

    }

  ],

  "lora-server.incorrect-fcnt/lora-server.uplink-packets-rx": [

    {

      "value": "0"

    }

  ],

  "lora-server.uplink-packets-rx,lora-server.uplink-packets-tx": [

    {

      "value": "2"

    },

    {

      "value": "2"

    }

  ],

  "lora-server.incorrect-mic/lora-server.uplink-packets-rx": [

    {

      "value": "0"

    }

  ],

  "lora-server.downlink-packets-rx,lora-server.downlink-packets-tx": [

    {

      "value": "0"

    },

    {

      "value": "0"

    }

  ],

  "lora-server.messages-appended/lora-server.uplink-packets-rx": [

    {

      "value": "100"

    }

  ]

}

Thanks for any help.

Kind regards,

Christopher

1 Reply 1

huntc
Level 4
Level 4

It turns out that CAF doesn't like certain characters appearing in the datapoint identifier e.g. "." or "/".

It also doesn't like numeric strings i.e. they must start with an alpha character e.g. "0", "1"... is no good. To cirmcumvent this, I used a character prefix i.e. "d0", "d1"...

I managed to debug in the end by logging into the GOS via ssh and reproducing my app's requests.

Perhaps the doc at https://developer.cisco.com/docs/iox/#app-visualization-dashboard/visualization-overview could be updated?