Merge branch 'main' into testing
This commit is contained in:
commit
9bb2afa68b
2 changed files with 17 additions and 0 deletions
|
@ -11,6 +11,9 @@ class sunetdrive::sitemonitornaemon() {
|
||||||
$environment = sunetdrive::get_environment()
|
$environment = sunetdrive::get_environment()
|
||||||
$influx_passwd = safe_hiera('influx_passwd')
|
$influx_passwd = safe_hiera('influx_passwd')
|
||||||
$slack_url = safe_hiera('slack_url')
|
$slack_url = safe_hiera('slack_url')
|
||||||
|
$extra_host_groups = {
|
||||||
|
node3_hosts => join($facts['configured_hosts_in_cosmos']['all'].filter |$host| { $host =~ /^node3\./ }, ',')
|
||||||
|
}
|
||||||
|
|
||||||
file { '/usr/local/bin/slack_nagios.sh':
|
file { '/usr/local/bin/slack_nagios.sh':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
@ -45,6 +48,11 @@ class sunetdrive::sitemonitornaemon() {
|
||||||
content => template('sunetdrive/monitor/sunetdrive_thruk_templates.conf.erb'),
|
content => template('sunetdrive/monitor/sunetdrive_thruk_templates.conf.erb'),
|
||||||
mode => '0644',
|
mode => '0644',
|
||||||
}
|
}
|
||||||
|
file { '/etc/naemon/conf.d/sunetdrive_extra_hostgroups.cfg':
|
||||||
|
ensure => present,
|
||||||
|
content => template('sunetdrive/monitor/sunetdrive_extra_hostgroups.cfg.erb'),
|
||||||
|
mode => '0644',
|
||||||
|
}
|
||||||
nagioscfg::service {'check_scriptherder':
|
nagioscfg::service {'check_scriptherder':
|
||||||
hostgroup_name => ['sunetdrive::nrpe'],
|
hostgroup_name => ['sunetdrive::nrpe'],
|
||||||
check_command => 'check_nrpe_1arg_to300!check_scriptherder',
|
check_command => 'check_nrpe_1arg_to300!check_scriptherder',
|
||||||
|
@ -105,5 +113,6 @@ class sunetdrive::sitemonitornaemon() {
|
||||||
description => 'S3 buckets with multiple Nextcloud mounts',
|
description => 'S3 buckets with multiple Nextcloud mounts',
|
||||||
contact_groups => ['alerts']
|
contact_groups => ['alerts']
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
templates/monitor/sunetdrive_extra_hostgroups.cfg.erb
Normal file
8
templates/monitor/sunetdrive_extra_hostgroups.cfg.erb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<% @extra_host_groups.each do |group, members| -%>
|
||||||
|
# <%= group -%>
|
||||||
|
define hostgroup {
|
||||||
|
hostgroup_name <%= group -%>
|
||||||
|
alias <%= group -%>
|
||||||
|
members <%= members -%>
|
||||||
|
}
|
||||||
|
<% end -%>
|
Loading…
Add table
Reference in a new issue