Defined Type: sensu::config

Defined in:
manifests/config.pp

Summary

Defines Sensu check configurations

Overview

 This define manages Sensu check configurations.

Parameters:

  • ensure (Enum['present','absent']) (defaults to: 'present')

    Whether the check should be present or not Valid values: present, absent

  • config (Optional[Hash]) (defaults to: undef)

    Check configuration for the client to use

  • event (Optional[Hash]) (defaults to: undef)

    Configuration to send with the event to handlers



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/config.pp', line 12

define sensu::config (
  Enum['present','absent'] $ensure = 'present',
  Optional[Hash] $config = undef,
  Optional[Hash] $event  = undef,
) {

  include ::sensu

  file { "${::sensu::conf_dir}/checks/config_${name}.json":
    ensure => $ensure,
    owner  => 'sensu',
    group  => 'sensu',
    mode   => '0444',
    before => Sensu_check[$name],
  }

  sensu_check_config { $name:
    ensure => $ensure,
    config => $config,
    event  => $event,
    notify => $::sensu::client_service,
  }
}