{"id":24811154,"url":"https://github.com/thin-edge/tedge-inventory-plugin","last_synced_at":"2026-06-12T05:31:14.002Z","repository":{"id":208699911,"uuid":"722279323","full_name":"thin-edge/tedge-inventory-plugin","owner":"thin-edge","description":"thin-edge.io community plugin to support publishing inventory data using a simple script based interface","archived":false,"fork":false,"pushed_at":"2025-11-26T00:31:57.000Z","size":67,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-29T04:11:02.194Z","etag":null,"topics":["community","digitaltwin","iot","plugin","thin-edge"],"latest_commit_sha":null,"homepage":"https://thin-edge.io/","language":"Shell","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/thin-edge.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-22T20:01:07.000Z","updated_at":"2025-11-26T00:32:00.000Z","dependencies_parsed_at":"2023-11-22T21:25:13.870Z","dependency_job_id":"a448dcc4-1737-48af-8d1e-fbf826b3973d","html_url":"https://github.com/thin-edge/tedge-inventory-plugin","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"c07a463bd9ca4aee3ff03d7b07421b37d93d3234"},"previous_names":["thin-edge/tedge-inventory-plugin"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/thin-edge/tedge-inventory-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-inventory-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-inventory-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-inventory-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-inventory-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thin-edge","download_url":"https://codeload.github.com/thin-edge/tedge-inventory-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thin-edge%2Ftedge-inventory-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34231214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["community","digitaltwin","iot","plugin","thin-edge"],"created_at":"2025-01-30T12:19:31.319Z","updated_at":"2026-06-12T05:31:13.996Z","avatar_url":"https://github.com/thin-edge.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tedge-inventory-plugin\n\n## Plugin summary\n\nPublish inventory data about a device on startup using a simply shell scripts.\n\nThe package includes some default inventory scripts, and allows users to add their own scripts into the folder for execution on device startup.\n\nInventory script which are in the folder below will be executed when the service starts, and the Standard Output will be parsed and the output converted to a MQTT message (one message per script).\n\n```sh\n/usr/share/tedge-inventory/scripts.d/\n```\n\nThe name of the script is used to control the execution order, and the type where the digital twin information will be published under (keep reading for the example).\n\n```sh\nXX_\u003cpropertyName\u003e\n```\n\nWhere `XX` 2 digit 0-padded number between `00` and `99`, to determine its execution order.\n\n### Example inventory script\n\nAn example script is shown below which adds multiple properties to the the `info` property on the digital twin\n\n**file: /usr/share/tedge-inventory/scripts.d/00_info**\n\n```sh\n#!/bin/sh\nprintf 'mymetric=\"%s\"\\n' \"some string value\"\necho \"another_value=1\"\necho \"nested={\\\"values\\\":\\\"ok\\\"}\"\n```\n\nThe above inventory script will result in the following MQTT message being published:\n\n**Topic (retained=True, qos=1)**\n\n```sh\nte/device/main///twin/info\n```\n\n**Payload**\n\n```json\n{\"mymetric\":\"some string value\",\"another_value\":1,\"nested\":{\"values\":\"ok\"}}\n```\n\n**Notes**\n\n* For security reasons, scripts MUST have `0755` permissions otherwise they will be ignored.\n\n**Technical summary**\n\nThe following details the technical aspects of the plugin to get an idea what systems it supports.\n\n|||\n|--|--|\n|**Languages**|`shell` (posix compatible)|\n|**CPU Architectures**|`all/noarch`. Not CPU specific|\n|**Supported init systems**|`systemd` and `sysvinit`|\n|**Required Dependencies**|-|\n|**Optional Dependencies (feature specific)**|-|\n\n### How to do I get it?\n\nThe following linux package formats are provided on the releases page and also in the [tedge-community](https://cloudsmith.io/~thinedge/repos/community/packages/) repository:\n\n|Operating System|Repository link|\n|--|--|\n|Debian/Raspbian (deb)|[![Latest version of 'tedge-inventory-plugin' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/thinedge/community/deb/tedge-inventory-plugin/latest/a=all;d=any-distro%252Fany-version;t=binary/?render=true\u0026show_latest=true)](https://cloudsmith.io/~thinedge/repos/community/packages/detail/deb/tedge-inventory-plugin/latest/a=all;d=any-distro%252Fany-version;t=binary/)|\n|Alpine Linux (apk)|[![Latest version of 'tedge-inventory-plugin' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/thinedge/community/alpine/tedge-inventory-plugin/latest/a=noarch;d=alpine%252Fany-version/?render=true\u0026show_latest=true)](https://cloudsmith.io/~thinedge/repos/community/packages/detail/alpine/tedge-inventory-plugin/latest/a=noarch;d=alpine%252Fany-version/)|\n|RHEL/CentOS/Fedora (rpm)|[![Latest version of 'tedge-inventory-plugin' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/thinedge/community/rpm/tedge-inventory-plugin/latest/a=noarch;d=any-distro%252Fany-version;t=binary/?render=true\u0026show_latest=true)](https://cloudsmith.io/~thinedge/repos/community/packages/detail/rpm/tedge-inventory-plugin/latest/a=noarch;d=any-distro%252Fany-version;t=binary/)|\n\n\nIf you don't wish to install all of the plugins then you can also selectively install the packages \n\n* tedge-inventory-core\n* tedge-inventory-c8y-hardware\n* tedge-inventory-c8y-position\n* tedge-inventory-device-certificate\n* tedge-inventory-device-network\n* tedge-inventory-device-os\n* tedge-inventory-device-resources\n\nFor example, on Debian, after you have configured the Community repository, you install just the plugins\n\n```sh\napt-get update\napt-get install \\\n    tedge-inventory-device-certificate \\\n    tedge-inventory-device-os\n```\n\n### What will be deployed to the device?\n\n* The following service will be installed\n    * `tedge-inventory` (service and timer) (triggered 30 seconds after boot up and then periodically every 60 mins)\n    * Inventory scripts\n        * Hardware information\n        * Operating system\n        * Location information based on the IP Address (using [ipinfo.io](ipinfo.io) service)\n    * Folder where custom inventory scripts can be added and included in the execution (see below for details)\n\n## Plugin Dependencies\n\nThe following packages are required to use the plugin:\n\n* tedge\n\n## Development\n\n### Start demo\n\n1. Start the demo\n\n    ```sh\n    just up \u0026\u0026 just bootstrap\n    ```\n\nThe systemd `tedge-inventory.timer` task will trigger automatically on startup and periodically every hour (based on start time). It can be triggered asynchronously by exeucting:\n\n```sh\nsystemctl start tedge-inventory.timer\n```\n\n### Stop demo\n\n```sh\njust down\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthin-edge%2Ftedge-inventory-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthin-edge%2Ftedge-inventory-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthin-edge%2Ftedge-inventory-plugin/lists"}