Forge Home

report_hipchat

A Puppet report handler for sending notifications of failed runs to HipChat

34,660 downloads

6,590 latest version

5.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

  • 2.0.0 (latest)
  • 1.1.0
  • 1.0.5
  • 1.0.4
released Nov 16th 2017
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.1 < 6.0.0
  • , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'puppet-report_hipchat', '2.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-report_hipchat
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-report_hipchat --version 2.0.0

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

puppet/report_hipchat — version 2.0.0 Nov 16th 2017

Puppet Hipchat

Puppet Forge Puppet Forge downloads Puppet Forge score Build Status

Description

A Puppet report handler for sending notifications of Puppet runs to HipChat.

TravisCI status

Build Status

Requirements

  • hipchat >= 0.12.0
  • puppet >= 4.6.1
  • puppetserver >= 2

Obtaining Hipchat Auth Token

For the room in which you want to receive puppet notifications, add a new BYO Integration. This will return an example url: https://example.hipchat.com/v2/room/123456789/notification?auth_token=WzP0dc4oEESuSmF2WJT23GtL5mili9uXof73M48S https://example.hipchat.com is the server (you can use on premise hipchat servers as well) v2 is the api version 123456789 is the room WzP0dc4oEESuSmF2WJT23GtL5mili9uXof73M48S is the api_key

Usage / Installation

class { 'report_hipchat':
  server         => 'https://example.hipchat.com',
  api_version    => 'v2',
  api_key        => 'WzP0dc4oEESuSmF2WJT23GtL5mili9uXof73M48S',
  room           => '123456789',
  install_hc_gem => true,
  provider       => 'puppetserver_gem',
}

With puppetboard link:

class { 'report_hipchat':
  server         => 'https://example.hipchat.com',
  api_version    => 'v2',
  api_key        => 'WzP0dc4oEESuSmF2WJT23GtL5mili9uXof73M48S',
  room           => '123456789',
  install_hc_gem => true,
  provider       => 'puppetserver_gem',
  puppetboard    => 'https://puppetboard.test.local',
}

With dashboard link:

class { 'report_hipchat':
  server         => 'https://example.hipchat.com',
  api_version    => 'v2',
  api_key        => 'WzP0dc4oEESuSmF2WJT23GtL5mili9uXof73M48S',
  room           => '123456789',
  install_hc_gem => true,
  provider       => 'puppetserver_gem',
  dashboard      => 'https://dashboard.test.local',
}

Proxy

class { 'report_hipchat':
  server         => 'https://example.hipchat.com',
  api_version    => 'v2',
  api_key        => 'WzP0dc4oEESuSmF2WJT23GtL5mili9uXof73M48S',
  room           => '123456789',
  install_hc_gem => true,
  provider       => 'puppetserver_gem',
  proxy          => 'http://proxy.test.local:8080',
}

Provider

Deprecated. Only puppetserver_gem is supported.

Configure the report in puppet.conf

# on puppet master
ini_setting {'pluginsync-master':
  ensure  => present,
  path    => '/etc/puppetlabs/puppet/puppet.conf',
  section => 'master',
  setting => 'pluginsync',
  value   => 'true', 
  notify  => Service['puppetserver'],
}
ini_setting {'report':
  ensure  => present,
  path    => '/etc/puppetlabs/puppet/puppet.conf',
  section => 'master',
  setting => 'report',
  value   => 'true', 
  notify  => Service['puppetserver'],
}       
ini_setting {'reports':
  ensure  => present,
  path    => '/etc/puppetlabs/puppet/puppet.conf',
  section => 'master',
  setting => 'reports',
  value   => 'hipchat',
  notify  => Service['puppetserver'],
} 

# on puppetmaster and agents
ini_setting {'pluginsync-agent':
  ensure  => present,
  path    => '/etc/puppetlabs/puppet/puppet.conf',
  section => 'agent',
  setting => 'pluginsync',
  value   => 'true',
  notify  => Service['puppetserver'],
} 

Result:

[master]
report = true
reports = hipchat
pluginsync = true
[agent]
report = true

Params

api_key:        Hipchat API key String[required]
api_version:    Hipchat API version: String[default: 'v1']
room:           Hipchat Room String[required]
notify_room:    Notify room: Boolean[default: false]
notify_color:   Notification Color: String[default: 'red'] options['red', 'green', 'purple', 'random']
statuses:       Array of statuses to notify: Array[Defailt ['failed'] ], options['failed', 'all']
server:         Hipchat Sever String[default: 'https://api.hipchat.com']
config_file:    Hipchat config file: String[default: "{confdir}/hipchat.yaml"]
owner:          hipchat.conf owner: String[default: Varies based on puppet version]
group:          hipchat.conf group: String[default: Varies based on puppet version]

package_name:   Hipchat gem: String[default: 'hipchat']
install_hc_gem: Install Hipchat Gem: Boolean[default: Varies based on puppet version]
provider:       Package Provider to use: String[default: Varies based on puppet version]

puppetboard:    URL to puppetboard: String[optional]
dashboard:      URL to dashboard: String[optional]
proxy:          proxy url and port to reach hipchat: String[optional] Format: 'http://username:password@proxy_host:proxy_port'

NOTE FOR PUPPETBOARD 1.1.2+ USERS:

if you are using environments other than production you will need to either configure puppetboard default environment to * or set hipchat_server to append /%2A, ex: :hipchat_server: http://hipchat.test.local/%2A otherwise you will receive a not found error for any nodes in environments other than production.

Disabling notifcations temporarily

  • To temporarily disable HipChat notifications add a file named hipchat_disabled in the same path as hipchat.yaml. Removing it will re-enable notifications.

    $ touch /etc/puppet/hipchat_disabled

Team

Maintainer: James Powis

Original author: James Turnbull james@lovedthanlost.net

License

Author:: James Turnbull (<james@lovedthanlost.net>)
Copyright:: Copyright (c) 2011 James Turnbull
License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.