Sendmail Pager is able to send email alerts and notifications using the system sendmail command.
Sendmail Pager requires sendmail command to be present in $PATH.
Sendmail Pager supports following options, which may be used upon creation of a new pager object:
In addition, Sendmail Pager supports following generic pager settings:
alert() and
notify() methods
pager = SendmailPager(
sender='pyng <pingmaster@domain.example>',
target='user@domain.example',
headers={
'X-Pager': 'Sendmail',
},
)
# now you may use pager.alert() in the alert parameter in the checks,
# and pager.notify() in the notify paramter in the checks. alternatively,
# you may assign result of those methods to variables and use those in the
# checks
alerter = pager.alert()
notifier = pager.notify()
# alerter may be used in the alert parameter, and notifier in the notify parameter
# alert() and notify() methods will call send, with target
# given in alert() or notify(), or the default target given
# when creating the pager object
# calling send() may be used to test the pager
#pager.send('short summmary', 'longer message...')