summaryrefslogtreecommitdiffstats
path: root/ansible_collections/sensu/sensu_go/docs/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:04:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:04:41 +0000
commit975f66f2eebe9dadba04f275774d4ab83f74cf25 (patch)
tree89bd26a93aaae6a25749145b7e4bca4a1e75b2be /ansible_collections/sensu/sensu_go/docs/examples
parentInitial commit. (diff)
downloadansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.tar.xz
ansible-975f66f2eebe9dadba04f275774d4ab83f74cf25.zip
Adding upstream version 7.7.0+dfsg.upstream/7.7.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/sensu/sensu_go/docs/examples')
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/installation/ansible.cfg10
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/quickstart/inventory.yaml9
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-5.yaml51
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-6.yaml58
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/roles/agent.yaml8
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/roles/backend.yaml7
-rw-r--r--ansible_collections/sensu/sensu_go/docs/examples/roles/install.yaml23
7 files changed, 166 insertions, 0 deletions
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/installation/ansible.cfg b/ansible_collections/sensu/sensu_go/docs/examples/installation/ansible.cfg
new file mode 100644
index 000000000..72427f5b6
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/installation/ansible.cfg
@@ -0,0 +1,10 @@
+[galaxy]
+server_list = automation_hub, galaxy
+
+[galaxy_server.automation_hub]
+url=https://cloud.redhat.com/api/automation-hub/
+auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
+token=AABBccddeeff112233gghh...
+
+[galaxy_server.galaxy]
+url=https://galaxy.ansible.com/
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/quickstart/inventory.yaml b/ansible_collections/sensu/sensu_go/docs/examples/quickstart/inventory.yaml
new file mode 100644
index 000000000..baa986e73
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/quickstart/inventory.yaml
@@ -0,0 +1,9 @@
+all:
+ children:
+ backends:
+ hosts:
+ 192.168.50.4:
+
+ agents:
+ hosts:
+ 192.168.50.5:
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-5.yaml b/ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-5.yaml
new file mode 100644
index 000000000..eb89c7b5b
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-5.yaml
@@ -0,0 +1,51 @@
+---
+- name: Install, configure and run Sensu backend
+ hosts: backends
+ become: true
+
+ tasks:
+ - name: Install backend
+ include_role:
+ name: sensu.sensu_go.backend
+ vars:
+ version: 5.21.2
+
+- name: Install, configure and run Sensu agents
+ hosts: agents
+ become: true
+
+ tasks:
+ - name: Install agent
+ include_role:
+ name: sensu.sensu_go.agent
+ vars:
+ version: 5.21.2
+ agent_config:
+ deregister: true
+ keepalive-interval: 5
+ keepalive-timeout: 10
+ subscriptions:
+ - linux
+
+- name: Configure your first monitor
+ hosts: localhost
+ tasks:
+ - name: Create sensu asset
+ sensu.sensu_go.bonsai_asset:
+ auth: &auth
+ url: http://{{ groups['backends'][0] }}:8080
+ 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
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-6.yaml b/ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-6.yaml
new file mode 100644
index 000000000..184ce5b75
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/quickstart/playbook-6.yaml
@@ -0,0 +1,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
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/roles/agent.yaml b/ansible_collections/sensu/sensu_go/docs/examples/roles/agent.yaml
new file mode 100644
index 000000000..f90ac9340
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/roles/agent.yaml
@@ -0,0 +1,8 @@
+---
+- name: Install, configure and run Sensu agent
+ hosts: agents
+ roles:
+ - sensu.sensu_go.agent
+ vars:
+ agent_config:
+ backend-url: [ "ws://upstream-backend:4321" ]
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/roles/backend.yaml b/ansible_collections/sensu/sensu_go/docs/examples/roles/backend.yaml
new file mode 100644
index 000000000..9573a378f
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/roles/backend.yaml
@@ -0,0 +1,7 @@
+- name: Install, configure and run Sensu backend
+ hosts: backends
+ roles:
+ - sensu.sensu_go.backend
+ vars:
+ backend_config:
+ log-level: debug
diff --git a/ansible_collections/sensu/sensu_go/docs/examples/roles/install.yaml b/ansible_collections/sensu/sensu_go/docs/examples/roles/install.yaml
new file mode 100644
index 000000000..4e0282364
--- /dev/null
+++ b/ansible_collections/sensu/sensu_go/docs/examples/roles/install.yaml
@@ -0,0 +1,23 @@
+---
+- name: Install latest sensu-backend binary from stable channel
+ hosts: backends
+ roles:
+ - sensu.sensu_go.install
+ vars:
+ components: [ sensu-go-backend ]
+
+- name: Install latest sensu-agent binary from testing channel
+ hosts: agents
+ roles:
+ - sensu.sensu_go.install
+ vars:
+ components: [ sensu-go-agent ]
+ channel: testing
+
+- name: Install a specific version of sensuctl binary from stable channel
+ hosts: localhost
+ roles:
+ - sensu.sensu_go.install
+ vars:
+ components: [ sensu-go-cli ]
+ version: 5.14.2