xymon/README.md

151 lines
6.0 KiB
Markdown
Raw Normal View History

2015-02-09 14:04:56 +01:00
# xymon
#### Table of Contents
1. [Overview](#overview)
2015-02-17 15:12:25 +01:00
2. [Module Description](#module-description)
3. [Setup](#setup)
2015-02-09 14:04:56 +01:00
* [What xymon affects](#what-xymon-affects)
2015-02-17 15:12:25 +01:00
* [Beginning with Xymon](#beginning-with-xymon)
4. [Usage](#usage)
* [Client](#client)
5. [Reference](#reference)
* [Public classes](#public-classes)
* [Private classes](#private-classes)
* [Parameters](#parameters)
6. [Other notes](#other-notes)
7. [Limitations](#limitations)
8. [Development](#development)
9. [License](#license)
2015-02-09 14:04:56 +01:00
## Overview
2015-02-17 15:12:25 +01:00
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).
2015-02-09 14:04:56 +01:00
## Module Description
2015-02-17 15:12:25 +01:00
The xymon module automates installing Xymon on systems.
2015-02-09 14:04:56 +01:00
## Setup
### What xymon affects
2015-02-17 15:12:25 +01:00
* Package/service/configuration files for Xymon.
* Recommends and suggests packages for Xymon-plugins (aka hobbit-plugins).
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
### Beginning with xymon
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
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:
```puppet
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",
}
```
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
## Usage
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
### Client
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
#### Define the server
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
You should define the array of servers:
```
node 'first.toto' {
class { 'xymon::client':
list_server => [ '192.168.0.10' ],
}
}
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
node 'second.toto' {
class { 'xymon::client':
list_server => [ '127.0.0.1', '192.168.0.10' ],
}
}
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
```
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
**Note**: `list_server` must be an array even if you have only one Xymon server.
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
#### 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
-----------
2015-02-09 14:04:56 +01:00
This is where you list OS compatibility, version compatibility, etc.
2015-02-17 15:12:25 +01:00
Development
-----------
Free to send contributions, fork it, ...
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
License
-------
2015-02-09 14:04:56 +01:00
2015-02-17 15:12:25 +01:00
WTFPL (http://wtfpl.org/)
2015-02-09 14:04:56 +01:00