OP#436 testing
This commit is contained in:
@@ -77,6 +77,11 @@ See the full Puppet documentation including parameters in `docs/index.html`
|
|||||||
|
|
||||||
All dependencies must be included in the catalogue.
|
All dependencies must be included in the catalogue.
|
||||||
|
|
||||||
|
- `puppetlabs-firewall`
|
||||||
|
- `puppetlabs-stdlib`
|
||||||
|
- `puppetlabs-concat`
|
||||||
|
- `puppetlabs-nagios_core`
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
- native Puppet deployment
|
- native Puppet deployment
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class confdroid_nagios::nagios::objects::commands (
|
|||||||
ensure => present,
|
ensure => present,
|
||||||
command_name => 'notify-host-by-email',
|
command_name => 'notify-host-by-email',
|
||||||
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **" $CONTACTEMAIL$',
|
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **" $CONTACTEMAIL$',
|
||||||
owner => 'nagios',
|
owner => 'nagions',
|
||||||
group => 'nagios',
|
group => 'nagios',
|
||||||
mode => '0640',
|
mode => '0640',
|
||||||
target => $ng_target_command,
|
target => $ng_target_command,
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class confdroid_nagios::server::access_rules (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => nagios_etc_t,
|
seltype => nagios_etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
notify => Exec['restart_httpd'],
|
notify => Exec['ng_restart_httpd'],
|
||||||
}
|
}
|
||||||
|
|
||||||
# manage file header
|
# manage file header
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class confdroid_nagios::server::service (
|
|||||||
require confdroid_nagios::nagios::resources::resource
|
require confdroid_nagios::nagios::resources::resource
|
||||||
require confdroid_nagios::nagios::objects::commands
|
require confdroid_nagios::nagios::objects::commands
|
||||||
|
|
||||||
exec { 'restart_httpd':
|
exec { 'ng_restart_httpd':
|
||||||
command => 'systemctl restart httpd',
|
command => 'systemctl restart httpd',
|
||||||
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
@@ -24,7 +24,7 @@ class confdroid_nagios::server::service (
|
|||||||
enable => true,
|
enable => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
require => Exec['restart_httpd'],
|
require => Exec['ng_restart_httpd'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ log_file=<%= @ng_log_file %>
|
|||||||
# Original files are available at https://3for.me/hn6ca (membership area)
|
# Original files are available at https://3for.me/hn6ca (membership area)
|
||||||
# or at nagios.org
|
# or at nagios.org
|
||||||
|
|
||||||
# You can specify individual object config files as shown below:
|
|
||||||
cfg_file=/etc/nagios/objects/commands.cfg
|
cfg_file=/etc/nagios/objects/commands.cfg
|
||||||
cfg_file=/etc/nagios/objects/contacts.cfg
|
cfg_file=/etc/nagios/objects/contacts.cfg
|
||||||
cfg_file=/etc/nagios/objects/timeperiods.cfg
|
cfg_file=/etc/nagios/objects/timeperiods.cfg
|
||||||
|
|||||||
Reference in New Issue
Block a user