id = "net-snmp" name = "Net-SNMP" homepage = "https://www.net-snmp.org" description = "A suite of applications for using and deploying SNMP." executables = ["snmpget", "snmpwalk", "snmpset", "snmptranslate", "snmpconf"] [dotfiles] # The official snmp.conf manual identifies ~/.snmp/snmp.conf as the personal # application configuration and ~/.snmp/hosts/ as the host-specific config. # https://netsnmp.org/man/snmp.conf.html # https://www.net-snmp.org/wiki/index.php/TUT:Configuring_Net-SNMP_Applications paths = ["~/.snmp/snmp.conf", "~/.snmp/hosts/"] secret = [] [[dotfiles.secret_paths]] file = "~/.snmp/snmp.conf" match = { prefix = ["defCommunity", "defAuthPassphrase", "defPrivPassphrase"] } [commands] format = 1 label = "Query an SNMP agent (snmpget)" description = "Fetch one or more OIDs from an SNMP agent with snmpget. SNMPv3 engine IDs, MIB parsing and debug options are not in this form; passphrases typed here appear in the command line." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = false } [[commands.source]] id = "help" kind = "help" revision = "snmpget 5.6.2.1 --help" evidence = """ USAGE: snmpget [OPTIONS] AGENT OID [OID]... -v 1|2c|3 specifies SNMP version to use -c COMMUNITY set the community string -a PROTOCOL set authentication protocol (MD5|SHA) -A PASSPHRASE set authentication protocol pass phrase -l LEVEL set security level (noAuthNoPriv|authNoPriv|authPriv) -u USER-NAME set security name (e.g. bert) -x PROTOCOL set privacy protocol (DES|AES) -X PASSPHRASE set privacy protocol pass phrase -r RETRIES set the number of retries -t TIMEOUT set the request timeout (in seconds) -m MIB[:...] load given list of MIBs (ALL loads everything) n: print OIDs numerically v: print values only (not OID = value) -O OUTOPTS Toggle various defaults controlling output display: """ [[commands.field]] id = "agent" label = "Agent host" type = "string" position = 0 sources = ["help"] [[commands.field]] id = "oids" label = "OIDs" type = "string" position = 1 multiple = true sources = ["help"] [[commands.field]] id = "version" label = "SNMP version" type = "enum" choices = [{ value = "1", label = "v1" }, { value = "2c", label = "v2c" }, { value = "3", label = "v3" }] option = ["-v"] sources = ["help"] [[commands.field]] id = "community" label = "Community (v1/v2c)" type = "string" option = ["-c"] sources = ["help"] [[commands.field]] id = "user" label = "Security name (v3)" type = "string" option = ["-u"] sources = ["help"] [[commands.field]] id = "level" label = "Security level (v3)" type = "enum" choices = [{ value = "noAuthNoPriv", label = "noAuthNoPriv" }, { value = "authNoPriv", label = "authNoPriv" }, { value = "authPriv", label = "authPriv" }] option = ["-l"] sources = ["help"] [[commands.field]] id = "auth_protocol" label = "Auth protocol (v3)" type = "enum" choices = [{ value = "MD5", label = "MD5" }, { value = "SHA", label = "SHA" }] option = ["-a"] sources = ["help"] [[commands.field]] id = "auth_pass" label = "Auth passphrase (v3)" type = "string" option = ["-A"] sources = ["help"] [[commands.field]] id = "priv_protocol" label = "Privacy protocol (v3)" type = "enum" choices = [{ value = "DES", label = "DES" }, { value = "AES", label = "AES" }] option = ["-x"] sources = ["help"] [[commands.field]] id = "priv_pass" label = "Privacy passphrase (v3)" type = "string" option = ["-X"] sources = ["help"] [[commands.field]] id = "retries" label = "Retries" type = "integer" option = ["-r"] sources = ["help"] [[commands.field]] id = "timeout" label = "Timeout (seconds)" type = "integer" option = ["-t"] sources = ["help"] [[commands.field]] id = "output" label = "Output options" description = "Letters after -O, for example n (numeric OIDs), v (values only)." type = "string" option = ["-O"] suggestions = [{ value = "n", label = "Numeric OIDs" }, { value = "v", label = "Values only" }] sources = ["help"] [[commands.task]] id = "v2c" label = "Get OIDs with v2c" fields = ["agent", "oids", "version", "community"] required = ["agent", "oids", "version", "community"] set = { version = ["2c"] } [[commands.task]] id = "v3" label = "Get OIDs with v3" fields = ["agent", "oids", "version", "user", "level", "auth_protocol", "auth_pass", "priv_protocol", "priv_pass"] required = ["agent", "oids", "version", "user", "level"] set = { version = ["3"] } [[commands.group]] id = "basic" label = "Basic" fields = ["agent", "oids", "version", "community"] [[commands.group]] id = "advanced" label = "SNMPv3 and tuning" fields = ["user", "level", "auth_protocol", "auth_pass", "priv_protocol", "priv_pass", "retries", "timeout", "output"]