Commit 24e56fd2 authored by Themis Zamani's avatar Themis Zamani
Browse files

Merge pull request #29 from pkoro/api-push-changes

ARGO-242 Adds nagios nrpe integration as role
parents 02f82c59 14e49f7e
......@@ -77,3 +77,8 @@ Contains Ansible playbook for the deployment of all ARGO components. The play is
```bash
$ ansible-playbook -v standalone.yml
```
## Monitoring your services
In case you are using Nagios or Icinga for health monitoring purposes a minimal `is_monitored` role is included in the repo. The puspose of this role is to install and configure the nrpe service on your target machines. Modify the remote host variable within the `roles/is_monitored/defaults/main.yml` file and include it in your playbooks.
---
nrpe_conf_path: /etc/nrpe.d
# Comma separated list of monitoring hosts (either IPs or FQDNs)
nrpe_allowed_hosts: 8.8.8.8,host.example.com
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5%
\ No newline at end of file
---
- name: restart nrpe
service: name=nrpe state=restarted
---
- name: Install nagios needed nrpe packages
tags: monitoring
yum: name={{ item }} state=latest
with_items:
- nrpe
- nagios-plugins
- nagios-plugins-disk
- name: Copy nrpe configuration file on host
tags: monitoring
copy: src=ar-dev-api.cfg
dest={{ nrpe_conf_path }}/ar-dev-api.cfg backup=yes
owner=root group=root mode=0644
notify: restart nrpe
- name: Modify nrpe configuration itself
tags: monitoring
lineinfile: dest=/etc/nagios/nrpe.cfg
regexp="^allowed_hosts="
line="allowed_hosts={{ nrpe_allowed_hosts }}"
state=present
backup=yes
notify: restart nrpe
- name: Start and enable nrpe service
tags: monitoring
service: name=nrpe state=started enabled=yes
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment