Skip to content

Instantly share code, notes, and snippets.

@asachs01
Last active October 30, 2019 17:01
Show Gist options
  • Save asachs01/4cc95085611f6b1accb71a3673dad088 to your computer and use it in GitHub Desktop.
Save asachs01/4cc95085611f6b1accb71a3673dad088 to your computer and use it in GitHub Desktop.
---
- name: Install, configure and run Sensu backend in debug mode
hosts: monitoring-sensu
remote_user: centos
become: true
become_method: sudo
collections: [sensu.sensu_go]
roles:
- role: backend
backend_config:
debug: yes
log_level: debug
- name: Install, configure and run Sensu agents on monitoring cluster members
hosts: monitoring-sensu
remote_user: centos
become: true
become_method: sudo
collections: [sensu.sensu_go]
roles:
- role: agent
agent_backend_urls: ['ws://localhost:8081']
agent_config:
subscriptions:
- linux
- system
- name: Create cpu check plugin asset
hosts: monitoring-sensu
tasks:
- name: Create cpu check plugin asset
sensu.sensu_go.asset:
name: sensu-plugins-cpu-checks
url: https://assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_centos_linux_amd64.tar.gz
sha512: 518e7c17cf670393045bff4af318e1d35955bfde166e9ceec2b469109252f79043ed133241c4dc96501b6636a1ec5e008ea9ce055d1609865635d4f004d7187b
filters:
- "entity.system.os == 'linux'"
- "entity.system.arch == 'amd64'"
- "entity.system.platform == 'rhel'"
annotations:
sensio.io.bonsai.url: https://assets.bonsai.sensu.io/68546e739d96fd695655b77b35b5aabfbabeb056/sensu-plugins-cpu-checks_4.0.0_centos_linux_amd64.tar.gz
sensio.io.bonsai.tier: Community
sensio.io.bonsai.version: 4.0.0
sensio.io.bonsai.tags: ruby-runtime-2.4.4
- name: Create CPU check
hosts: monitoring-sensu
tasks:
- name: Create CPU check
sensu.sensu_go.check:
name: cpu-check-interval
command: check-cpu.rb -w 75 -c 90
subscriptions:
- entity:sensu00.sachshaus.net
interval: 30
publish: yes
runtime_assets:
- sensu-plugins-cpu-checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment