Forge Home

cloudwatch

Installs AWS Cloudwatch advanced metrics

18,364 downloads

9,778 latest version

4.5 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.6.0 (latest)
  • 0.5.2
  • 0.5.1
  • 0.5.0
  • 0.4.0
  • 0.3.1
  • 0.3.0 (deleted)
  • 0.2.0
  • 0.1.2 (deleted)
  • 0.1.1
  • 0.1.0
released Oct 21st 2017
This version is compatible with:
  • , , , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'MasterRoot24-cloudwatch', '0.3.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add MasterRoot24-cloudwatch
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install MasterRoot24-cloudwatch --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

MasterRoot24/cloudwatch — version 0.3.1 Oct 21st 2017

cloudwatch

Table of Contents

  1. Description
  2. Setup - The basics of getting started with cloudwatch
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

Installs AWS Cloudwatch Monitoring Scripts and sets up a cron entry to push monitoring information to Cloudwatch every minute.

More info on the monitoring scripts can be found here.

Setup

What cloudwatch affects

Creates a crontab entry in order to routinely push metrics to Cloudwatch. This cron job defaults to being run as the user running Puppet or root.

The Cloudwatch montitoring scripts that this module installs are dependent on the following packages and they will be installed automatically:

  • RHEL/CentOS/Fedora:
    • perl-Switch
    • perl-DateTime
    • perl-Sys-Syslog
    • perl-LWP-Protocol-https
    • perl-Digest-SHA
    • unzip
  • Amazon Linux:
    • perl-Switch
    • perl-DateTime
    • perl-Sys-Syslog
    • perl-LWP-Protocol-https
    • unzip
  • Debian/Ubuntu:
    • libwww-perl
    • libdatetime-perl
    • unzip

Setup Requirements

Once this module has been installed and your manifest has been applied to your Puppet nodes, Cloudwatch metrics will be pushed every minute. You must setup AWS IAM credentials on your instances or assign an IAM role to your instances that has access to push data to Cloudwatch. More info on this can be found here.

Beginning with cloudwatch

Usage

  • Install the module: puppet module install MasterRoot24-cloudwatch
  • Include the module in your manifests: node 'my-node.example.com' { include cloudwatch }

Class cloudwatch

Parameters

access_key

The amazon user's access id that has permissions to upload cloudwatch data. Does not create the credentials file if this is left undef.
Default: undef

secret_key

The amazon user's secret key. Does not create the credentials file if this is left undef.
Default: undef

enable_mem_util

Collects and sends the MemoryUtilization metrics in percentages. This option reports only memory allocated by applications and the operating system, and excludes memory in cache and buffers.
Default: true

enable_mem_used

Collects and sends the MemoryUsed metrics, reported in megabytes. This option reports only memory allocated by applications and the operating system, and excludes memory in cache and buffers. Default: true

enable_mem_avail

Collects and sends the MemoryAvailable metrics, reported in megabytes. This option reports memory available for use by applications and the operating system.
Default: true

enable_swap_util

Collects and sends SwapUtilization metrics, reported in percentages.
Default: true

enable_swap_used

Collects and sends SwapUsed metrics, reported in megabytes.
Default: true

disk_path

Selects the disk on which to report. Can specify a mount point or any file located on a mount point for the filesystem that needs to be reported. For selecting multiple disks, specify a --disk-path=PATH for each one of them.

Example:

To select a disk for the filesystems mounted on / and /home, use the following parameters:

--disk-path=/ --disk-path=/home

Default: '/'

disk_space_util

Collects and sends the DiskSpaceUtilization metric for the selected disks. The metric is reported in percentages. Note, ignored if disk_path is undef.
Default: true

disk_space_used

Collects and sends the DiskSpaceUsed metric for the selected disks. The metric is reported by default in gigabytes. Note, ignored if disk_path is undef.
Default: true

disk_space_avail

Collects and sends the DiskSpaceAvailable metric for the selected disks. The metric is reported in gigabytes. Note, ignored if disk_path is undef.
Default: true

memory_units

Specifies units in which to report memory usage. UNITS may be one of the following: bytes, kilobytes, megabytes, gigabytes.
Default: 'megabytes'

disk_space_units

Specifies units in which to report disk space usage. UNITS may be one of the following: bytes, kilobytes, megabytes, gigabytes.
Default: 'gigabytes'

aggregated

Adds aggregated metrics for instance type, AMI ID, and overall for the region.
Default: false

aggregated_only

The script only aggregates metrics for instance type, AMI ID, and overall for the region.
Default: false

auto_scaling

Adds aggregated metrics for the Auto Scaling group.
Default: false

auto_scaling_only

The script reports only Auto Scaling metrics.
Default:false

cron_min

The minute at which to run the cron job. The default is cron runs every minute. To change to run every 5 minutes use '/5'.
Default: '
'

Limitations

Tested on CentOS 7, Debian 7, Debian 8, Ubuntu 12.04, Ubuntu 14.04 and Amazon Linux 2015.03. Tested with Puppet 4.x and 3.x.

Development

Please feel free to file an issue on the GitHub repo or create a PR if there's something here that you'd like to fix. I'll try to fix issues as and when they arise as soon as I can.

Release Notes/Contributors/Etc.

See the CHANGELOG.