blob: 184ce5b75e0b9aaa71e0452c9961a447c1a69d78 (
plain)
1
2
3
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
---
- name: Install, configure and run Sensu backend
hosts: backends
become: true
tasks:
- name: Install backend
include_role:
name: sensu.sensu_go.backend
vars:
version: 6.0.0
- name: Install, configure and run Sensu agents
hosts: agents
become: true
tasks:
- name: Install agent
include_role:
name: sensu.sensu_go.agent
vars:
version: 6.0.0
agent_config:
name: my-agent
keepalive-interval: 5
keepalive-timeout: 10
- name: Configure your first monitor
hosts: localhost
tasks:
- name: Add subscriptions to agent entity
sensu.sensu_go.entity:
auth: &auth
url: http://{{ groups['backends'][0] }}:8080
name: my-agent
entity_class: agent
deregister: true
subscriptions:
- linux
- name: Create sensu asset
sensu.sensu_go.bonsai_asset:
auth: *auth
name: sensu/monitoring-plugins
version: 2.2.0-1
- name: Create sensu ntp check
sensu.sensu_go.check:
auth: *auth
name: ntp
runtime_assets: sensu/monitoring-plugins
command: check_ntp_time -H time.nist.gov --warn 0.5 --critical 1.0
output_metric_format: nagios_perfdata
publish: true
interval: 30
timeout: 10
subscriptions:
- linux
|