summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornfagerlund <nick.fagerlund@gmail.com>2011-08-09 15:51:24 -0700
committernfagerlund <nick.fagerlund@gmail.com>2011-08-09 15:56:45 -0700
commit76d45d22ad134d73e4a2b9b8abbc1955784c0a93 (patch)
tree21c9ba6091bee3632d67babb4f7be176d37a579d /lib
parentd60852bf8e0ce7dfb0941d0f2d44aa3792421e97 (diff)
downloadpuppet-76d45d22ad134d73e4a2b9b8abbc1955784c0a93.tar.gz
puppet-76d45d22ad134d73e4a2b9b8abbc1955784c0a93.tar.xz
puppet-76d45d22ad134d73e4a2b9b8abbc1955784c0a93.zip
(#7853) Clarify and complete docs for the tagmail report processor
The tagmail report docs did not mention that you could use log levels as tags, and was unclear in several other minor ways. This commit improves that documentation.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/reports/tagmail.rb26
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/puppet/reports/tagmail.rb b/lib/puppet/reports/tagmail.rb
index e17143e2f..c37341e11 100644
--- a/lib/puppet/reports/tagmail.rb
+++ b/lib/puppet/reports/tagmail.rb
@@ -8,21 +8,24 @@ Puppet::Reports.register_report(:tagmail) do
desc "This report sends specific log messages to specific email addresses
based on the tags in the log messages.
- See the [UsingTags tag documentation](http://projects.puppetlabs.com/projects/puppet/wiki/Using_Tags) for more information on tags.
+ See the [documentation on tags](http://projects.puppetlabs.com/projects/puppet/wiki/Using_Tags) for more information.
- To use this report, you must create a `tagmail.conf` (in the location
- specified by `tagmap`). This is a simple file that maps tags to
+ To use this report, you must create a `tagmail.conf` file in the location
+ specified by the `tagmap` setting. This is a simple file that maps tags to
email addresses: Any log messages in the report that match the specified
tags will be sent to the specified email addresses.
- Tags must be comma-separated, and they can be negated so that messages
- only match when they do not have that tag. The tags are separated from
- the email addresses by a colon, and the email addresses should also
- be comma-separated.
+ Lines in the `tagmail.conf` file consist of a comma-separated list
+ of tags, a colon, and a comma-separated list of email addresses.
+ Tags can be !negated with a leading exclamation mark, which will
+ subtract any messages with that tag from the set of events handled
+ by that line.
- Lastly, there is an `all` tag that will always match all log messages.
+ Puppet's log levels (`debug`, `info`, `notice`, `warning`, `err`,
+ `alert`, `emerg`, `crit`, and `verbose`) can also be used as tags,
+ and there is an `all` tag that will always match all log messages.
- Here is an example `tagmail.conf`:
+ An example `tagmail.conf`:
all: me@domain.com
webserver, !mailserver: httpadmins@domain.com
@@ -30,8 +33,9 @@ Puppet::Reports.register_report(:tagmail) do
This will send all messages to `me@domain.com`, and all messages from
webservers that are not also from mailservers to `httpadmins@domain.com`.
- If you are using anti-spam controls, such as grey-listing, on your mail
- server you should whitelist the sending email (controlled by `reportform` configuration option) to ensure your email is not discarded as spam.
+ If you are using anti-spam controls such as grey-listing on your mail
+ server, you should whitelist the sending email address (controlled by
+ `reportform` configuration option) to ensure your email is not discarded as spam.
"
# Find all matching messages.