I downloaded the latest version of puppetlabs/tagmail module and it worked for me in my agent nodes that had 3.8.4 installed. It doesn't work in nodes which have puppet version 4.5.2
Following is my setup:
Setup puppet.conf with these parameters for sending email:
[master]
reports = store, tagmail, smtp
report = true
pluginsync = true
tagmap = $confdir/tagmail.conf
[agent]
report = true
pluginsync = true
Setup tagmail.conf with these parameters to send an email whenever there are critical, emergency, alert, errors and warning level messages on the puppet agent run:
[transport]
reportfrom = puppeterrorinfo.noreply@example.com
smtpserver = notesmta.example.com
smtpport = 25
smtphelo = domainname.com
[tagmap]
crit,emerg,alert,err,warning: test@domainname.com
Please let me know what's wrong and how to fix it.
↧