Forge Home

motd

Detailed MOTD (message of the day) module

10,414 downloads

10,019 latest version

3.8 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

  • 1.1.0 (latest)
  • 1.0.1 (deleted)
  • 1.0.0
released Aug 5th 2015
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 'fnxdotlu-motd', '1.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add fnxdotlu-motd
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install fnxdotlu-motd --version 1.1.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
Tags: motd

Documentation

fnxdotlu/motd — version 1.1.0 Aug 5th 2015

motd

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with motd
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module installs you a nice looking motd. An additional script in /etc/profile.d will be added and the motd script itself (/usr/local/bin).

Module Description

The module consists of 2 templates, the motd script itself and the profile script which will be added to the /etc/profile.d/ directory. This script was mainly used in a foreman environment.

Setup

Beginning with motd

include '::motd' is enough to get you up and running. There are 2 parameters which can be set individually. Once the 'important' parameter, which adds basic information at the end of the MOTD. The second parameter which you can set is 'packages' where you can specify packages which have been installed on this specific server. Further details about the packages will be added to the MOTD using 'rpm -q'.

class { '::motd':
  packages  => [ 'puppet nfs-utils htop' ],
  important => [ 'This server is using prod envrionment for python!' ]
}

Usage

All interaction with the motd module can be done through the main motd class.

class { '::motd':
  packages  => [ 'puppet nfs-utils htop' ],
  important => [ 'This server is using prod envrionment for python!' ]
}

Dynamic values

Partitions and NICs will be autodetected and displayed dynamically. Here some examples: Partitions: ◢ PARTITION INFO ◣ ► Partition /dev/mapper/vg_ngmserver-lv_root: Size Free Used Mount 4.8G 4.2G 430M / ► Partition /dev/mapper/vg_ngmserver-lv_var: Size Free Used Mount 20G 19G 440M /var NICs: ◢ NETWORK INFO ◣ ► Interface eth0......: 192.168.1.10/24 ► Interface eth1......: 192.168.2.10/24

Colored important values

In order to identify very quickly important values, the following values will be shown in 3 different colors (green = good, yellow = warning, red = critical):

  • CPU load
  • Memory usage
  • Partitions

For the CPU load, the color will be changed to yellow whenever the load is higher then the half of your CPU cores. The color will be changed to red whenever the load is higher than your amount of CPU cores.

For the memory usage, the colow will be changed to yellow whenever the memory hits 80% of the entire memory size and above. The color will be changed to red whenever the memory hits 90% of the entire memory size and above.

For the partitions, the color will be changed to yellow whenever the used space hits 80% of the partition size and above. The color will be changed to red whenever the used space hits 90% of the partiton size and above.

Reference

Limitations

This script fully compatible and tested on CentOS 5,6 and RedHat 5,6. If you try this module on a different OS, please let me know if everything is working fine.

Development

For any updates / improvements / suggestions or just feedback, please let me know: puppet [at] fnx.lu

Change-log

v1.1.0

  • mode detailed README file.
  • fixing code quality