TORRUS_ACTION_SNMPTRAP(7)

πŸ“¦
version 3.00 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– TORRUS_ACTION_SNMPTRAP πŸ’–

okay bestie, so this is a page from the torrus manual β€” section 7, which means it's all about programs and scripts, not syscalls. sit down, grab a strawberry πŸ“, we're talking about SNMP traps.


✨ NAME ✨

action_snmptrap, action_snmpv1trap β€” these are the scripts that send SNMP traps from a monitor action, no cap. πŸ’…

  • action_snmptrap sends version 2c traps.
  • action_snmpv1trap sends version 1 traps.
not me having to say this but: action_snmpv1trap is obsolete, because the preferred SNMP version is 2c. it's giving legacy. πŸ™ˆ

🌸 SYNOPSIS 🌸

<action name="snmptrap">
  <param name="action-type" value="exec" />
  <param name="command" value="$TORRUS_BIN/action_snmptrap" />
  <param name="launch-when" value="set, clear" />
</action>

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this program is designed for usage from a monitor action only. it's not a "run it whenever you feel like it" situation, it's a "torrus monitor calls me and I do my thing" situation. πŸ‘‘

it takes its arguments from environment variables, exactly as described in action-type exec in the Torrus XML Configuration Guide. and in addition to all that, some values may be supplied via command-line arguments β€” scroll down to OPTIONS for the full menu, bestie. ✨

site-specific variables have to be specified in the file snmptrap-siteconfig.pl. the default values get installed by the first run of make install. and this is the important bit: subsequent runs of make install do not override this file. so once you've customized it, it's yours, she's protected, main character energy. 🫢


πŸ’… OPTIONS πŸ’…

one bullet per option, all facts preserved, let's goooo:

  • --host=HOSTNAME β€” sets the hostname of the destination host. that's where the trap is going, periodt. πŸ“
  • --community=COMMUNITY β€” sets the community string to use when sending the trap. yes, the community string, that little shared secret vibe. πŸ”‘
  • --port=PORT β€” sets the destination UDP port. 🌈
  • --enterprise=OID β€” sets the "enterprise" field of the SNMPv1 trap to a given OID. (see RFC 1157 for more details, iykyk.) ⚠️ this option is only available for action_snmpv1trap and will be ignored for action_snmptrap. so if you're on 2c, she simply does not hear you. πŸ’€
  • --severity=SEVERITY β€” sets the optional severity SNMP variable to some integer value. it's optional, so no pressure, but she's there if you want her. ⭐

πŸŽ€ FILES πŸŽ€

  • /etc/torrus/conf/snmptrap-siteconfig.pl β€” the Torrus site configuration script for SNMP traps. this is the one you edit, bestie. don't lose her. 🌸

🌈 SEE ALSO 🌈

  • torrus(8) β€” go read that too, fr fr. πŸ“š

⭐ NOTES ⭐

see more documentation at the Torrus home page: http://torrus.org πŸ¦‹


πŸ‘‘ AUTHOR πŸ‘‘

Stanislav Sinyagin <ssinyagin@k-open.com> β€” the icon who wrote this. we stan. πŸ’œ


and that's the whole page, bestie!! this was torrus 3.00, dated 2023-05-02, and it lives in the TORRUS_ACTION_SNMPTRAP(7) section of the manual. go forth and trap responsibly, mwah πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from