Initial commit
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
d547c7f607
commit
096a3e0540
69 changed files with 1650 additions and 0 deletions
9
templates/nagios/conf.d/commands.cfg.j2
Normal file
9
templates/nagios/conf.d/commands.cfg.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for command in nagios_commands | default([]) %}
|
||||
define command {
|
||||
command_name {{ command['command_name'] }}
|
||||
command_line {{ command['command_line'] }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
10
templates/nagios/conf.d/hostgroups.cfg.j2
Normal file
10
templates/nagios/conf.d/hostgroups.cfg.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for hostgroup in nagios_hostgroups | default([]) %}
|
||||
define hostgroup {
|
||||
hostgroup_name {{ hostgroup['hostgroup_name'] }}
|
||||
alias {{ hostgroup['alias'] }}
|
||||
members {{ hostgroup['members'] | sort | join(',') }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
11
templates/nagios/conf.d/hosts.cfg.j2
Normal file
11
templates/nagios/conf.d/hosts.cfg.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for host in nagios_hosts | default([]) %}
|
||||
define host {
|
||||
use {{ host['use'] }}
|
||||
host_name {{ host['host_name'] }}
|
||||
alias {{ host['alias'] }}
|
||||
address {{ host['address'] }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
23
templates/nagios/conf.d/services.cfg.j2
Normal file
23
templates/nagios/conf.d/services.cfg.j2
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for service in nagios_services | default([]) %}
|
||||
define service {
|
||||
use {{ service['use'] }}
|
||||
hostgroup_name {{ service['hostgroup_name'] }}
|
||||
service_description {{ service['service_description'] }}
|
||||
check_command {{ service['check_command'] }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% for service_dependency in nagios_service_dependencies | default([]) %}
|
||||
define servicedependency {
|
||||
host_name {{ service_dependency['host_name'] }}
|
||||
service_description {{ service_dependency['service_description'] }}
|
||||
dependent_host_name {{ service_dependency['dependent_host_name'] }}
|
||||
dependent_service_description {{ service_dependency['dependent_service_description'] }}
|
||||
execution_failure_criteria {{ service_dependency['execution_failure_criteria'] }}
|
||||
notification_failure_criteria {{ service_dependency['notification_failure_criteria'] }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
31
templates/nagios/conf.d/templates.cfg.j2
Normal file
31
templates/nagios/conf.d/templates.cfg.j2
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for template in nagios_host_templates | default([]) %}
|
||||
define host {
|
||||
register 0 ; template
|
||||
name {{ template['name'] }}
|
||||
use {{ template['use'] }}
|
||||
check_command {{ template['check_command'] }}
|
||||
contact_groups {{ template['contact_groups'] }}
|
||||
notification_options {{ template['notification_options'] | sort | join(',') }}
|
||||
check_interval {{ template['check_interval'] }}
|
||||
retry_interval {{ template['retry_interval'] }}
|
||||
max_check_attempts {{ template['max_check_attempts'] }}
|
||||
notification_interval {{ template['notification_interval'] }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% for template in nagios_service_templates | default([]) %}
|
||||
define service {
|
||||
register 0 ; template
|
||||
name {{ template['name'] }}
|
||||
use {{ template['use'] }}
|
||||
contact_groups {{ template['contact_groups'] }}
|
||||
check_interval {{ template['check_interval'] }}
|
||||
retry_interval {{ template['retry_interval'] }}
|
||||
max_check_attempts {{ template['max_check_attempts'] }}
|
||||
notification_interval {{ template['notification_interval'] }}
|
||||
}
|
||||
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue