Azure IoT Hub subscriber logger

Description

ezvpn/iohub-tools-azureiothub-sub is a Docker container designed for debugging purposes.

Azure IoT Hub logger schema

ezvpn/iohub-tools-azureiothub-sub subscribes to Azure IoT Hub and logs on console the incoming messages. Meant only for local debug.

Please check the Debug Tools documentation if you need to display the Docker console locally.

Otherwise, you can install the web logger application to get access to the logs.

How to use it

ezvpn/iohub-tools-azureiothub-sub is a Docker container image pre-configured for communication with ezvpn-mqtt-azureiothub. To use, install it along with ezvpn-mqtt-azureiothub or an Azure IoT Hub service.

Environment variables

When you start the ezvpn/iohub-tools-azureiothub-sub image, you can adjust the instance's configuration by passing one or more environment variables to the docker run command.

  • EH_COMPATIBLE_ENDPOINT: Events Hub Compatible Endpoint. Must be provided. Can be obtained with az iot hub show --query properties.eventHubEndpoints.events.endpoint --name {your IoT Hub name}

  • EH_COMPATIBLE_PATH: Events Hub Compatible Path. Must be provided. Can be obtained with az iot hub show --query properties.eventHubEndpoints.events.path --name {your IoT Hub name}

  • IOT_SAS_KEY: IoT Hub SAS Key. Must be provided. Can be obtained with az iot hub policy show --name service --query primaryKey --hub-name {your IoT Hub name}

  • EH_EVENT_HUB_CONSUMER_GROUP: Event Hubs consumer group. Defaults to $Default.

  • DEBUG_ENABLED: If true, display additional message properties. Defaults to false.

Docker container details

Image: ezvpn/iohub-tools-azureiothub-sub

Supported architecture: amd64

Running locally with Docker

Example of running an ezvpn/iohub-tools-azureiothub-sub Docker container:

docker run -it --rm -e EH_COMPATIBLE_ENDPOINT="<your compatible endpoint>" \
    -e EH_COMPATIBLE_PATH="<your compatible path>" \
    -e IOT_SAS_KEY="your SAS key" \
    ezvpn/iohub-tools-azureiothub-sub

Changelog

v1.0.1
  • Smaller image
v1.0.0
  • First Release