Forge Home

report_slack2

Yet another slack report processor

21,248 downloads

2,241 latest version

4.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.3.1 (latest)
  • 0.3.0
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.1
  • 0.1.0
released Nov 26th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'udzura-report_slack2', '0.3.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add udzura-report_slack2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install udzura-report_slack2 --version 0.3.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

udzura/report_slack2 — version 0.3.1 Nov 26th 2020

puppet-report_slack2

Yet another slack report processor.

screen

Install && setup

Run:

puppet module install udzura-report_slack2
# or use librarian-puppet

Create config file /etc/puppet/slack.yaml as:

---
username: "puppet reporter"
webhook: "https://hooks.slack.com/services/YOUR/incoming-web-hook/AddRess!!!"
channels:
  - "#udzura_dev"
report_url: 'https://puppetdashboard.example.jp/reports'
http_proxy: 'http://proxy.example.com:3128' # Optionally specify an http proxy to use when posting to slack.

Puppet way, like this:


class { 'report_slack2' :
  username   => 'puppet reporter',
  webhook    => 'https://hooks.slack.com/services/YOUR/incoming-web-hook/AddRess!!!',
  channels   => [ "#udzura_dev" ],
  report_url => 'https://puppetdashboard.example.jp/reports',
}

Then set reporter:

[master]
...

report  = true
reports = store,slack

Reports URL

The reports URL can be left empty in the slack.yaml file for standalone setups and will appear in the Slack status message.

reports_url: ''

If a report URL is set to a non empty value it will be included in the Slac status message.

report_url: 'https://puppetdashboard.example.jp/reports'

The reports_url property also provides the ability to set interpolation of a hostname with self.host by using the %h sting within the reports_url value. In the example below %h will be replaced with ths hostname of provisioned host. To create a link directly to a focused reports section

reports_url: 'https://puppetdashboard.example.jp/%h/reports'

The above translates to something like https://puppetdashboard.example.jp/app001.example.jp/reports

Change what you want to notify

If you want to notify only failed status, you can set slack.yaml like the following:

statuses: 'failed'

or, you want to notify all statuses, set like the following:

statuses: 'changed,failed,unchanged'

See also

License

MIT.