AGENTXTRAP(1)
โจ AGENTXTRAP(1) โ Net-SNMP ๐
okay bestie, so the manual name is agentxtrap and it's giving "send a trap to the boss agent" energy ๐ฆ It sends an AgentX NotifyPDU to an AgentX master agent. Lowkey iconic. ๐
๐ธ SYNOPSIS ๐ธ
agentxtrap [OPTIONS] trap-oid [OID TYPE VALUE...]
๐ DESCRIPTION ๐
okay so agentxtrap literally fires off an AgentX NotifyPDU to a master agent ๐ You can toss in one or more object identifiers (OIDs) on the command line, and each one needs a type and a value riding along with it ๐ซถ Every variable name gets written in the format described in variables(5), no cap. ๐
๐ OPTIONS ๐
-c contextNameโ if you pass-c, the notification gets sent in a non-default context name ๐-U uptimeโ if you pass-U, that value gets parsed as centiseconds and treated as the application's sysUpTime field โฐ-x ADDRESSโ if you pass-x, it reaches out to the AgentX master atADDRESSinstead of the default one ๐ง
Also slay: all the options from snmpcmd(1) under the MIB PARSING OPTIONS, LOGGING OPTIONS and INPUT OPTIONS headers work here too, plus -d, -D, -m and -M. ๐ฅ
Now, the TYPE field in OID TYPE VALUE is the one that decides how VALUE gets read ๐ Here are the possible TYPE characters (they're handled the same way as the snmpset command, periodt):
=โ lets OID decide how VALUE should be interpreted ๐ฎiโ INTEGER ๐ขuโ Unsigned ๐cโ Counter32 ๐sโ OCTET STRING of characters ๐ฌxโ OCTET STRING, entered as a sequence of optionally space separated hexadecimal digit pairs ๐dโ OCTET STRING, entered as a sequence of space-separated decimal digits in the range0 - 255๐nโ NULL ๐ซฅoโ OBJECT IDENTIFIER ๐ฆtโ TimeTicks โฑ๏ธaโ IpAddress ๐bโ BITS ๐งธ
๐ง EXAMPLES ๐ง
ngl this is the vibe. To send a generic linkUp trap to the manager for interface 1, run:
agentxtrap netSnmp.0.3 ifindex.1 i 1
๐ซถ SEE ALSO ๐ซถ
snmpcmd(1), snmpset(1), variables(5), RFC 2741 ๐
Bestie, that's the whole page! ๐ Net-SNMP V5.9.5.2, dated 20 Dec 2009 ๐ธ Stay iconic, stay curious, and don't forget to check your vibes ๐ญโจ
๐ฆ where this page comes from
- alpine 3.23: net-snmp-doc 5.9.5.2-r0 ยท Net-SNMP
- alpine 3.24: net-snmp-doc 5.9.5.2-r0 ยท Net-SNMP
- arch rolling: net-snmp 5.9.5.2-2 ยท BSD
- fedora 44: net-snmp 1:5.9.5.2-4.fc44 ยท MIT-CMU AND BSD-3-Clause AND MIT
- nixos 26.05: net-snmp 5.9.5.2
- nixpkgs unstable: net-snmp 5.9.5.2
- ubuntu stonking: snmp 5.9.5.2+dfsg-2.1ubuntu5
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms