Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anastasios Lisgaras
GitHubHistory
Commits
4d30cdb1
Commit
4d30cdb1
authored
Nov 24, 2015
by
Paschalis Korosoglou
Browse files
Adds nagios nrpe integration as role
parent
02f82c59
Changes
3
Hide whitespace changes
Inline
Side-by-side
roles/is_monitored/defaults/main.yml
0 → 100644
View file @
4d30cdb1
---
nrpe_conf_path
:
/etc/nrpe.d
\ No newline at end of file
roles/is_monitored/files/ar-dev-api.cfg
0 → 100644
View file @
4d30cdb1
command[check_disk]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5%
\ No newline at end of file
roles/is_monitored/tasks/main.yml
0 → 100644
View file @
4d30cdb1
---
-
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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment