Browse code

Monitoring SWAP i drobne porzadki.

Lukasz P authored on16/02/2021 12:10:45
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,31 @@
1
+---
2
+- name: Setup various nrpe checks
3
+  hosts: all
4
+
5
+  tasks:
6
+
7
+  - name: Update nrpe checks configuration to Redhat-like hosts.
8
+    include_tasks: monitoring_setup_nrpe_checks.yaml
9
+    loop:
10
+    - {plugin_path: "/usr/lib64/nagios/plugins"}
11
+    when: ansible_os_family == 'RedHat'
12
+  
13
+  - name: Update nrpe checks configuration to Debian-like and Suse hosts.
14
+    include_tasks: monitoring_setup_nrpe_checks.yaml
15
+    loop:
16
+    - {plugin_path: "/usr/lib/nagios/plugins"}
17
+    when: ansible_os_family == 'Debian' or ansible_os_family == 'Suse'
18
+
19
+
20
+  handlers:
21
+
22
+  - name: restart nrpe RS
23
+    systemd:
24
+      name: nrpe
25
+      state: restarted
26
+
27
+  - name: restart nrpe D
28
+    systemd:
29
+      name: nagios-nrpe-server
30
+      state: restarted
31
+