Puppet module to install Xymon
Go to file
gardouille 976812790b Publish the version 0.1.0 to the puppetlabs forge: https://forge.puppetlabs.com/gardouille/xymon/scores 2015-02-17 16:45:15 +01:00
files/client Edit the hobbit-plugins Debian package to remove the dependancy to 2015-02-16 17:52:55 +01:00
lib/facter The list of accepted packages not from apt repo is automatically 2015-02-16 18:42:21 +01:00
manifests xymon::client::config : Add a list of accepted packages not installed 2015-02-16 18:38:55 +01:00
spec first commit 2015-02-09 14:04:56 +01:00
templates/client The list of accepted packages not from apt repo is automatically 2015-02-16 18:42:21 +01:00
tests first commit 2015-02-09 14:04:56 +01:00
.gitignore Publish the version 0.1.0 to the puppetlabs forge: https://forge.puppetlabs.com/gardouille/xymon/scores 2015-02-17 16:45:15 +01:00
CHANGELOG.md Publish the version 0.1.0 to the puppetlabs forge: https://forge.puppetlabs.com/gardouille/xymon/scores 2015-02-17 16:45:15 +01:00
Gemfile first commit 2015-02-09 14:04:56 +01:00
README.md Update README.md 2015-02-17 15:12:25 +01:00
Rakefile first commit 2015-02-09 14:04:56 +01:00
metadata.json first commit 2015-02-09 14:04:56 +01:00

README.md

xymon

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Reference
  6. Other notes
  7. Limitations
  8. Development
  9. License

Overview

The Xymon module provide a simple way to manage the last version of Xymon (client only right now) based on the packages provide by the Xymon project (deb files but could be rpm if passed as argument).

Module Description

The xymon module automates installing Xymon on systems.

Setup

What xymon affects

  • Package/service/configuration files for Xymon.
  • Recommends and suggests packages for Xymon-plugins (aka hobbit-plugins).

Beginning with xymon

To begin using xymon module with default parameters, declare the client class (server not yet available):

include xymon::client

If you manage the sudoers with Puppet or a module (saz-sudo for example), you should add permissions for the Xymon user to be able to run some additional plugins:

sudo::conf { 'xymon':
  content  => "xymon ALL=(root) NOPASSWD: /usr/bin/lsof -n -FpcLfn0
  xymon ALL=(root) NOPASSWD: /usr/bin/debsums -ec
  xymon ALL=(backuppc) SETENV:NOPASSWD: /usr/lib/xymon/client/ext/backuppc
  xymon ALL=(list) SETENV:NOPASSWD: /usr/lib/xymon/client/ext/mailman",
}

Usage

Client

Define the server

You should define the array of servers:

node 'first.toto' {
  class { 'xymon::client':
    list_server => [ '192.168.0.10' ],
  }
}

node 'second.toto' {
  class { 'xymon::client':
    list_server => [ '127.0.0.1', '192.168.0.10' ],
  }
}

Note: list_server must be an array even if you have only one Xymon server.

Disable additional plugins

Debian family comes with somes plugins for Xymon, but i don't know if it's available for other OS, so to disable it:

class {
  plugin_pkg_ensure => 'absent',
}

Reference

Public classes

  • xymon: Main class, do nothing right now.
  • xymon::client: Install and manage Xymon client.

Private classes

  • xymon::client::preconfig: Build the dl_url and pkg_name, with the parameters, to download the Xymon client package.
  • xymon::client::install: Install the packages.
  • xymon::client::config: Manage the configuration files.
  • xymon::client::service: Manage the Xymon client service.

Parameters

xymon::client

  • download_dir: The directory to store Xymon packages. Defaults to '/opt/xymon/packages'.
  • download_url: The URL to download Xymon client package. Should not be complete: http://www.download/path/to/4.3.17/ will work but http://www.download/path/to/4.3.17/package.deb will not work. You must use the package_name variable. Defaults to 'undef'.
  • new_version: The version of Xymon to download. Defaults to '4.3.17'.
  • package_name: The Xymon client's package name to download and install. Defaults to undef.
  • pkg_ensure: What to set the Xymon client package to. Can be 'present' or 'absent'. Defaults to 'present'.
  • pkg_provider: The provider used to install Xymon client package. Defaults to 'dpkg'.
  • service_enabled: If set to 'true', Puppet will ensure the Xymon client's service is running. Can be 'true' or 'false'. Defaults to 'true'.
  • service_managed: If set to 'true', Puppet will manage the Xymon client's service. Can be 'true' or 'false'. Defaults to 'true'.
  • service_name: Xymon client's service name. Defaults to 'xymon-client'.
  • service_default_path: Path of the configuration file read by the Xymon client service. Defaults to '/etc/default/xymon-client'.
  • service_default_tpl: Template file used to generate the system default file. Defaults to 'xymon/client/default.service.erb'.
  • service_path: Path of the init script. Defaults to '/etc/init.d/xymon-client'.
  • service_tpl: Template file used to generate the init script. Defaults to 'xymon/client/xymon-client.deb_service.erb'.
  • main_cfg_path: Path to the main configuration file. Defaults to '/etc/xymon/xymonclient.cfg'.
  • main_cfg_tpl: Template file used to generate the main configuration file. Defaults to 'xymon/client/xymonclient.cfg.erb'.
  • list_server: List of IP-addresses of Xymon servers. Data will be sent to all of the servers listed here. Should be an array. Defaults to [ '127.0.0.1' ].
  • plugin_sug_pkg_name: The list of suggests packages for Xymon-plugins (hobbit-plugins). Defaults to [ 'dctrl-tools', 'libsort-naturally-perl', 'libyaml-tiny-perl', 'lsb-release', 'lsof', 'debsums', 'fping', 'liblist-moreutils-perl', 'libsysadm-install-perl', 'libtimedate-perl', 'dphys-config' ].
  • plugin_download_url:
  • plugin_pkg_name: The Xymon-plugins package name. Defaults to 'hobbit-plugins'.
  • plugin_pkg_source: The local source file to provide the plugin package. Defaults to 'puppet:///modules/xymon/client/hobbit-plugins_20141201_all_gardouille.deb'.
  • plugin_pkg_ensure: What to set the Xymon plugins packages to. Can be 'present' or 'absent'. Defaults to 'present'.
  • plugin_pkg_provider: The provider used to install Xymon plugins package. Defaults to 'dpkg'.
  • apt_accept_path: Path of the accepted list of packages not installed from Debian repositories. Defaults to '/etc/xymon/apt_no_repo_accept'.
  • apt_accept_tpl: Template used to generate the accepted packages. Defaults to 'xymon/client/apt_no_repo_accept.erb'.

Other notes

  • The module does not compile the sources, it could be a feature in few times for more compatibility if enough people interested.
  • I repack the hobbit-plugins package because the Debian's package depends on Xymon 4.3.17-2~ (-2~ prevents the installation).

Limitations

This is where you list OS compatibility, version compatibility, etc.

Development

Free to send contributions, fork it, ...

License

WTFPL (http://wtfpl.org/)