Ask Your Question

how to use tagmail

asked 2016-06-01 16:30:59 -0600

Please let me know how to use tagmail module to get emails only if there's an error in the puppet agent run. I read through the tagmail Readme in the forge and couldn't get answers to that. I understand the puppet.conf setting.

My question is: How can i send an email to a recipient if the puppet agent run exits with a failure. Please provide examples of how i can use tags. There isn't much help on the internet on this.

Many thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-02 05:49:02 -0600

c4f4t0r gravatar image

updated 2016-06-06 16:30:20 -0600

Without using module I did something like this, in my puppet master config:

reports = store, tagmail

Now you need to set for what kind of tag you wan to receive the alerts, in /etc/puppet/tagmail.conf


That's all, if you want to receive only alerts for a resource, try to use tag meta attribue

If you are using puppet master > 3.8 version, you need puppetlabs-tagmail module, if you want to receive only errors:

Puppet's loglevels (debug, info, notice, warning, err, alert, emerg, crit, and verbose) can also be used as tags, and the all tag always matches every log message.
edit flag offensive delete link more


Thanks for the response. I would like to know what tag to use to get emails only on failures of puppet agent runs.

Redsmile gravatar imageRedsmile ( 2016-06-02 09:36:03 -0600 )edit

@Induja I edited my answer for more information.

c4f4t0r gravatar imagec4f4t0r ( 2016-06-06 16:31:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-06-01 16:30:59 -0600

Seen: 242 times

Last updated: Jun 06 '16