TORRUS_ACTION_PRINTEMAIL(7)
π TORRUS_ACTION_PRINTEMAIL β the torrus action page, bestie edition β¨
okay so you're in the TORRUS_ACTION_PRINTEMAIL(7) page of the torrus manual and honestly? this one's a lil cutie. it's the lil script that sends you an email when your monitor goes off. yes, like a text but for servers. iconic behaviour honestly π«Ά
πΈ NAME πΈ
action_printemail β a script for sending email from a monitor action. that's it, that's the whole job, and she does it flawlessly π
β¨ SYNOPSIS β¨
here's what it looks like living inside your XML config, bestie:
<action name="report-email">
<param name="action-type" value="exec" />
<param name="command">
$TORRUS_BIN/action_printemail | mail alarms@example.com
</param>
<param name="launch-when" value="set, clear" />
</action>
see how she's piped straight into mail? no cap, that's the whole vibe. π
π¦ DESCRIPTION π¦
so, real talk: this program is designed for usage from a monitor action only. she's not out here freelancing, she's got a job and she's doing it.
she takes her arguments from environment variables β as described in action-type "exec" in the Torrus XML Configuration Guide. lowkey that's her main food source. but ALSO, some values may be supplied via command-line arguments (scroll down to OPTIONS, babe, I got you).
now, the site-specific variables? those must be specified in the file email-siteconfig.pl. and here's the tea: default values are installed by the first run of make install. Subsequent runs of make install do not override this file. so if you're out here running make install like it's a morning routine, she's not touching your config again. she respects your boundaries π
π OPTIONS π
--url=GRAPHER-URLβ sets the URL of the grapher CGI script. give her the link, she'll use it. π--template=TEMPLATE-FILEβ uses given file as a template. heads up tho: the template file must reside in/usr/share/torrus/templatesdirectory. and it must be a Template-toolkit file, with these variables defined:
tree Tree name
token Leaf token
path Leaf path
url URL for browsing this leaf
ncomment This leaf comment
npcomment Leaf's parent comment
event Event type
monitor Monitor name
mcomment Monitor comment
timestamp Time and date of the event
env(VAR) Environment variable VAR
that's the whole roster of variables and she expects all of them, okay? no skips. β¨
π FILES π
/etc/torrus/conf/email-siteconfig.plβ Torrus site email configuration script. the sacred site-specific file. protect her at all costs π/usr/share/torrus/templatesβ Torrus template directories./etc/torrus/templatesβ Torrus template directories. (yes, two of them, she's got range)
π SEE ALSO π
torrus(8) β go read the big one, bestie, iykyk π
β NOTES β
see more documentation at Torrus home page: http://torrus.org β it's giving "extra reading for the girlies who want more" πΈ
π AUTHOR π
Stanislav Sinyagin <ssinyagin@k-open.com> β thank you for your service, king π
okay that's the whole page!! every flag, every file, every variable, nothing skipped, we ate and left no crumbs π₯
torrus 3.00 Β· 2023-05-02 Β· and that's the TORRUS_ACTION_PRINTEMAIL(7) footer energy, mwah π go send some emails, bestie!! π¦β¨
π¦ 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