SnmpKit ๐Ÿš€

IMPORTANT: Breaking changes in 1.0

Hex.pmDocumentationLicenseElixir CI

A modern, comprehensive SNMP toolkit for Elixir - featuring a unified API, pure Elixir implementation, and powerful device simulation.

SnmpKit is a complete SNMP (Simple Network Management Protocol) solution built from the ground up in pure Elixir. It provides a clean, organized API for SNMP operations, MIB management, and realistic device simulation.

โœจ Key Features

Performance and result toggles

Examples

{:ok, rows} = SnmpKit.SNMP.walk("192.168.1.1", "ifTable", include_names: false, include_formatted: false)
# rows: [%{oid: "1.3.6...", type: :integer, value: 1}, ...]

Multi-target defaults (1.0)

# Default: Concurrent Multi
{:ok, results} = SnmpKit.get_multi([{"h1", "sysDescr.0"}, {"h2", "sysUpTime.0"}])

# Legacy/simple path (opt-in)
{:ok, results} = SnmpKit.get_multi([{"h1", "sysDescr.0"}, {"h2", "sysUpTime.0"}], strategy: :simple)

๐Ÿš€ Quick Start

Installation

def deps do
  [
    {:snmpkit, "~> 1.3"}
  ]
end

Basic Usage

# Basic SNMP operations return enriched maps
{:ok, %{name: name, oid: oid, type: type, value: description, formatted: formatted}} =
  SnmpKit.SNMP.get("192.168.1.1", "sysDescr.0")

{:ok, system_info} = SnmpKit.SNMP.walk("192.168.1.1", "system")
# system_info: [
#   %{name: "sysDescr.0", oid: "1.3.6.1.2.1.1.1.0", type: :octet_string, value: "...", formatted: "..."},
#   ...
# ]

# MIB operations
{:ok, oid} = SnmpKit.MIB.resolve("sysDescr.0")
{:ok, name} = SnmpKit.MIB.reverse_lookup([1, 3, 6, 1, 2, 1, 1, 1, 0])

# Device simulation
device_profile = %{
  name: "Test Router",
  objects: %{[1, 3, 6, 1, 2, 1, 1, 1, 0] => "Test Router v1.0"}
}
{:ok, device} = SnmpKit.Sim.start_device(device_profile, port: 1161)

๐Ÿ—๏ธ Architecture

๐Ÿ“š Documentation

๐Ÿค Contributing

We welcome contributions! Please see the Contributing Guide for guidelines.

๐Ÿ“„ License

SnmpKit is released under the MIT License.


Ready to simplify your SNMP operations? Get started with SnmpKit today! ๐Ÿš€