TORRUS_ACTION_SNMPTRAP(7)
π 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_snmptrapsends version 2c traps.action_snmpv1trapsends 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 foraction_snmpv1trapand will be ignored foraction_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
- debian bookworm: torrus-common 3.00-2
- debian trixie: torrus-common 3.00-2
- ubuntu noble: torrus-common 3.00-2
- ubuntu questing: torrus-common 3.00-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms