locked
Acquiring Modules' Status in Module RRS feed

  • Question

  • Hello, I am looking for ways to be able to get my modules' health status (running/stopped) from inside another module so that I can keep these status on check while they run. I am very new to the IoT Edge platform and programming in general, so I am looking for any advice on this matter.

    I develop my modules in Python and my initial idea was to simply call subprocess.Popen("iotedge list") to get the output from the list command to achieve my wanted info. After further research, I SSHed into the command using docker exec and noticed that iotedge and docker are not necessarily installed in the containers, which makes sense. I thought maybe I could install the docker/iotedge runtime and use either of them (since docker container ls has the same effect as iotedge list), but was unsuccessful at that also. Another idea I had was to keep a .sh file in my bindpoint directory and execute it using my Python script in hopes that it would output the hosts' running containers, which I was also unsuccessful when executing. Lastly, I thought perhaps I could SSH from the container into the host and then run "iotedge list" but that seems greatly inefficient and I could not find any reliable resources that would help me achieve that (which further proved to me that this may not be the best option).

    Are there any better ways to do this, or any recommendations on how to achieve one of the routes mentioned above? I can provide examples of how I attempted to reach some of these alternatives if necessary.

    Thanks!



    • Edited by LP2LP Tuesday, May 12, 2020 11:06 PM
    Tuesday, May 12, 2020 11:03 PM

All replies

  • Hi LP2LP,

    Thanks for reaching out to us!

    The modules run under the context of Moby as containers on the Edge. You can make use of inter-container communication for this. You can also send data from one module to another using IOT Edge Routing.


    Thanks & Regards ^Satish Boddu -MSFT Azure CXP Community


    Wednesday, May 13, 2020 7:38 PM
  • Hi LP2LP,

    Just checking back, Please let us know if you need further help.


    Thanks & Regards ^Satish Boddu -MSFT Azure CXP Community

    Thursday, May 21, 2020 3:02 AM