edited README and fixed template
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|Repo Name| version | Build Status|
|
||||
|---|---|---|---|
|
||||
|`cd_nagios`| 0.0.0.8 | [](https://jenkins.confdroid.com/job/cd_nagios/)|
|
||||
|`cd_nagios`| 0.0.0.9 | [](https://jenkins.confdroid.com/job/cd_nagios/)|
|
||||
|
||||
### Synopsis
|
||||
Nagios is a powerful open source software solution for monitoring your IT environments.
|
||||
@@ -62,6 +62,11 @@ Service
|
||||
* manage Nagios service on server
|
||||
* manage NRPE service on clients (optional)
|
||||
|
||||
Monitoring
|
||||
* monitor Nagios host
|
||||
* monitor Nagios service
|
||||
|
||||
|
||||
### Repo Structure
|
||||
Repostructure has moved to REPOSTRUCTURE.md in repo.
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ $ng_hostgroup_register = '1',
|
||||
|
||||
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
|
||||
$ng_tgt_hostgroup_add = $::cd_nagios::params::ng_tgt_hostgroup_add
|
||||
$ng_tgt_hostgrp_head_erb = $::cd_nagios::params::ng_tgt_hostgrp_head_erb
|
||||
$ng_tgt_hostgrp_rule_erb = $::cd_nagios::params::ng_tgt_hostgrp_rule_erb
|
||||
|
||||
|
||||
if $::fqdn == $ng_nagios_server {
|
||||
|
||||
concat::fragment { $name:
|
||||
target => $ng_tgt_hostgroup_add,
|
||||
content => template($ng_tgt_hostgrp_head_erb),
|
||||
content => template($ng_tgt_hostgrp_rule_erb),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -968,6 +968,7 @@ $ng_target_host = "${ng_conf_d_dir}/nagios_host.cfg"
|
||||
$ng_target_hostgroup_base = "${ng_conf_d_dir}/nagios_hostgroups_base.cfg"
|
||||
$ng_tgt_hostgroup_add = "${ng_conf_d_dir}/nagios_hostgroups_add.cfg"
|
||||
$ng_tgt_hostgrp_head_erb = 'cd_nagios/nagios/hostgroups_cfg_head.erb'
|
||||
$ng_tgt_hostgrp_rule_erb = 'cd_nagios/nagios/hostgroups_cfg_rule.erb'
|
||||
$ng_target_hostdep = "${ng_conf_d_dir}/nagios_hostdependency.cfg"
|
||||
$ng_target_hostesc = "${ng_conf_d_dir}/nagios_hostescalation.cfg"
|
||||
$ng_target_hostext = "${ng_conf_d_dir}/nagios_hostextinfo.cfg"
|
||||
|
||||
@@ -37,16 +37,33 @@ class cd_nagios::server::service (
|
||||
enable => true,
|
||||
}
|
||||
|
||||
@@nagios_service { "check_nagios_${::hostname}":
|
||||
@@nagios_host { 'localhost':
|
||||
ensure => $ng_ping_ensure,
|
||||
alias => 'localhost',
|
||||
address => '127.0.0.1',
|
||||
use => 'linux-server',
|
||||
target => $ng_target_localhost,
|
||||
hostgroups => 'linux-servers',
|
||||
contacts => 'ops',
|
||||
max_check_attempts => $max_check_attempts,
|
||||
notification_period => '24x7',
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
|
||||
notify => Service ['nagios'],
|
||||
}
|
||||
|
||||
@@nagios_service { "check_nagios_localhost":
|
||||
check_command => 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios',
|
||||
use => 'generic-service',
|
||||
host_name => $::fqdn,
|
||||
host_name => 'localhost',
|
||||
notification_period => '24x7',
|
||||
service_description => "${::hostname}_nagios_service",
|
||||
service_description => 'localhost_nagios_service',
|
||||
target => $ng_target_service,
|
||||
owner => 'nagios',
|
||||
group => 'nagios',
|
||||
mode => '0660',
|
||||
owner => $ng_user,
|
||||
group => $ng_user,
|
||||
mode => '0640',
|
||||
contacts => 'ops',
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user