This open source project helps view/inspect your events sent to Azure EventHub/IoTHub.
A live version of this viewer is available here.
- Open http://eventhub.shkreza.com in your browser.
- Enter your Eventhub's information:
- Your hub connection string (with listener permission);
- Your hub's entity name;
- The start time for initial events to receive (click "Select now" button to enter current timestamp).
- Your partition name (you can query paritions by clicking "List partitions").
For IoT Hub, use this instructions to retrieve Event Hub-compatible connection strings.
- To start receiving events, click "Start streaming" button.
- To stop, click "Stop streaming" button.
- Clone the code with
git clone https://github.com/shkreza/eventhub-viewer.git
- Install TypeScript (see instructions here).
- Compile the typescript files in
lib/
folder (this produces.js
files underdist/
)
tsc
- Run:
node dist/server.js
- Open
http://localhost:4444
in your browser.
- Compile typescript files:
tsc
This places compiled .js
files under dist/
folder.
- Build docker image:
docker build -t <YOUR_IMAGE_NAME> .
A latest version of eventhub viewer is already pushed to shkreza/eventhub-viewer
in DockerHub.
- To run:
docker run -p 4444:4444 <YOUR_IMAGE_NAME>
- Open
http://<DOCKER_HOST>:4444
in your browser (the service routes port80
to your container's port4444
).
Assuming you have already build and pushed the docker image:
- Add your site certitifates as TLS secrets in Kubernetes:
kubectl create secret tls tls-secret --key=tls.key --cert=tls.crt
- Update
kubernetes/deployment.yaml
withYOUR_IMAGE_NAME
:
spec:
containers:
- name: eventhub-viewer
image: <YOUR_IMAGE_NAME>
- Deploy Kubernetes container:
kubectl create -f kubernetes/deployment.yaml
- Deploy Kubernetes service (loadbalancer):
kubectl create -f kubernetes/service.yaml
- Check your services' external IP:
- Deploy Kubernetes container
kubectl get service eventhub-viewer
- Open
https://<YOUR_DOMAIN_NAME>
in your browser.