Browse Source

turn off check swap if needed

tags/mcp0.5
vmikes 8 years ago
parent
commit
a63f4053f3
2 changed files with 10 additions and 4 deletions
  1. +9
    -3
      linux/map.jinja
  2. +1
    -1
      linux/meta/sensu.yml

+ 9
- 3
linux/map.jinja View File

{% set storage = salt['grains.filter_by']({ {% set storage = salt['grains.filter_by']({
'Arch': { 'Arch': {
'mount': {}, 'mount': {},
'swap': {},
'swap': {
'enabled': True,
},
'lvm': {}, 'lvm': {},
'multipath': { 'multipath': {
'enabled': False, 'enabled': False,
}, },
'Debian': { 'Debian': {
'mount': {}, 'mount': {},
'swap': {},
'swap': {
'enabled': True,
},
'lvm': {}, 'lvm': {},
'multipath': { 'multipath': {
'enabled': False, 'enabled': False,
}, },
'RedHat': { 'RedHat': {
'mount': {}, 'mount': {},
'swap': {},
'swap': {
'enabled': True,
},
'lvm': {}, 'lvm': {},
'multipath': { 'multipath': {
'enabled': False, 'enabled': False,

+ 1
- 1
linux/meta/sensu.yml View File

occurrences: 1 occurrences: 1
subscribers: subscribers:
- local-linux-system - local-linux-system
{%- if storage.swap is defined %}
{%- if storage.swap.enabled %}
local_linux_storage_swap_usage_{{ system.name|replace('.', '-') }}-{{ system.domain|replace('.', '-') }}: local_linux_storage_swap_usage_{{ system.name|replace('.', '-') }}-{{ system.domain|replace('.', '-') }}:
command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_swap -a -w 50% -c 20%" command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_swap -a -w 50% -c 20%"
interval: 60 interval: 60

Loading…
Cancel
Save