Skip to content
GitLab
Menu
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
aeab9886
Commit
aeab9886
authored
Mar 18, 2016
by
Pavlos Daoglou
Browse files
Added action for nagios plugins installation
parent
a862da01
Changes
3
Hide whitespace changes
Inline
Side-by-side
group_vars/monitoring_engine
View file @
aeab9886
...
...
@@ -6,3 +6,12 @@ iptables_rules:
input:
- { dport: "80", proto: "tcp", policy: "accept"}
- { dport: "443", proto: "tcp", policy: "accept"}
nagios_plugins:
- { name: nagios-plugins-tcp , repo: "" }
- { name: nagios-plugins-disk , repo: "" }
- { name: nagios-plugins-http , repo: "" }
- { name: nagios-plugins , repo: "" }
- { name: nagios-plugins-dummy , repo: "" }
- { name: nagios-plugins-procs , repo: "" }
- { name: nagios-plugins-ping , repo: "" }
\ No newline at end of file
monitoring_engine.yml
View file @
aeab9886
---
-
hosts
:
monitoring_engine
user
:
root
sudo
:
true
roles
:
-
{
role
:
firewall
,
tags
:
firewall
}
-
{
role
:
repos
,
tags
:
repos
}
-
{
role
:
has_certificate
,
tags
:
certificate
}
-
{
role
:
monitoring_engine
,
tags
:
monitoring_engine
}
-
{
role
:
firewall
,
tags
:
firewall
}
-
{
role
:
repos
,
tags
:
repos
}
-
{
role
:
has_certificate
,
tags
:
certificate
}
-
{
role
:
monitoring_engine
,
tags
:
monitoring_engine
}
roles/monitoring_engine/tasks/main.yml
View file @
aeab9886
...
...
@@ -2,11 +2,18 @@
-
name
:
Install Nagios
yum
:
name=nagios state=latest enablerepo=nagios
-
name
:
Install Apache
yum
:
name=httpd state=latest
-
name
:
Install NCG and MSG conponents
yum
:
name={{ item.name }} state=latest enablerepo={{ item.repo }}
with_items
:
nagios_components
-
name
:
Install Nagios plugins
yum
:
name={{ item.name }} state=latest enablerepo={{ item.repo }}
with_items
:
nagios_plugins
-
name
:
Copy nagios.cfg file
template
:
src=nagios.cfg.j2
dest=/etc/nagios/nagios.cfg
...
...
@@ -22,6 +29,9 @@
dest=/var/cache/msg/broker-cache-file/broker-list
owner=root group=root mode=0644
-
name
:
Enable nagios on boot and start service
service
:
name=nagios state=started enabled=yes
-
name
:
Enable nagios and httpd on boot and start service
service
:
name={{ item }} state=started enabled=yes
with_items
:
-
nagios
-
httpd
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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