0

I have setup IoT Edge up in one of our machines and installed OPC Publisher and connected it to one of our opc-ua servers which then sends data to OPC Publisher and then to IoT Hub. We have not received any data to our IoT hub for the last 10 days and suddenly today we have received the data. How can we troubleshoot why the data is missing for the last 10 days?

Maryo David
  • 539
  • 1
  • 7
  • 18

2 Answers2

2

One of the most powerful tools to monitor your edge deployments is the integration with Azure Monitor. It will collect metrics from the edgeHub and edgeAgent, which combined will give you an overview of where your messages are going. It can show you how many messages are sent to your upstream endpoint and when.

Overview of Azure Monitor integration with Azure IoT Edge Source of image

For a full overview of the capabilities, you can check out this blog post. Installation steps are here

Edit: OPC Publisher aLso supports diagnostic logging, which will give you more information about the connections to OPC servers. To do this, you need to set the diagnostic interval. You can do this by specifying the --di command argument in your createOptions:

"OPCPublisher":{
   "settings":{
      "image":"<image>",
      "createOptions":{
         "Cmd":["di=60"]
      }
   },
   "type":"docker",
   "version":"1.0",
   "status":"running",
   "restartPolicy":"always"
}

The example above will log diagnostic metrics every 60 seconds. You can then upload the logs using the support bundle command from Cristian's answer, or use the UploadSupportBundle direct method to do the same without needing access to the device.

Matthijs van der Veer
  • 3,865
  • 2
  • 12
  • 22
2

You can generate a support bundle on your edge device that will collect the logs of all deployed modules as well as the edge runtime logs.

sudo iotedge support-bundle --since 11d

More details on troubleshooting IoT Edge here

You can first look into the logs of the publisher and validate if the connection to the OPC UA Server was/is active. If this is fine then have a look into the edgeHub and validate if the upstream connectivity to IoT Hub was affected.