Puppet Class: monitoring::monitoring::sensu::base

Defined in:
manifests/monitoring/sensu/base.pp

Overview

Class: lysaker_sensu::checks::base

Parameters:

  • plugins_location (Any) (defaults to: '/opt/sensu/embedded/bin/')
  • disk_usage_magic_factor (Any) (defaults to: '0.9')


4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'manifests/monitoring/sensu/base.pp', line 4

class monitoring::monitoring::sensu::base (
  $plugins_location        = '/opt/sensu/embedded/bin/',
  $disk_usage_magic_factor = '0.9',) {

  package { [
    'sensu-plugins-cpu-checks',
    'sensu-plugins-memory-checks',
    'sensu-plugins-disk-checks',
    'sensu-plugins-load-checks',
    'sensu-plugins-filesystem-checks',
    'sensu-plugins-process-checks',
    'sensu-plugins-network-checks',
    ]:
    provider => sensu_gem,
  }

  sensu::check { 'memory': command => "${plugins_location}check-memory.rb", }

  sensu::check { 'memory-percent': command => "${plugins_location}check-memory-percent.rb -w 85 -c 95", }

  sensu::check { 'swap-percent': command => "${plugins_location}check-swap-percent.rb", }

  $ignore_fs_types = 'nfs,nfs4,cifs,devtmpfs,tmpfs,aufs,proc'
  $ignore_mnt = '"^/run/|^/sys/|^/var/lib/docker/|^/snap/"'

  sensu::check { 'disk-usage':
    command => "${plugins_location}check-disk-usage.rb -x ${ignore_fs_types} -p ${ignore_mnt} -m ${disk_usage_magic_factor}",
  }

  sensu::check { 'load': command => "${plugins_location}check-load.rb --per-core --warn 4,8,12 --crit 8,12,16", }

  sensu::check { 'root-fs-writable': command => "${plugins_location}check-fs-writable.rb --directory /etc/sensu/", }

  sensu::check { 'process-zombie-state':
    command => "${plugins_location}check-process.rb --state Z --warn-over 20 --critical-over 40 --warn-under 0 --critical-under 0",
  }

}