{"id":26824821,"url":"https://github.com/cybcon/docker.snmp2mqtt","last_synced_at":"2026-04-15T13:33:31.533Z","repository":{"id":204743997,"uuid":"712520248","full_name":"cybcon/docker.snmp2mqtt","owner":"cybcon","description":"Read device information via SNMP and publish them in a MQTT topic as json formatted string.","archived":false,"fork":false,"pushed_at":"2025-12-28T18:25:33.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-31T09:21:22.036Z","etag":null,"topics":["docker-compose","docker-image","mqtt-client","python3","snmp"],"latest_commit_sha":null,"homepage":"https://www.oberdorf-itc.de/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cybcon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://www.paypal.com/donate/?hosted_button_id=BHGJGGUS6RH44"]}},"created_at":"2023-10-31T16:20:27.000Z","updated_at":"2025-12-28T18:25:26.000Z","dependencies_parsed_at":"2024-12-23T17:29:09.984Z","dependency_job_id":"8122aa87-e83c-4d71-97be-9451f29a3268","html_url":"https://github.com/cybcon/docker.snmp2mqtt","commit_stats":null,"previous_names":["cybcon/docker.snmp2mqtt"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/cybcon/docker.snmp2mqtt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fdocker.snmp2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fdocker.snmp2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fdocker.snmp2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fdocker.snmp2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cybcon","download_url":"https://codeload.github.com/cybcon/docker.snmp2mqtt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cybcon%2Fdocker.snmp2mqtt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T13:28:40.153Z","status":"ssl_error","status_checked_at":"2026-04-15T13:28:29.396Z","response_time":63,"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":["docker-compose","docker-image","mqtt-client","python3","snmp"],"created_at":"2025-03-30T10:17:42.026Z","updated_at":"2026-04-15T13:33:31.522Z","avatar_url":"https://github.com/cybcon.png","language":"Python","funding_links":["https://www.paypal.com/donate/?hosted_button_id=BHGJGGUS6RH44"],"categories":[],"sub_categories":[],"readme":"# Quick reference\n\nMaintained by: [Michael Oberdorf IT-Consulting](https://www.oberdorf-itc.de/)\n\nSource code: [GitHub](https://github.com/cybcon/docker.snmp2mqtt)\n\nContainer image: [DockerHub](https://hub.docker.com/r/oitc/snmp2mqtt)\n\n\u003c!-- SHIELD GROUP --\u003e\n[![][github-action-test-shield]][github-action-test-link]\n[![][github-action-release-shield]][github-action-release-link]\n[![][github-release-shield]][github-release-link]\n[![][github-releasedate-shield]][github-releasedate-link]\n[![][github-stars-shield]][github-stars-link]\n[![][github-forks-shield]][github-forks-link]\n[![][github-issues-shield]][github-issues-link]\n[![][github-license-shield]][github-license-link]\n\n[![][docker-release-shield]][docker-release-link]\n[![][docker-pulls-shield]][docker-pulls-link]\n[![][docker-stars-shield]][docker-stars-link]\n[![][docker-size-shield]][docker-size-link]\n\n\n# Supported tags and respective `Dockerfile` links\n\n* [`latest`, `1.1.2`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.1.2/Dockerfile)\n* [`1.1.1`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.1.1/Dockerfile)\n* [`1.0.4`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.0.4/Dockerfile)\n* [`1.0.3`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.0.3/Dockerfile)\n* [`1.0.2`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.0.2/Dockerfile)\n* [`1.0.1`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.0.1/Dockerfile)\n* [`1.0.0`](https://github.com/cybcon/docker.snmp2mqtt/blob/v1.0.0/Dockerfile)\n\n# Summary\nThe container image is based on Alpine Linux with python3 interpreter.\nThe tool is written in python and connects to a MQTT server. After that, it loops over the configured SNMP endpoints and graps the configured OIDs.\nThe collected SNMP data will be transformed as a json object and published to the given MQTT topic.\n\n# Configuration\n## Container configuration\n\nThe container reads some configuration via environment variables.\n\n| Environment variable name    | Description                                                                                    | Required     | Default value             |\n|------------------------------|------------------------------------------------------------------------------------------------|--------------|---------------------------|\n| `CONFIG_FILE`                | The configuration file that contains the connection parameters to MQTT and the SNMP endpoints. | **OPTIONAL** | `/app/etc/snmp2mqtt.json` |\n\n\n## Configuration file\n\nThe path and filename to the general configuration file can be set via environment variable `CONFIG_FILE`. By default, the script will use `/app/etc/snmp2mqtt.json`.\n\nInside this file we need to configure the MQTT server connection parameters and the SNMP endpoint connection parameters.\n\n### Example\n\n```json\n{\n  \"DEBUG\": true,\n  \"devices\": [\n    \"EXAMPLE\"\n  ],\n  \"mqtt\": {\n    \"client_id\": \"snmp2mqtt\",\n    \"user\": \"snmp2mqtt\",\n    \"password\": \"myMQTTPassword\",\n    \"server\": \"test.mosquitto.org\",\n    \"port\": 1883,\n    \"tls\": false,\n    \"retain\": true,\n    \"hostname_validation\": false,\n    \"protocol_version\": 3\n    },\n  \"EXAMPLE\": {\n    \"server\": \"127.0.0.1\",\n    \"port\": 161,\n    \"snmpCredentials\": {\n      \"user\": \"snmpUser\",\n      \"password\": \"snmpPassword\",\n      \"algorithm\": \"MD5\"\n    },\n    \"snmpEncryption\": {\n      \"password\": \"snmpEncryptionKey\",\n      \"algorithm\": \"DES\"\n    },\n    \"snmpOID2Attribute\": {\n      \"1.3.6.1.4.1.2021.4.3.0\": \"memTotalSwap\"\n    },\n    \"mqttTopic\": \"de/oberdorf-itc/devices/EXAMPLE\"\n  }\n}\n```\n\n### Field description\n\n| Field                                      | Type    | Description                                                                                                |\n|--------------------------------------------|---------|------------------------------------------------------------------------------------------------------------|\n| `DEBUG`                                    | Boolean | Enable debug output on stdout                                                                              |\n| `devices`                                  | Array   | A List of names that represent SNMP endpoints. These keywords are later used inside the configuation file. |\n| `mqtt`                                     | Object  | Contains MQTT specific configuration parameters.                                                           |\n| `mqtt.client_id`                           | String  | The MQTT client identifier.                                                                                |\n| `mqtt.user`                                | String  | The username to authenticate to the MQTT server.                                                           |\n| `mqtt.password`                            | String  | The password to authenticate to the MQTT server.                                                           |\n| `mqtt.server`                              | String  | IP address or FQDN of the MQTT server.                                                                     |\n| `mqtt.port`                                | String  | The TCP port number of the MQTT server.                                                                    |\n| `mqtt.tls`                                 | Boolean | If a TLS encrpted communication should be established or not.                                              |\n| `mqtt.hostname_validation`                 | Boolean | Validate the hostname from the servercertificate or not.                                                   |\n| `mqtt.protocol_version`                    | Integer | The MQTT protocol version. Can be 3 (for MQTTv311) or 5 (for MQTTv5).                                      |\n| *\\\u003cdevice\\\u003e*                               | Object  | Contains the SNMP endpoint specific configuration parametes.                                               |\n| *\\\u003cdevice\\\u003e*.`server`                      | String  | IP address or FQDN of the SNMP endpoint.                                                                   |\n| *\\\u003cdevice\\\u003e*.`port`                        | Integer | The TCP port number of the SNMP endpoint.                                                                  |\n| *\\\u003cdevice\\\u003e*.`snmpCredentials`             | Object  | The SNMP endpoint credentials for authentication.                                                          |\n| *\\\u003cdevice\\\u003e*.`snmpCredentials.user`        | String  | The username to authenticate to the SNMP endpoint.                                                         |\n| *\\\u003cdevice\\\u003e*.`snmpCredentials.password`    | String  | The password to authenticate to the SNMP endpoint.                                                         |\n| *\\\u003cdevice\\\u003e*.`snmpCredentials.algorithm`   | String  | The algorithm to use when authenticating to the SNMP endpoint (supported: `MD5`, `SHA`, `SHA224`, `SHA256`, `SHA384`, `SHA512`). |\n| *\\\u003cdevice\\\u003e*.`snmpEncryption`              | Object  | The SNMP endpoint data encrption parameters.                                                               |\n| *\\\u003cdevice\\\u003e*.`snmpEncryption.password`     | String  | The SNMP data encrption password.                                                                          |\n| *\\\u003cdevice\\\u003e*.`snmpEncryption.algorithm`    | String  | The SNMP data encrption algorithm (supported: `DES`, `3DES`, `AES128`, `AES192`, `AES256`).                |\n| *\\\u003cdevice\\\u003e*.`snmpOID2Attribute`           | Object  | List of SNMP OIDs and a human readable name.                                                               |\n| *\\\u003cdevice\\\u003e*.`snmpOID2Attribute`.*\\\u003cOID\\\u003e* | String  | A human readable translation of the given OID.                                                             |\n| *\\\u003cdevice\\\u003e*.`mqttTopic`                   | String  | the MQTT topic to publish the colected device data.                                                        |\n\n\n# Running the container image\n\n```\ndocker run --rm -v ./myConfig.json:/app/etc/snmp2mqtt.json:ro oitc/snmp2mqtt:latest\n```\n\n# Docker compose configuration\n\n```yaml\nservices:\n  snmp2mqtt:\n    container_name: snmp2mqtt\n    image: oitc/snmp2mqtt:1.0.0\n    restart: \"no\"\n    user: 3917:3917\n    volumes:\n      - /srv/docker/snmp2mqtt/etc/snmp2mqtt.json:/app/etc/snmp2mqtt.json:ro\n```\n\n# Donate\nI would appreciate a small donation to support the further development of my open source projects.\n\n\u003ca href=\"https://www.paypal.com/donate/?hosted_button_id=BHGJGGUS6RH44\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png\" alt=\"Donate with PayPal\" width=\"200px\"\u003e\u003c/a\u003e\n\n# License\n\nCopyright (c) 2023-2025 Michael Oberdorf IT-Consulting\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\u003c!-- LINK GROUP --\u003e\n[docker-pulls-link]: https://hub.docker.com/r/oitc/snmp2mqtt\n[docker-pulls-shield]: https://img.shields.io/docker/pulls/oitc/snmp2mqtt?color=45cc11\u0026labelColor=black\u0026style=flat-square\n[docker-release-link]: https://hub.docker.com/r/oitc/snmp2mqtt\n[docker-release-shield]: https://img.shields.io/docker/v/oitc/snmp2mqtt?color=369eff\u0026label=docker\u0026labelColor=black\u0026logo=docker\u0026logoColor=white\u0026style=flat-square\n[docker-size-link]: https://hub.docker.com/r/oitc/snmp2mqtt\n[docker-size-shield]: https://img.shields.io/docker/image-size/oitc/snmp2mqtt?color=369eff\u0026labelColor=black\u0026style=flat-square\n[docker-stars-link]: https://hub.docker.com/r/oitc/snmp2mqtt\n[docker-stars-shield]: https://img.shields.io/docker/stars/oitc/snmp2mqtt?color=45cc11\u0026labelColor=black\u0026style=flat-square\n[github-action-release-link]: https://github.com/cybcon/docker.snmp2mqtt/actions/workflows/release-from-label.yaml\n[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/docker.snmp2mqtt/release-from-label.yaml?label=release\u0026labelColor=black\u0026logo=githubactions\u0026logoColor=white\u0026style=flat-square\n[github-action-test-link]: https://github.com/cybcon/docker.snmp2mqtt/actions/workflows/container-image-build-validation.yaml\n[github-action-test-shield-original]: https://github.com/cybcon/docker.snmp2mqtt/actions/workflows/container-image-build-validation.yaml/badge.svg\n[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/docker.snmp2mqtt/container-image-build-validation.yaml?label=tests\u0026labelColor=black\u0026logo=githubactions\u0026logoColor=white\u0026style=flat-square\n[github-forks-link]: https://github.com/cybcon/docker.snmp2mqtt/network/members\n[github-forks-shield]: https://img.shields.io/github/forks/cybcon/docker.snmp2mqtt?color=8ae8ff\u0026labelColor=black\u0026style=flat-square\n[github-issues-link]: https://github.com/cybcon/docker.snmp2mqtt/issues\n[github-issues-shield]: https://img.shields.io/github/issues/cybcon/docker.snmp2mqtt?color=ff80eb\u0026labelColor=black\u0026style=flat-square\n[github-license-link]: https://github.com/cybcon/docker.snmp2mqtt/blob/main/LICENSE\n[github-license-shield]: https://img.shields.io/badge/license-MIT-blue?labelColor=black\u0026style=flat-square\n[github-release-link]: https://github.com/cybcon/docker.snmp2mqtt/releases\n[github-release-shield]: https://img.shields.io/github/v/release/cybcon/docker.snmp2mqtt?color=369eff\u0026labelColor=black\u0026logo=github\u0026style=flat-square\n[github-releasedate-link]: https://github.com/cybcon/docker.snmp2mqtt/releases\n[github-releasedate-shield]: https://img.shields.io/github/release-date/cybcon/docker.snmp2mqtt?labelColor=black\u0026style=flat-square\n[github-stars-link]: https://github.com/cybcon/docker.snmp2mqtt\n[github-stars-shield]: https://img.shields.io/github/stars/cybcon/docker.snmp2mqtt?color=ffcb47\u0026labelColor=black\u0026style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybcon%2Fdocker.snmp2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcybcon%2Fdocker.snmp2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybcon%2Fdocker.snmp2mqtt/lists"}