2

I'm trying to determine if the Built-In Metrics for Azure IoT Edge (described here) can be accessed when running locally with the edgeHubDev simulator for v1.0.9. I've created a deployment.template.json with a edgeHub configuration like so

"edgeHub": {
            "type": "docker",
            "status": "running",
            "restartPolicy": "always",
            "settings": {
              "image": "mcr.microsoft.com/azureiotedge-hub:1.0.9",
              "createOptions": {
                "User": "ContainerAdministrator",
                "ExposedPorts": {
                  "9600/tcp": {}
                },
                "HostConfig": {
                  "PortBindings": {
                    "5671/tcp": [
                      {
                        "HostPort": "5671"
                      }
                    ],
                    "8883/tcp": [
                      {
                        "HostPort": "8883"
                      }
                    ],
                    "443/tcp": [
                      {
                        "HostPort": "443"
                      }
                    ]
                  }
                }
              }
            },
            "env": {
              "ExperimentalFeatures__Enabled": {
                "value": "true"
              },
              "ExperimentalFeatures__EnableMetrics": {
                "value": "true"
              }
            }
          }

At present I get a

System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. ---> System.Net.Sockets.SocketException (10061): No connection could be made because the target machine actively refused it.

whether I try to access them at http://edgeHub:9600/metrics on the IoT Edge module network or http://localhost:9600/metrics from my pc

Anyone know if this is possible or better yet able to tell me what I might be doing wrong?

output of docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 4753b9bb2416 mcr.microsoft.com/azureiotedge-simulated-temperature-sensor:1.0 "/bin/sh -c 'echo \"$…" 2 minutes ago Up 2 minutes SimulatedTemperatureSensor d264bde9bfb1 mcr.microsoft.com/azureiotedge-hub:1.0 "/bin/sh -c 'echo \"$…" 2 minutes ago Up 2 minutes 0.0.0.0:443->443/tcp, 0.0.0.0:5671->5671/tcp, 0.0.0.0:8883->8883/tcp, 0.0.0.0:9600->9600/tcp edgeHubDev

DevOnEdge
  • 21
  • 3
  • When the simulator is running your workload, what is the output of ‘docker ps’? – Venkat Yalla May 02 '20 at 16:09
  • did my best to get it represented in the original question. please let me know if you need clarification on a specific field – DevOnEdge May 04 '20 at 12:43
  • adding some more color to this ... ive been able produce/consume the edgeHub metrics via an ExposedPort configuration when running in the simulator. no such luck with the edgeAgent metrics though – DevOnEdge May 05 '20 at 14:43
  • 1
    The simulator doesn't run the edgeAgent (it uses docker-compose), so edgeAgent metrics won't be available in that environment. – Venkat Yalla May 20 '20 at 17:47

0 Answers0