dotfiles/.ansible/roles/common_server/tasks/sensu_checks.yaml

52 lines
1 KiB
YAML
Raw Permalink Normal View History

- name: Install Sensu basic checks
tags:
- install
command: "sensu-install -p {{ item }}"
become: true
2019-01-20 10:51:09 +00:00
loop:
- cpu-checks
- disk-checks
- memory-checks
- process-checks
- load-checks
- vmstats
- name: Get CPU metrics
tags:
- config
sensu_check:
name: CPU
command: /opt/sensu/embedded/bin/check-cpu.rb -w 80 -c 90
metric: yes
handlers: default
subscribers: default
interval: 60
notify: restart sensu-server
become: true
- name: Get disk metrics
tags:
- config
sensu_check:
name: Disk
command: /opt/sensu/embedded/bin/check-disk-usage.rb -t xfs -w 80 -c 90
metric: yes
handlers: default
subscribers: default
interval: 60
notify: restart sensu-server
become: true
- name: Get memory metrics
tags:
- config
sensu_check:
name: Memory
command: /opt/sensu/embedded/bin/check-memory-percent.rb -w 80 -c 90
metric: yes
handlers: default
subscribers: default
interval: 60
notify: restart sensu-server
2019-01-20 10:51:09 +00:00
become: true