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
xymon::client::monitor
: Sets up a xymon monitor
Installs Xymon client, configures it and optionally sets up monitors
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,
}
}
}
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
Data type: String
The xymon server to use
Data type: Boolean
Manage the repository for package installation
Default value: true
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
Data type: String
Path to the xymon-client configuration file
Default value: '/etc/default/xymon-client'
Data type: String
Package name
Default value: 'xymon-client'
Data type: String
Service name
Default value: 'xymon-client'
Data type: String
Directory where the xymon configs are stored
Default value: '/etc/xymon'
Data type: String
The system user that is used by xymon
Default value: 'xymon'
Data type: String
The system group that is used by xymon
Default value: 'xymon'
Data type: Optional[String]
URL of the repository that contains the xymon-client
Default value: undef
Data type: Optional[String]
URL of the GPG key
Default value: undef
Data type: Optional[String]
Key id of the gpg key (Required by apt)
Default value: undef
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
Data type: Optional[String]
Name of the client (defaults to the FQDN)
Default value: undef
Data type: Optional[String]
Path ot the clientlaunch configuration directory (defaults to $xymon_config_dir/clientlaunch.d)
Default value: undef
Data type: Optional[String]
A path where to store additional files required by the monitors (defaults to $xymon_config_dir/files)
Default value: undef
Install the APT repository, key (optionally) and the pacakge
The following parameters are available in the xymon::repository::apt
class:
Data type: String
URL of the repository that contains the xymon-client
Data type: String
Package name
Data type: Optional[String]
URL of the GPG key
Default value: undef
Data type: Optional[String]
Key id of the gpg key
Default value: undef
Install the YUM repository, key (optionally) and the pacakge
The following parameters are available in the xymon::repository::yum
class:
Data type: String
URL of the repository that contains the xymon-client
Data type: String
Package name
Data type: Optional[String]
URL of the GPG key for Debian repositories
Default value: undef
Install the Zypper repository, key (optionally) and the pacakge
The following parameters are available in the xymon::repository::zypper
class:
Data type: String
URL of the repository that contains the xymon-client
Data type: String
Package name
Data type: Optional[String]
URL of the GPG key
Default value: undef
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
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
Data type: String
Path to the Xymon clientlaunch path. Will be provided by xymon::client automatically
Default value: $xymon::client::actual_clientlaunch_config
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
Data type: String
Xymon user. Will be provided by xymon::client automatically
Default value: $xymon::client::xymon_user
Data type: String
Xymon group. Will be provided by xymon::client automatically
Default value: $xymon::client::xymon_group
Data type: String
Xymon service name. Will be provided by xymon::client automatically
Default value: $xymon::client::service_name
Data type: Enum['present', 'absent']
Ensure if monitor is either present or absent
Default value: 'present'
Data type: Array[String]
A list of command line arguments to start the script with
Default value: []
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
A cron time expression as an alternative to the interval parameter
Data type: Optional[String]
Require that the agent has the specified FQDN for the monitor to be installed
Default value: undef
Data type: Optional[String]
A Puppet file source to the script for the monitor (mutually exclusive with script_template)
Default value: undef
Data type: Optional[String]
A Puppet file source to the script for the monitor (mutually exclusive with script_source)
Default value: undef
Data type: Optional[Hash]
A hash of variables for script_template (if used)
Default value: undef
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
Data type: Optional[Hash]
A sudo::conf hash with sudo definitions the xymon user should be allowed to use
Default value: undef
Data type: Optional[Hash]
A puppet package hash with packages that are required for the monitor to work
Default value: undef
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
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
Data type: Optional[String]
Default value: undef