Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.0 < 7.0.0
- , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'dodevops-xymon', '1.1.2'
Learn more about managing modules with a PuppetfileDocumentation
Puppet Xymon module
Introduction
This module manages several aspects of the Xymon Monitoring Suite.
Current features include:
- Xymon agent installation and configuration for Debian, RedHat and SuSE Linux distributions
- Installation and configuration of custom Xymon monitors and prerequisites
Usage
See the REFERENCE page for details on the available classes.
Development
If you've found any bugs or require new features, please don't hesitate to open an issue in this repository.
If you can fix the issue yourself, please open a Pull Request as well. Thanks for your support.
Creating a release
- Configure the target version in metadata.json
- Run
bundler exec puppet strings generate --format markdown --out REFERENCE.md
to update the reference documentation - Run
CHANGELOG_GITHUB_TOKEN=<github-token> bundler exec rake changelog
to update the changelog - Push the changes and create a release in GitHub
- Travis will test the release and push the new version to Puppet Forge
Reference
Table of Contents
Classes
xymon::client
: Installs Xymon client, configures it and optionally sets up monitorsxymon::repository::apt
: Install the APT repository, key (optionally) and the pacakgexymon::repository::yum
: Install the YUM repository, key (optionally) and the pacakgexymon::repository::zypper
: Install the Zypper repository, key (optionally) and the pacakge
Defined types
xymon::client::monitor
: Sets up a xymon monitor
Classes
xymon::client
Installs Xymon client, configures it and optionally sets up monitors
Examples
class {
'xymon::client':
repository_url = 'https://my.repository.company.com/repo',
xymon_server = 'xymon.company.com',
gpg_url = 'https://my.repository.company.com/gpg',
gpg_id = '6688A3782BBFE5A4',
monitors = {
'mycheck' => {
script_source => 'puppet:///my/script.sh'
arguments => [
'--yellow=80',
'--red=90',
'--check-values=/etc/xymon/files/rootcheck.cfg
],
sudo: {
'rootcheck' => {
content => 'xymon ALL=(ALL) NOPASSWD: /usr/bin/rootcheck',
}
},
packages => {
'rootcheck' => { ensure => 'latest' },
},
files => {
'rootcheck.cfg' => {
source => 'puppet:///my/rootcheck.cfg',
mode => '0600',
},
'mysql_connection.mycfg => {
template => 'my/mysql_connection/mysql_connection.cfg.epp,
mode => '0600',
vars => {
host => 'foo.bar.com',
user => 'fancydbuser',
password => 'fancypassword', # eyaml recommended here!
}
}
},
logrotate => {
path => '/var/log/xymon/script.log',
size => '20M',
rotate => 5,
}
}
}
Parameters
The following parameters are available in the xymon::client
class:
xymon_server
manage_repository
include_clientlaunch_d
config_file
package
service_name
xymon_config_dir
xymon_user
xymon_group
repository_url
gpg_url
gpg_id
monitors
client_name
clientlaunch_config
files_path
xymon_server
Data type: String
The xymon server to use
manage_repository
Data type: Boolean
Manage the repository for package installation
Default value: true
include_clientlaunch_d
Data type: Boolean
If set to true, it is ensured, that directory "clientlaunch.d" is included in clientlaunch.cfg - some xymon packages miss to do so. If set to false, clientlaunch.cfg will not be touched (an existing directory include statement will not be removed, but also not be added, if it is missing).
Default value: false
config_file
Data type: String
Path to the xymon-client configuration file
Default value: '/etc/default/xymon-client'
package
Data type: String
Package name
Default value: 'xymon-client'
service_name
Data type: String
Service name
Default value: 'xymon-client'
xymon_config_dir
Data type: String
Directory where the xymon configs are stored
Default value: '/etc/xymon'
xymon_user
Data type: String
The system user that is used by xymon
Default value: 'xymon'
xymon_group
Data type: String
The system group that is used by xymon
Default value: 'xymon'
repository_url
Data type: Optional[String]
URL of the repository that contains the xymon-client
Default value: undef
gpg_url
Data type: Optional[String]
URL of the GPG key
Default value: undef
gpg_id
Data type: Optional[String]
Key id of the gpg key (Required by apt)
Default value: undef
monitors
Data type: Optional[Hash]
A hash of tests to configure
Options:
- :script_source
String
: A Puppet file source to the script for the monitor - :clientlaunch_config
String
: Path to the Xymon clientlaunch path. - :files_path
String
: Path to the a path for additional files. - :xymon_user
String
: Xymon user. - :xymon_group
String
: Xymon group. - :xymon_service
String
: Xymon service name. - :interval
String
: A valid Xymon client interval string when to run the script - :arguments
Array[String]
: A list of command line arguments to start the script with - :require_fqdn
String
: Require that the agent has the specified FQDN for the monitor to be installed - :files
Hash
: A hash of filenames as key and sources as values to add to the xymon files - :sudo
Hash
: A sudo::conf hash with sudo definitions the xymon user should be allowed to use - :packages
Hash
: A puppet package hash with packages that are required for the monitor to work - :logrotate
Hash
: A hash containing definitions to configure logfile rotation
Default value: undef
client_name
Data type: Optional[String]
Name of the client (defaults to the FQDN)
Default value: undef
clientlaunch_config
Data type: Optional[String]
Path ot the clientlaunch configuration directory (defaults to $xymon_config_dir/clientlaunch.d)
Default value: undef
files_path
Data type: Optional[String]
A path where to store additional files required by the monitors (defaults to $xymon_config_dir/files)
Default value: undef
xymon::repository::apt
Install the APT repository, key (optionally) and the pacakge
Parameters
The following parameters are available in the xymon::repository::apt
class:
repository_url
Data type: String
URL of the repository that contains the xymon-client
package
Data type: String
Package name
gpg_url
Data type: Optional[String]
URL of the GPG key
Default value: undef
gpg_id
Data type: Optional[String]
Key id of the gpg key
Default value: undef
xymon::repository::yum
Install the YUM repository, key (optionally) and the pacakge
Parameters
The following parameters are available in the xymon::repository::yum
class:
repository_url
Data type: String
URL of the repository that contains the xymon-client
package
Data type: String
Package name
gpg_url
Data type: Optional[String]
URL of the GPG key for Debian repositories
Default value: undef
xymon::repository::zypper
Install the Zypper repository, key (optionally) and the pacakge
Parameters
The following parameters are available in the xymon::repository::zypper
class:
repository_url
Data type: String
URL of the repository that contains the xymon-client
package
Data type: String
Package name
gpg_url
Data type: Optional[String]
URL of the GPG key
Default value: undef
Defined types
xymon::client::monitor
Sets up a xymon monitor
- See also
- https://forge.puppet.com/saz/sudo
- Sudo component package used
- https://forge.puppet.com/modules/puppet/logrotate
- Logrotate component package used
- https://forge.puppet.com/saz/sudo
Parameters
The following parameters are available in the xymon::client::monitor
defined type:
clientlaunch_config
files_path
xymon_user
xymon_group
xymon_service
ensure
arguments
interval
crondate
require_fqdn
script_source
script_template
script_vars
files
sudo
packages
logrotate
ensure_packages
cron_date
clientlaunch_config
Data type: String
Path to the Xymon clientlaunch path. Will be provided by xymon::client automatically
Default value: $xymon::client::actual_clientlaunch_config
files_path
Data type: String
Path to the a path for additional files. Will be provided by xymon::client automatically
Default value: $xymon::client::actual_files_path
xymon_user
Data type: String
Xymon user. Will be provided by xymon::client automatically
Default value: $xymon::client::xymon_user
xymon_group
Data type: String
Xymon group. Will be provided by xymon::client automatically
Default value: $xymon::client::xymon_group
xymon_service
Data type: String
Xymon service name. Will be provided by xymon::client automatically
Default value: $xymon::client::service_name
ensure
Data type: Enum['present', 'absent']
Ensure if monitor is either present or absent
Default value: 'present'
arguments
Data type: Array[String]
A list of command line arguments to start the script with
Default value: []
interval
Data type: Optional[String]
A valid Xymon client interval string when to run the script. If neither interval nor crondate is set, interval is set to a default of 5m
Default value: undef
crondate
A cron time expression as an alternative to the interval parameter
require_fqdn
Data type: Optional[String]
Require that the agent has the specified FQDN for the monitor to be installed
Default value: undef
script_source
Data type: Optional[String]
A Puppet file source to the script for the monitor (mutually exclusive with script_template)
Default value: undef
script_template
Data type: Optional[String]
A Puppet file source to the script for the monitor (mutually exclusive with script_source)
Default value: undef
script_vars
Data type: Optional[Hash]
A hash of variables for script_template (if used)
Default value: undef
files
Data type: Optional[Hash]
A hash of filenames as key and sources as values to add to the xymon files
Options:
- :source
String
: A Puppet file source for the additional file for the monitor (mutually exclusive with template) - :template
String
: A Puppet template for the additional file for the monitor (mutually exclusive with source) - :vars
Hash
: A hash of variables used in the template - :mode
String
: file mode of the additional file for the monitor - :owner
String
: owner of the additional file for the monitor - :group
String
: group of the additional file for the monitor
Default value: undef
sudo
Data type: Optional[Hash]
A sudo::conf hash with sudo definitions the xymon user should be allowed to use
Default value: undef
packages
Data type: Optional[Hash]
A puppet package hash with packages that are required for the monitor to work
Default value: undef
logrotate
Data type: Optional[Hash]
A hash containing definitions to configure logfile rotation
Options:
- :path
String
: path for the file to logrotate - :size
String
: file size threshold when to rotate (human readable format accepted) - :rotate
Integer
: how many times the log is rotated until it is deleted
Default value: undef
ensure_packages
Data type: Optional[Enum['present', 'absent']]
Ensure that installed packages from the packages repository are present or absent (defaults to the value of the ensure-parameter)
Default value: undef
cron_date
Data type: Optional[String]
Default value: undef
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.1.2 (2024-04-02)
Fixed
v1.1.1 (2023-07-21)
Fixed
v1.1.0 (2023-07-21)
Added
v1.0.2 (2023-06-15)
UNCATEGORIZED PRS; GO LABEL THEM
v1.0.1 (2022-02-03)
Fixed
- fix: Fixed kitchen tests #9 (timdeluxe)
- fix: Take care of clientlaunch.d include on Suse #8 (timdeluxe)
v1.0.0 (2021-07-27)
Added
v0.4.4 (2021-07-19)
Fixed
v0.4.3 (2021-05-31)
Added
v0.4.1 (2021-02-19)
Added
v0.4.0 (2021-02-19)
v0.3.0 (2021-02-17)
Added
- Improvement of additional monitor files management improvement, refactoring package installation and fixing zypprepo dependency #2 (timdeluxe)
0.3.0pre2 (2021-02-04)
0.3.0pre (2021-02-04)
Added
v0.2.0 (2020-04-15)
v0.1.0 (2020-04-15)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>=4.25.1 < 10.0.0)
- puppetlabs/apt (>=4.5.1 < 10.0.0)
- saz/sudo (>=6.0.0 < 9.0.0)
- puppet/zypprepo (>=2.2.2 < 5.0.0)
- puppetlabs/yumrepo_core (>=1.0.6 < 2.0.0)
- puppet-logrotate (>=4.0.0 < 8.0.0)
MIT License Copyright (c) 2020 DO! DevOps Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.