{"id":25539334,"url":"https://github.com/olafwrieden/telemetry-data-generator","last_synced_at":"2026-05-01T00:31:45.963Z","repository":{"id":211064419,"uuid":"706017248","full_name":"olafwrieden/telemetry-data-generator","owner":"olafwrieden","description":"A repository for simulating device telemetry with an Azure Function and feeding it into an Azure Event Hub.","archived":false,"fork":false,"pushed_at":"2024-01-22T01:22:25.000Z","size":94,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-23T00:39:56.479Z","etag":null,"topics":["azure","data-generator","iot","ot","telemetry"],"latest_commit_sha":null,"homepage":"https://medium.com/@olafwrieden/build-your-own-telemetry-data-generator-to-simulate-iot-and-ot-devices-43eaa954f1f8","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olafwrieden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-17T06:32:41.000Z","updated_at":"2024-11-18T12:38:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"5205e47b-51c1-4c6c-b313-53908df6a0d1","html_url":"https://github.com/olafwrieden/telemetry-data-generator","commit_stats":null,"previous_names":["olafwrieden/telemetry-data-generator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/olafwrieden/telemetry-data-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafwrieden%2Ftelemetry-data-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafwrieden%2Ftelemetry-data-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafwrieden%2Ftelemetry-data-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafwrieden%2Ftelemetry-data-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olafwrieden","download_url":"https://codeload.github.com/olafwrieden/telemetry-data-generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olafwrieden%2Ftelemetry-data-generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32481553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","data-generator","iot","ot","telemetry"],"created_at":"2025-02-20T05:33:31.294Z","updated_at":"2026-05-01T00:31:45.896Z","avatar_url":"https://github.com/olafwrieden.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telemetry Data Generator\n\nThis is a simple telemetry generator that can be used to generate telemetry data for testing purposes. It was built for the Azure Data Explorer Microhack as a replacement for the IoT Central dependency.\n\n## Read the Blog\n\nThis repository accompanies my blog post on Medium titled _[Build your own Telemetry Data Generator to Simulate IoT and OT Devices](https://medium.com/@olafwrieden/build-your-own-telemetry-data-generator-to-simulate-iot-and-ot-devices-43eaa954f1f8)_ which it walks you through customising this generator to suit the unique shape of your data - this way you can mimic your real-world data in a test environment.\n\n[![Read on Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge\u0026logo=medium\u0026logoColor=white)](https://medium.com/@olafwrieden/build-your-own-telemetry-data-generator-to-simulate-iot-and-ot-devices-43eaa954f1f8)\n\n## Deploy to Azure\n\nTo deploy this generator to Azure, click the button below. You will need an Azure Subscription and permission to create the resources shown in the image.\n\n[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Folafwrieden%2Ftelemetry-data-generator%2Fmain%2Finfra%2Fmain.json)\n\n![Resources](./infra/resources.png)\n\n## How it works\n\nThe generator simulates telemetry from 30 devices whose ids are defined in the [`src/deviceIds.ts`](/src/deviceIds.ts) file. We want the generator to emit payloads for the same simulated devices each time, thus we hardcode the device ids to keep them consistent between runs.\n\nEvery 1 minute, the [`src/functions/TelemetryGenerator.ts`](src/functions/TelemetryGenerator.ts) runs and emits a payload for each device ID. The payload is a JSON object which matches the expected format for the IoT Central API.\n\nThe payload array is then written onto the Event Hub for later ingestion into a KQL Database (or other downstream system).\n\n## How to use\n\nTo adjust the Event Hub name and connection string, edit the [`src/functions/TelemetryGenerator.ts`](src/functions/TelemetryGenerator.ts) file. Here you can also adjust the frequency of the payload generation.\n\n```typescript\n...\n// Schedule the function to run every minute and push into the iotdata Event Hub.\napp.timer(\"TelemetryGenerator\", {\n  schedule: \"0 */1 * * * *\",\n  handler: TelemetryGenerator,\n  return: output.eventHub({\n    eventHubName: \"iotdata\", // \u003c-- Name of the Azure Event Hub\n    connection: \"EventHubConnection\", // \u003c-- Environment variable (connection string)\n  }),\n});\n```\n\nBe sure to supply the `EventHubConnection` environment variable when deploying the function app. The value is the connection string of your Azure Event Hubs Namespace.\n\n### In Development\n\nLocally this can be supplied in a `local.settings.json` file like so:\n\n```json\n{\n  \"IsEncrypted\": false,\n  \"Values\": {\n    \"AzureWebJobsStorage\": \"DefaultEndpointsProtocol=...\",\n    \"FUNCTIONS_WORKER_RUNTIME\": \"node\",\n    \"AzureWebJobsFeatureFlags\": \"EnableWorkerIndexing\",\n    \"EventHubConnection\": \"Endpoint=sb://...\"\n  }\n}\n```\n\n### In Production\n\nAdd the `EventHubConnection` environment variable in the Azure Function's Configuration settings. The value should be the Azure Event Hub connection string, e.g.\n\n| Key                  | Value               |\n| -------------------- | ------------------- |\n| `EventHubConnection` | `Endpoint=sb://...` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folafwrieden%2Ftelemetry-data-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folafwrieden%2Ftelemetry-data-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folafwrieden%2Ftelemetry-data-generator/lists"}