Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## usage nagios::nrpe_command{"check_mysqldump": command => "check_file_age", parameters => "-f /srv/backup/mysql.dump -w 86400 -c 90000 -W 8000 -C 8000" } nagios::nrpe_command{"check_mysqldump": command => "check_file.pl", parameters => "--file /srv/backup/mysql/latest --warnage=89999 --critage=90000 --critsize=300000000 --warnsize=60000000 --larger", cplugdir => "/usr/local/bin", } class nagios::nrpe::check_oracle_expfull { if $nrpe_oracle_expfull_warn { $oracle_expfull_warn = $nrpe_oracle_expfull_warn } else { $oracle_expfull_warn = "150000000" } if $nrpe_oracle_expfull_crit { $oracle_expfull_crit = $nrpe_oracle_expfull_crit } else { $oracle_expfull_crit = "150000000" } nagios::nrpe_command{"check_oracle_expfull": command => "check_file.pl", parameters => "--file /srv/backup/oracle/expfull.latest --warnage=89999 --critage=90000 --critsize=${oracle_expfull_crit} --warnsize= ${oracle_expfull_warn} --larger", cplugdir => "/usr/local/bin", } } ## define define nagios::nrpe_command ($command, $parameters, $cplugdir="auto", $ensure="present") { # find out the default nagios paths for plugis $defaultdir = $architecture ? { "x86_64" => "/usr/lib64/nagios/plugins", default => "/usr/lib/nagios/plugins" } # if we overrode cplugdir then use that, else go with the nagios default # for this architecture case $cplugdir { auto: { $plugdir = $defaultdir } default: { $plugdir = $cplugdir } } case $ensure { "absent": { file{"/etc/nagios/nrpe.d/${name}.cfg": ensure => absent } } default: { file {"/etc/nagios/nrpe.d/${name}.cfg": owner => root, group => root, mode => 644, content => template("nagios/nrpe-config.erb"), require => File["/etc/nagios/nrpe.d"], } } } }
This paste will be private.
From the Design Piracy series on my blog: