Add monitoring-plugins Puppet module and drop direct download of the
plugins fixes #6953
This commit is contained in:
parent
59c5b70f71
commit
aec0591001
|
@ -1,6 +1,6 @@
|
|||
object CheckCommand "dummy-host" {
|
||||
import "plugin-check-command"
|
||||
command = [ PluginDir + "/libexec/test_hostcheck.pl" ]
|
||||
command = [ PluginDir + "/test_hostcheck.pl" ]
|
||||
arguments = {
|
||||
"--type" = "$check_type$"
|
||||
"--failchance" = "$check_failchance$"
|
||||
|
@ -18,7 +18,7 @@ object CheckCommand "dummy-host" {
|
|||
|
||||
object CheckCommand "dummy-service" {
|
||||
import "plugin-check-command"
|
||||
command = [ PluginDir + "/libexec/test_servicecheck.pl" ]
|
||||
command = [ PluginDir + "/test_servicecheck.pl" ]
|
||||
arguments = {
|
||||
"--total-critical-on-host" = "$check_critical_on_host$"
|
||||
"--total-warning-on-host" = "$check_warning_on_host$"
|
||||
|
|
|
@ -3,7 +3,7 @@ include mysql
|
|||
include pgsql
|
||||
include openldap
|
||||
|
||||
Exec { path => '/bin:/usr/bin:/sbin' }
|
||||
Exec { path => '/bin:/usr/bin:/sbin:/usr/sbin' }
|
||||
|
||||
$icingaVersion = '1.11.5'
|
||||
$icinga2Version = '2.0.1'
|
||||
|
@ -76,10 +76,10 @@ cmmi { 'icinga-mysql':
|
|||
--with-htmurl=/icinga-mysql --with-httpd-conf-file=/etc/httpd/conf.d/icinga-mysql.conf \
|
||||
--with-cgiurl=/icinga-mysql/cgi-bin \
|
||||
--with-http-auth-file=/usr/share/icinga/htpasswd.users \
|
||||
--with-plugin-dir=/usr/lib64/nagios/plugins/libexec',
|
||||
--with-plugin-dir=/usr/lib64/nagios/plugins',
|
||||
creates => '/usr/local/icinga-mysql',
|
||||
make => 'make all && make fullinstall install-config',
|
||||
require => [ User['icinga'], Cmmi['icinga-plugins'], Package['apache'] ],
|
||||
require => [ User['icinga'], Class['monitoring-plugins'], Package['apache'] ],
|
||||
notify => Service['apache']
|
||||
}
|
||||
|
||||
|
@ -102,10 +102,10 @@ cmmi { 'icinga-pgsql':
|
|||
--with-htmurl=/icinga-pgsql --with-httpd-conf-file=/etc/httpd/conf.d/icinga-pgsql.conf \
|
||||
--with-cgiurl=/icinga-pgsql/cgi-bin \
|
||||
--with-http-auth-file=/usr/share/icinga/htpasswd.users \
|
||||
--with-plugin-dir=/usr/lib64/nagios/plugins/libexec',
|
||||
--with-plugin-dir=/usr/lib64/nagios/plugins',
|
||||
creates => '/usr/local/icinga-pgsql',
|
||||
make => 'make all && make fullinstall install-config',
|
||||
require => [ User['icinga'], Cmmi['icinga-plugins'], Package['apache'] ],
|
||||
require => [ User['icinga'], Class['monitoring-plugins'], Package['apache'] ],
|
||||
notify => Service['apache']
|
||||
}
|
||||
|
||||
|
@ -210,16 +210,7 @@ exec { 'icinga-htpasswd':
|
|||
require => Class['apache']
|
||||
}
|
||||
|
||||
cmmi { 'icinga-plugins':
|
||||
url => "https://www.monitoring-plugins.org/download/monitoring-plugins-${pluginVersion}.tar.gz",
|
||||
output => "monitoring-plugins-${pluginVersion}.tar.gz",
|
||||
flags => '--prefix=/usr/lib64/nagios/plugins \
|
||||
--with-nagios-user=icinga --with-nagios-group=icinga \
|
||||
--with-cgiurl=/icinga-mysql/cgi-bin',
|
||||
creates => '/usr/lib64/nagios/plugins/libexec',
|
||||
make => 'make && make install',
|
||||
require => User['icinga']
|
||||
}
|
||||
include monitoring-plugins
|
||||
|
||||
cmmi { 'mk-livestatus':
|
||||
url => "http://mathias-kettner.de/download/mk-livestatus-${livestatusVersion}.tar.gz",
|
||||
|
@ -577,7 +568,7 @@ populate_monitoring_test_config { ['commands', 'contacts', 'dependencies',
|
|||
}
|
||||
|
||||
define populate_monitoring_test_config_plugins {
|
||||
file { "/usr/lib64/nagios/plugins/libexec/${name}":
|
||||
file { "/usr/lib64/nagios/plugins/${name}":
|
||||
owner => 'icinga',
|
||||
group => 'icinga',
|
||||
source => "/usr/local/share/misc/monitoring_test_config/plugins/${name}",
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class monitoring-plugins {
|
||||
include epel
|
||||
|
||||
# nagios plugins from epel
|
||||
package { 'nagios-plugins-all':
|
||||
ensure => installed,
|
||||
require => Class['epel']
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue