[icinga-checkins] icinga.org: icinga2-ansible/master: Added check_mem for RH - README updated

git at icinga.org git at icinga.org
Wed Jul 6 11:45:36 CEST 2016


Module: icinga2-ansible
Branch: master
Commit: b45752cdcd1d5814a70e0c44af9514d379375106
URL:    https://git.icinga.org/?p=icinga2-ansible.git;a=commit;h=b45752cdcd1d5814a70e0c44af9514d379375106

Author: Valentino Gagliardi <valentino.g at servermanaged.it>
Date:   Wed Jul  6 11:45:32 2016 +0200

Added check_mem for RH - README updated

---

 icinga2-nrpe-agent/README.md                       |   31 ++------------------
 icinga2-nrpe-agent/defaults/main.yml               |    2 ++
 .../tasks/icinga2_nrpe_agent_RedHat.yml            |    5 ++++
 3 files changed, 9 insertions(+), 29 deletions(-)

diff --git a/icinga2-nrpe-agent/README.md b/icinga2-nrpe-agent/README.md
index 651a03b..106ee11 100644
--- a/icinga2-nrpe-agent/README.md
+++ b/icinga2-nrpe-agent/README.md
@@ -37,6 +37,7 @@ Example Playbook
        command[check_ssh]={{ nrpe_agent_plugins_x86_64 }}/check_ssh -H {{ ansible_eth0.ipv4.address }} -p {{ ansible_port }}
        command[check_procs]={{ nrpe_agent_plugins_x86_64 }}/check_procs -w 300 -c 500
        command[check_disk]={{ nrpe_agent_plugins_x86_64 }}/check_disk -w 15% -c 10% -p / -p /home -p /tmp
+       command[check_disk]={{ nrpe_agent_plugins_x86_64 }}/check_mem_ng
      tags: nrpe-agent
 
 ```
@@ -44,35 +45,7 @@ Example Playbook
 Role Variables
 --------------
 
-```yaml
-nrpe_agent_RedHat:
- - { package: "nrpe" }
- - { package: "nagios-plugins-all" }
-
-nrpe_agent_Debian:
- - { package: "nagios-nrpe-server" }
- - { package: "nagios-nrpe-plugin" }
- - { package: "nagios-plugins" }
-
-nrpe_agent_Gentoo:
- - { package: "nrpe" }
- - { package: "nagios-plugins" }
-
-nrpe_agent_config: "/etc/nagios/nrpe.cfg"
-
-# A list of allowed hosts for Nrpe agent
-nrpe_allowed_hosts: "127.0.0.1,192.168.0.1"
-
-# Plugins path for RH and other x86_64
-nrpe_agent_plugins_x86_64: "/usr/lib64/nagios/plugins"
-
-# Sample NRPE check commands
-nrpe_check_commands:
-  check_load:
-    check_load: "-w 15,10,5 -c 30,25,20"
-  check_disk:
-    check_disk: "-w 20% -c 10% -p /"
-```
+See  `defaults/main.yml`
 
 License
 -------
diff --git a/icinga2-nrpe-agent/defaults/main.yml b/icinga2-nrpe-agent/defaults/main.yml
index f14ea40..55d8f92 100644
--- a/icinga2-nrpe-agent/defaults/main.yml
+++ b/icinga2-nrpe-agent/defaults/main.yml
@@ -22,6 +22,8 @@ nrpe_allowed_hosts: "127.0.0.1,192.168.0.1"
 # Plugins path for RH and other x86_64
 nrpe_agent_plugins_x86_64: "/usr/lib64/nagios/plugins"
 
+nrpe_agent_check_mem: "https://raw.githubusercontent.com/zwindler/zwindler-monitoring-plugins/master/check_mem_ng/check_mem_ng.sh"
+
 # Sample NRPE check commands
 nrpe_check_commands:
   check_load:
diff --git a/icinga2-nrpe-agent/tasks/icinga2_nrpe_agent_RedHat.yml b/icinga2-nrpe-agent/tasks/icinga2_nrpe_agent_RedHat.yml
index b9ebb73..091c9c9 100644
--- a/icinga2-nrpe-agent/tasks/icinga2_nrpe_agent_RedHat.yml
+++ b/icinga2-nrpe-agent/tasks/icinga2_nrpe_agent_RedHat.yml
@@ -11,6 +11,11 @@
   with_items: "{{ nrpe_agent_RedHat }}"
   when: ansible_pkg_mgr == "dnf"
 
+- name: Install Check_Mem_Ng on RH
+  get_url: url={{ nrpe_agent_check_mem }}
+           dest={{ nrpe_agent_plugins_x86_64 }}/check_mem_ng
+           mode=0755
+
 - name: Copy Nrpe Configuration
   template: src=nrpe.cfg.j2
             dest={{ nrpe_agent_config }}



More information about the icinga-checkins mailing list