TORRUS_ACTION_PRINTEMAIL(7)

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

πŸ’Œ 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/templates directory. 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