{"id":32172640,"url":"https://github.com/jonnystorm/snmp-elixir","last_synced_at":"2026-02-27T18:06:59.745Z","repository":{"id":57550010,"uuid":"84620784","full_name":"jonnystorm/snmp-elixir","owner":"jonnystorm","description":"An SNMP client library for Elixir","archived":false,"fork":false,"pushed_at":"2025-09-02T01:14:10.000Z","size":517,"stargazers_count":35,"open_issues_count":4,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-23T12:09:38.703Z","etag":null,"topics":["client","elixir","snmp"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonnystorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MPL","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":"2017-03-11T03:26:47.000Z","updated_at":"2025-09-02T01:14:14.000Z","dependencies_parsed_at":"2024-07-26T23:30:18.670Z","dependency_job_id":"941c0c7a-4a6a-46ec-9809-e5a266580211","html_url":"https://github.com/jonnystorm/snmp-elixir","commit_stats":{"total_commits":81,"total_committers":7,"mean_commits":"11.571428571428571","dds":0.5185185185185186,"last_synced_commit":"9d288ddfdfd076e6b296f314c561dad06a9cf55c"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jonnystorm/snmp-elixir","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonnystorm%2Fsnmp-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonnystorm%2Fsnmp-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonnystorm%2Fsnmp-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonnystorm%2Fsnmp-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonnystorm","download_url":"https://codeload.github.com/jonnystorm/snmp-elixir/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonnystorm%2Fsnmp-elixir/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29907362,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","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":["client","elixir","snmp"],"created_at":"2025-10-21T18:41:35.484Z","updated_at":"2026-02-27T18:06:59.740Z","avatar_url":"https://github.com/jonnystorm.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snmp-elixir\n\n[![Build Status](https://gitlab.com/jonnystorm/snmp-elixir/badges/master/pipeline.svg)](https://gitlab.com/jonnystorm/snmp-elixir/commits/master)\n\nAn SNMP client library for Elixir.\n\nThis is my effort to replace the terrible but useful\n[net-snmp-elixir](https://gitlab.com/jonnystorm/net-snmp-elixir)\nwith a facile Elixir wrapper for OTP's harrowing SNMP API.\n\nMany thanks to Dave Martin for his\n[post](https://groups.google.com/forum/#!topic/elixir-lang-talk/lGWGXFoUVvc),\nwithout which I may never have bothered returning to this\nproblem.\n\n## Usage in CLI\n\n```elixir\niex\u003e SNMP.start\niex\u003e\niex\u003e v2_cred =\n...\u003e   SNMP.credential(\n...\u003e     %{version: :v2, community: \"public\"}\n...\u003e   )\n%SNMP.CommunityCredential{\n  community: 'public',\n  sec_model: :v2c,\n  version: :v2\n}\niex\u003e\niex\u003e {:ok, base_oid} =\n...\u003e   SNMP.resolve_object_name_to_oid(:sysName)\n{:ok, [1, 3, 6, 1, 2, 1, 1, 5]}\niex\u003e\niex\u003e %{uri: URI.parse(\"snmp://an-snmp-host.local\"),\n...\u003e   credential: v2_cred,\n...\u003e   varbinds: [%{oid: base_oid ++ [0]}],\n...\u003e } |\u003e SNMP.request\n{ :ok,\n  [ %{oid: [1, 3, 6, 1, 2, 1, 1, 5, 0],\n      type: :\"OCTET STRING\",\n      value: \"an-snmp-host\"\n    }\n  ]\n}\niex\u003e\niex\u003e v3_cred =\n...\u003e   SNMP.credential(\n...\u003e     %{version: :v3,\n...\u003e       sec_name: \"user\",\n...\u003e       auth: :sha,\n...\u003e       auth_pass: \"authpass\",\n...\u003e       priv: :aes,\n...\u003e       priv_pass: \"privpass\",\n...\u003e     }\n...\u003e  )\n%SNMP.USMCredential{\n  auth: :sha,\n  auth_pass: 'authpass',\n  priv: :aes,\n  priv_pass: 'privpass',\n  sec_level: :authPriv,\n  sec_model: :usm,\n  sec_name: 'nms',\n  version: :v3\n}\niex\u003e %{uri: URI.parse(\"snmp://an-snmp-host.local\"),\n...\u003e   credential: v3_cred,\n...\u003e   varbinds: [%{oid: \"ipAddrTable\"}],\n...\u003e } |\u003e SNMP.walk\n...\u003e |\u003e Enum.take(1)\n[ %{oid: [1, 3, 6, 1, 2, 1, 4, 20, 1, 1, 192, 0, 2, 1],\n    type: :IpAddress,\n    value: [192, 0, 2, 1],\n  }\n]\n```\n\n## Installation\n\nAdd `:snmp_ex` to `mix.exs`:\n\n```\ndefp deps do\n  [ { :snmp_ex, \"~\u003e 0.4.0\" } ]\nend\n```\n\nAny of the following defaults may be overridden in your\n`config.exs`.\n\n```\nconfig :snmp_ex,\n  timeout: 5000,\n  max_repetitions: 10,\n  engine_discovery_timeout: 1000,\n  mib_cache:      \"priv/snmp/mibs\",\n  snmp_conf_dir:  \"priv/snmp/conf\",\n  snmpm_conf_dir: \"priv/snmp\",\n  snmpc_verbosity: \"silence\",\n  mib_sources: [\"/usr/share/snmp/mibs\"]\n```\n\n`snmpc_verbosity` can be set to different values, see the [erlang docs](http://erlang.org/doc/man/snmpc.html) on which values you can use.\n\nFinally, ensure the `:snmp` OTP application is available in\nyour development environment. Some Linux distributions, such\nas CentOS, provide separate packages for individual OTP\nservices and tools. Check for `erlang-snmp` if this is a\nconcern. As for production, the release process will ensure\n`:snmp` is automatically included in the resulting tarball.\n\n## Why another wrapper?\n\n`net-snmp-elixir` was my experimental hack to get something\nthat worked. I didn't expect it to become one of the top\nGoogle results for \"elixir snmp\" but it is, which scares me.\nElixir may be the best language for network interaction in\nexistence, but we still need worthy SNMP support.\n\n## Contributing\n\nThis project will accept (merge/rebase/squash) *all*\ncontributions. Contributions that break the build will be\nreverted.\n\nFor details, please see [Why Optimistic Merging Works\nBetter](http://hintjens.com/blog:106).\n\n## TODO\n\n* ~~SNMPv3 USM~~ (AES support requires OTP \u003e=23; see corresponding [pull request](https://github.com/erlang/otp/pull/2544) for details.)\n* ~~USM engine discovery~~\n* SNMP tables\n* ~~MIB name resolution~~\n* ~~Basic SNMP operations~~ (~~GET~~, ~~GET-NEXT~~, ~~WALK~~, ~~SET~~)\n* Bulk SNMP operations\n* Process management (~~supervision~~, `:snmpm` agents)\n* Make it decent\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonnystorm%2Fsnmp-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonnystorm%2Fsnmp-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonnystorm%2Fsnmp-elixir/lists"}