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 at ADDRESS instead 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 range 0 - 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