Skip to content

Latest commit

 

History

History
545 lines (329 loc) · 13.3 KB

REFERENCE.md

File metadata and controls

545 lines (329 loc) · 13.3 KB

Reference

Table of Contents

Classes

Defined types

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

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

Parameters

The following parameters are available in the xymon::client::monitor defined type:

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