Forge Home

unifiedlogs

This module attempt to offer a solution to application log access by mounting log directories via sshfs

9,996 downloads

8,084 latest version

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

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.1.5 (latest)
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Nov 11th 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 'brutus777-unifiedlogs', '0.1.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add brutus777-unifiedlogs
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install brutus777-unifiedlogs --version 0.1.5

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

brutus777/unifiedlogs — version 0.1.5 Nov 11th 2015

Table of Contents

  1. Overview
  2. Module Description
  3. Setup - The basics of getting started with unifiedlogs
  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 allows centrally sshfs-mounting of specific directories using Puppet exported resources.

Module Description

The module use sshfs userspace filesystem to mount via ssh directories from other nodes. The list of directories and nodes is mantained using Puppet exported resources.

I built this module to solve the problem of unified access to application logs via one single point. This module can be mixed with NFS or SAMBA to provide network based unified logs access.

Setup

What unifiedlogs affects

  • The unifiedlogs class will install sshfs on your system and configure sshfs mounts as puppet services.
  • The logs are not copied on the centralized system: the logs are only made available on the centralized system!!! If the application node dies, the logs will be unavailable.

Setup Requirements

Since the module is using exported resources it needs storeconfig enabled.

Beginning with unifiedlogs

On your application server nodes declare the unifiedlogs::exported class:

class { '::unifiedlogs::exported': dir => "/logs", user => "root", label => "LABEL", }

This has the effect of declaring an exported unifiedlogs::sshfsmount resource for directory "/logs" and user root (the user used for ssh access from the central server).

The label parameter is used to restrict the resource collection on the centralized logs server.

On the centralized logs server, include or declare the unifiedlogs class:

include ::unifiedlogs

or

class { '::unifiedlogs': hookdir => "/mnt", label => "LABEL", }

hookdir is the top directory where the sshfs mounts are created.

Usage

Class unifiedlogs has three params: hookdir, label and package_name (the second is required only if the module is used on a Linux distribution different from Debian/Ubuntu or RHEL/Centos).

Class unifiedlogs::exported has dir, label and user parameters explained above.

Reference

Defined types:

  • sshfsmount - the main code, it deals with creation of ssfhs mount service and of mount directory

Classes:

  • unifiedlogs - called on centralized log server
  • unifiedlogs::install - installs ssfhs package
  • unifiedlogs::service - collect the exported resources
  • unifiedlogs::exported - define the exported resources
  • unifiedlogs::params - default parameters

Limitations

Right now it is possible to export only one dir per node.

Development

Fork and contribute via PR.

Release Notes/Contributors/Etc Optional

First version, some bugs may exist.