diff --git a/manifests/plugin/amqp.pp b/manifests/plugin/amqp.pp index 4873915e4..cf4d3f494 100644 --- a/manifests/plugin/amqp.pp +++ b/manifests/plugin/amqp.pp @@ -11,12 +11,14 @@ $amqppersistent = true, $graphiteprefix = 'collectd.', $escapecharacter = '_', + $interval = undef, ) { validate_bool($amqppersistent) collectd::plugin {'amqp': - ensure => $ensure, - content => template('collectd/plugin/amqp.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/amqp.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/apache.pp b/manifests/plugin/apache.pp index 7927cdd6a..faed54ded 100644 --- a/manifests/plugin/apache.pp +++ b/manifests/plugin/apache.pp @@ -2,6 +2,7 @@ class collectd::plugin::apache ( $ensure = present, $instances = { 'localhost' => { 'url' => 'http://localhost/mod_status?auto' } }, + $interval = undef, ) { validate_hash($instances) @@ -13,7 +14,8 @@ } collectd::plugin {'apache': - ensure => $ensure, - content => template('collectd/plugin/apache.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/apache.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/bind.pp b/manifests/plugin/bind.pp index 2212c2cb7..51d2bb7d7 100644 --- a/manifests/plugin/bind.pp +++ b/manifests/plugin/bind.pp @@ -10,6 +10,7 @@ $serverstats = true, $zonemaintstats = true, $views = [], + $interval = undef, ) { validate_bool( @@ -24,7 +25,8 @@ validate_array($views) collectd::plugin {'bind': - ensure => $ensure, - content => template('collectd/plugin/bind.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/bind.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/contextswitch.pp b/manifests/plugin/contextswitch.pp index 8ac9d2fb9..1c3d7f6df 100644 --- a/manifests/plugin/contextswitch.pp +++ b/manifests/plugin/contextswitch.pp @@ -1,8 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:ContextSwitch class collectd::plugin::contextswitch ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'contextswitch': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/cpu.pp b/manifests/plugin/cpu.pp index d496f7ca7..3de279df1 100644 --- a/manifests/plugin/cpu.pp +++ b/manifests/plugin/cpu.pp @@ -1,8 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:CPU class collectd::plugin::cpu ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'cpu': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/csv.pp b/manifests/plugin/csv.pp index 1f4e07ce5..ac1f9c33e 100644 --- a/manifests/plugin/csv.pp +++ b/manifests/plugin/csv.pp @@ -2,11 +2,13 @@ class collectd::plugin::csv ( $ensure = present, $datadir = '/etc/collectd/var/lib/collectd/csv', + $interval = undef, $storerates = false ) { collectd::plugin {'csv': - ensure => $ensure, - content => template('collectd/plugin/csv.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/csv.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/curl.pp b/manifests/plugin/curl.pp index 0fc368a19..da577ad61 100644 --- a/manifests/plugin/curl.pp +++ b/manifests/plugin/curl.pp @@ -1,10 +1,12 @@ # class collectd::plugin::curl ( - $ensure = present, - $pages = { }, + $ensure = present, + $interval = undef, + $pages = { }, ) { collectd::plugin {'curl': - ensure => $ensure, + ensure => $ensure, + interval => $interval, } $defaults = { 'ensure' => $ensure diff --git a/manifests/plugin/df.pp b/manifests/plugin/df.pp index 24b561780..228b2f577 100644 --- a/manifests/plugin/df.pp +++ b/manifests/plugin/df.pp @@ -3,6 +3,7 @@ $ensure = present, $fstypes = [], $ignoreselected = false, + $interval = undef, $mountpoints = [], $reportbydevice = false, $reportinodes = true, @@ -25,7 +26,8 @@ ) collectd::plugin {'df': - ensure => $ensure, - content => template('collectd/plugin/df.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/df.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/disk.pp b/manifests/plugin/disk.pp index 02fe1ea4d..4f69530ff 100644 --- a/manifests/plugin/disk.pp +++ b/manifests/plugin/disk.pp @@ -3,13 +3,15 @@ $ensure = present, $disks = [], $ignoreselected = false, + $interval = undef, ) { validate_array($disks) validate_bool($ignoreselected) collectd::plugin {'disk': - ensure => $ensure, - content => template('collectd/plugin/disk.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/disk.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/entropy.pp b/manifests/plugin/entropy.pp index 19c313a31..5588495a3 100644 --- a/manifests/plugin/entropy.pp +++ b/manifests/plugin/entropy.pp @@ -1,9 +1,11 @@ # https://collectd.org/wiki/index.php/Plugin:Entropy class collectd::plugin::entropy ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'entropy': - ensure => $ensure, + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/filecount.pp b/manifests/plugin/filecount.pp index a8829582b..6f876b193 100644 --- a/manifests/plugin/filecount.pp +++ b/manifests/plugin/filecount.pp @@ -2,9 +2,11 @@ class collectd::plugin::filecount ( $ensure = present, $directories = {}, + $interval = undef, ) { collectd::plugin {'filecount': - ensure => $ensure, - content => template('collectd/plugin/filecount.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/filecount.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/interface.pp b/manifests/plugin/interface.pp index ef3702eaa..0db3e75f0 100644 --- a/manifests/plugin/interface.pp +++ b/manifests/plugin/interface.pp @@ -3,13 +3,15 @@ $ensure = present, $interfaces = [], $ignoreselected = false, + $interval = undef, ) { validate_array($interfaces) validate_bool($ignoreselected) collectd::plugin {'interface': - ensure => $ensure, - content => template('collectd/plugin/interface.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/interface.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/iptables.pp b/manifests/plugin/iptables.pp index ee12324b4..edb3862d1 100644 --- a/manifests/plugin/iptables.pp +++ b/manifests/plugin/iptables.pp @@ -1,12 +1,14 @@ # https://collectd.org/wiki/index.php/Plugin:IPTables class collectd::plugin::iptables ( - $ensure = present, - $chains = {}, + $ensure = present, + $chains = {}, + $interval = undef, ) { validate_hash($chains) collectd::plugin {'iptables': - ensure => $ensure, - content => template('collectd/plugin/iptables.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/iptables.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/irq.pp b/manifests/plugin/irq.pp index 810f9a8a5..2cb533efe 100644 --- a/manifests/plugin/irq.pp +++ b/manifests/plugin/irq.pp @@ -3,12 +3,14 @@ $ensure = present, $irqs = [], $ignoreselected = false, + $interval = undef, ) { validate_array($irqs) validate_bool($ignoreselected) collectd::plugin {'irq': - ensure => $ensure, - content => template('collectd/plugin/irq.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/irq.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/libvirt.pp b/manifests/plugin/libvirt.pp index 88c2f945e..a72d5d78f 100644 --- a/manifests/plugin/libvirt.pp +++ b/manifests/plugin/libvirt.pp @@ -8,7 +8,8 @@ $interface_device = undef, $ignore_selected = undef, $hostname_format = undef, - $interface_format = undef + $interface_format = undef, + $interval = undef, ) { validate_string($connection) @@ -27,7 +28,8 @@ } collectd::plugin { 'libvirt': - ensure => $ensure, - content => template('collectd/plugin/libvirt.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/libvirt.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/load.pp b/manifests/plugin/load.pp index 9482316c4..d79bcf281 100644 --- a/manifests/plugin/load.pp +++ b/manifests/plugin/load.pp @@ -1,8 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:Load class collectd::plugin::load ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'load': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/logfile.pp b/manifests/plugin/logfile.pp index 772274c32..b58afe8b6 100644 --- a/manifests/plugin/logfile.pp +++ b/manifests/plugin/logfile.pp @@ -1,15 +1,17 @@ # https://collectd.org/wiki/index.php/Plugin:LogFile class collectd::plugin::logfile ( $ensure = present, + $interval = undef, $log_level = 'info', $log_file = '/var/log/collectd.log', $log_timestamp = true ) { collectd::plugin { 'logfile': - ensure => $ensure, - content => template('collectd/plugin/logfile.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/logfile.conf.erb'), + interval => $interval, # Load logging plugin first # https://github.com/pdxcat/puppet-module-collectd/pull/166#issuecomment-50591413 - order => '05', + order => '05', } } diff --git a/manifests/plugin/memcached.pp b/manifests/plugin/memcached.pp index 1d77811d8..1e360958f 100644 --- a/manifests/plugin/memcached.pp +++ b/manifests/plugin/memcached.pp @@ -1,11 +1,13 @@ # https://collectd.org/wiki/index.php/Plugin:memcached class collectd::plugin::memcached ( - $ensure = present, - $host = '127.0.0.1', - $port = 11211, + $ensure = present, + $host = '127.0.0.1', + $interval = undef, + $port = 11211, ) { collectd::plugin {'memcached': - ensure => $ensure, - content => template('collectd/plugin/memcached.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/memcached.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/memory.pp b/manifests/plugin/memory.pp index 0752a8a06..23e5a7891 100644 --- a/manifests/plugin/memory.pp +++ b/manifests/plugin/memory.pp @@ -1,8 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:Memory class collectd::plugin::memory ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'memory': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/mysql.pp b/manifests/plugin/mysql.pp index 312c2831d..8830123f5 100644 --- a/manifests/plugin/mysql.pp +++ b/manifests/plugin/mysql.pp @@ -1,5 +1,9 @@ # MySQL plugin # https://collectd.org/wiki/index.php/Plugin:MySQL -class collectd::plugin::mysql { - collectd::plugin { 'mysql': } +class collectd::plugin::mysql ( + $interval = undef, +){ + collectd::plugin { 'mysql': + interval => $interval, + } } diff --git a/manifests/plugin/network.pp b/manifests/plugin/network.pp index 4b9beeac4..d3bed9511 100644 --- a/manifests/plugin/network.pp +++ b/manifests/plugin/network.pp @@ -4,6 +4,7 @@ $timetolive = undef, $maxpacketsize = undef, $forward = undef, + $interval = undef, $reportstats = undef, $listeners = { }, $servers = { }, @@ -16,8 +17,9 @@ } collectd::plugin {'network': - ensure => $ensure, - content => template('collectd/plugin/network.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/network.conf.erb'), + interval => $interval, } $defaults = { 'ensure' => $ensure diff --git a/manifests/plugin/nfs.pp b/manifests/plugin/nfs.pp index e862fcc91..a9c72582c 100644 --- a/manifests/plugin/nfs.pp +++ b/manifests/plugin/nfs.pp @@ -1,8 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:NFS class collectd::plugin::nfs ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'nfs': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/nginx.pp b/manifests/plugin/nginx.pp index 102256433..cb0fbdc70 100644 --- a/manifests/plugin/nginx.pp +++ b/manifests/plugin/nginx.pp @@ -7,10 +7,12 @@ $verifypeer = undef, $verifyhost = undef, $cacert = undef, + $interval = undef, ) { collectd::plugin {'nginx': - ensure => $ensure, - content => template('collectd/plugin/nginx.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/nginx.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/ntpd.pp b/manifests/plugin/ntpd.pp index 650c38792..e0d21f0b1 100644 --- a/manifests/plugin/ntpd.pp +++ b/manifests/plugin/ntpd.pp @@ -5,9 +5,11 @@ $port = 123, $reverselookups = false, $includeunitid = false, + $interval = undef, ) { collectd::plugin {'ntpd': - ensure => $ensure, - content => template('collectd/plugin/ntpd.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/ntpd.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/openvpn.pp b/manifests/plugin/openvpn.pp index 6d3475417..a572d098d 100644 --- a/manifests/plugin/openvpn.pp +++ b/manifests/plugin/openvpn.pp @@ -6,6 +6,7 @@ $collectcompression = true, $collectindividualusers = true, $collectusercount = false, + $interval = undef, ) { validate_absolute_path($statusfile) validate_bool( @@ -16,7 +17,8 @@ ) collectd::plugin {'openvpn': - ensure => $ensure, - content => template('collectd/plugin/openvpn.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/openvpn.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/perl.pp b/manifests/plugin/perl.pp index 2eb2faaeb..2b8af65e5 100644 --- a/manifests/plugin/perl.pp +++ b/manifests/plugin/perl.pp @@ -1,17 +1,19 @@ # See http://collectd.org/documentation/manpages/collectd-perl.5.shtml class collectd::plugin::perl ( - $ensure = present, - $order = 20 + $ensure = present, + $interval = undef, + $order = 20 ) { include collectd::params $conf_dir = $collectd::params::plugin_conf_dir collectd::plugin { 'perl': - ensure => $ensure, - globals => true, - order => $order, - content => template('collectd/plugin/perl.conf.erb') + ensure => $ensure, + globals => true, + interval => $interval, + order => $order, + content => template('collectd/plugin/perl.conf.erb'), } file { "${conf_dir}/perl": diff --git a/manifests/plugin/postgresql.pp b/manifests/plugin/postgresql.pp index e2bdaf7ca..e3f7b21ca 100644 --- a/manifests/plugin/postgresql.pp +++ b/manifests/plugin/postgresql.pp @@ -2,13 +2,15 @@ class collectd::plugin::postgresql ( $ensure = present, $databases = { }, + $interval = undef, $queries = { }, $writers = { }, ) { include collectd::params collectd::plugin {'postgresql': - ensure => $ensure, + ensure => $ensure, + interval => $interval, } concat{"${collectd::params::plugin_conf_dir}/postgresql-config.conf": diff --git a/manifests/plugin/processes.pp b/manifests/plugin/processes.pp index e61836d06..113d6e69a 100644 --- a/manifests/plugin/processes.pp +++ b/manifests/plugin/processes.pp @@ -1,6 +1,7 @@ # See http://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_processes class collectd::plugin::processes ( $ensure = present, + $interval = undef, $processes = undef, $process_matches = undef, ) { @@ -8,7 +9,8 @@ if $process_matches { validate_array($process_matches) } collectd::plugin {'processes': - ensure => $ensure, - content => template('collectd/plugin/processes.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/processes.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/redis.pp b/manifests/plugin/redis.pp index 32ae30902..eee54b4ea 100644 --- a/manifests/plugin/redis.pp +++ b/manifests/plugin/redis.pp @@ -1,6 +1,7 @@ # https://collectd.org/wiki/index.php/Plugin:Redis class collectd::plugin::redis ( $ensure = 'present', + $interval = undef, $nodes = { 'redis' => { 'host' => 'localhost', 'port' => '6379', @@ -12,7 +13,8 @@ validate_hash($nodes) collectd::plugin {'redis': - ensure => $ensure, - content => template('collectd/plugin/redis.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/redis.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/rrdcached.pp b/manifests/plugin/rrdcached.pp index b2fd1a359..92ee2f6fa 100644 --- a/manifests/plugin/rrdcached.pp +++ b/manifests/plugin/rrdcached.pp @@ -7,6 +7,7 @@ $createfilesasync = false, $stepsize = undef, $heartbeat = undef, + $interval = undef, $rrarows = undef, $rratimespan = [], $xff = undef, @@ -15,7 +16,8 @@ validate_bool($createfiles, $createfilesasync) collectd::plugin {'rrdcached': - ensure => $ensure, - content => template('collectd/plugin/rrdcached.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/rrdcached.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/rrdtool.pp b/manifests/plugin/rrdtool.pp index 273295eee..84f5adca8 100644 --- a/manifests/plugin/rrdtool.pp +++ b/manifests/plugin/rrdtool.pp @@ -3,6 +3,7 @@ $ensure = present, $datadir = '/var/lib/collectd/rrd', $createfilesasync = false, + $interval = undef, $rrarows = 1200, $rratimespan = [3600, 86400, 604800, 2678400, 31622400], $xff = 0.1, @@ -49,7 +50,8 @@ } collectd::plugin {'rrdtool': - ensure => $ensure, - content => template('collectd/plugin/rrdtool.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/rrdtool.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/sensors.pp b/manifests/plugin/sensors.pp index e00c7391f..b2ff334eb 100644 --- a/manifests/plugin/sensors.pp +++ b/manifests/plugin/sensors.pp @@ -2,11 +2,13 @@ $sensorconfigfile = undef, $sensor = undef, $ignoreselected = undef, + $interval = undef, $ensure = present ) { collectd::plugin {'sensors': - ensure => $ensure, - content => template('collectd/plugin/sensors.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/sensors.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/snmp.pp b/manifests/plugin/snmp.pp index 11a630156..1c4b43ca3 100644 --- a/manifests/plugin/snmp.pp +++ b/manifests/plugin/snmp.pp @@ -1,13 +1,15 @@ # https://collectd.org/wiki/index.php/Plugin:SNMP class collectd::plugin::snmp ( - $ensure = present, - $data = undef, - $hosts = undef, + $ensure = present, + $data = undef, + $hosts = undef, + $interval = undef, ) { validate_hash($data, $hosts) collectd::plugin {'snmp': - ensure => $ensure, - content => template('collectd/plugin/snmp.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/snmp.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/statsd.pp b/manifests/plugin/statsd.pp index 1767a63f7..931f52867 100644 --- a/manifests/plugin/statsd.pp +++ b/manifests/plugin/statsd.pp @@ -7,11 +7,13 @@ $deletetimers = undef, $deletegauges = undef, $deletesets = undef, + $interval = undef, $timerpercentile = undef, ) { collectd::plugin {'statsd': - ensure => $ensure, - content => template('collectd/plugin/statsd.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/statsd.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/swap.pp b/manifests/plugin/swap.pp index 4fb39250c..aa04f1ada 100644 --- a/manifests/plugin/swap.pp +++ b/manifests/plugin/swap.pp @@ -1,6 +1,7 @@ # https://collectd.org/wiki/index.php/Plugin:Swap class collectd::plugin::swap ( $ensure = present, + $interval = undef, $reportbydevice = false, $reportbytes = true, ) { @@ -10,7 +11,8 @@ ) collectd::plugin {'swap': - ensure => $ensure, - content => template('collectd/plugin/swap.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/swap.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/syslog.pp b/manifests/plugin/syslog.pp index b74798902..5a6e7e50d 100644 --- a/manifests/plugin/syslog.pp +++ b/manifests/plugin/syslog.pp @@ -1,14 +1,16 @@ # https://collectd.org/wiki/index.php/Plugin:SysLog class collectd::plugin::syslog ( $ensure = present, + $interval = undef, $log_level = 'info' ) { collectd::plugin {'syslog': - ensure => $ensure, - content => template('collectd/plugin/syslog.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/syslog.conf.erb'), + interval => $interval, # Load logging plugin first # https://github.com/pdxcat/puppet-module-collectd/pull/166#issuecomment-50591413 - order => '05', + order => '05', } } diff --git a/manifests/plugin/tail.pp b/manifests/plugin/tail.pp index a2f52cf78..cead3f41c 100644 --- a/manifests/plugin/tail.pp +++ b/manifests/plugin/tail.pp @@ -1,6 +1,10 @@ # Tail plugin # https://collectd.org/wiki/index.php/Plugin:Tail -class collectd::plugin::tail { - collectd::plugin { 'tail': } +class collectd::plugin::tail ( + $interval = undef, +){ + collectd::plugin { 'tail': + interval => $interval, + } } diff --git a/manifests/plugin/tcpconns.pp b/manifests/plugin/tcpconns.pp index ca9add35f..7ff6db997 100644 --- a/manifests/plugin/tcpconns.pp +++ b/manifests/plugin/tcpconns.pp @@ -3,6 +3,7 @@ $localports = undef, $remoteports = undef, $listening = undef, + $interval = undef, $ensure = present ) { @@ -15,7 +16,8 @@ } collectd::plugin {'tcpconns': - ensure => $ensure, - content => template('collectd/plugin/tcpconns.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/tcpconns.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/unixsock.pp b/manifests/plugin/unixsock.pp index 02196a296..511a82bc2 100644 --- a/manifests/plugin/unixsock.pp +++ b/manifests/plugin/unixsock.pp @@ -4,12 +4,14 @@ $socketgroup = 'collectd', $socketperms = '0770', $deletesocket = false, - $ensure = present + $ensure = present, + $interval = undef, ) { validate_absolute_path($socketfile) collectd::plugin {'unixsock': - ensure => $ensure, - content => template('collectd/plugin/unixsock.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/unixsock.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/uptime.pp b/manifests/plugin/uptime.pp index 13224aae7..9c847876b 100644 --- a/manifests/plugin/uptime.pp +++ b/manifests/plugin/uptime.pp @@ -1,8 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:Uptime class collectd::plugin::uptime ( $ensure = present, + $interval = undef, ) { collectd::plugin {'uptime': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/users.pp b/manifests/plugin/users.pp index 967d82878..7ad1b081b 100644 --- a/manifests/plugin/users.pp +++ b/manifests/plugin/users.pp @@ -1,9 +1,11 @@ # https://collectd.org/wiki/index.php/Plugin:Users class collectd::plugin::users ( - $ensure = present, + $ensure = present, + $interval = undef, ) { collectd::plugin {'users': - ensure => $ensure + ensure => $ensure, + interval => $interval, } } diff --git a/manifests/plugin/varnish.pp b/manifests/plugin/varnish.pp index 399215cb0..1aeb9c74a 100644 --- a/manifests/plugin/varnish.pp +++ b/manifests/plugin/varnish.pp @@ -4,7 +4,8 @@ $instances = { 'localhost' => { } - } + }, + $interval = undef, ) { include collectd::params @@ -17,7 +18,8 @@ } collectd::plugin {'varnish': - ensure => $ensure, - content => template('collectd/plugin/varnish.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/varnish.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/vmem.pp b/manifests/plugin/vmem.pp index 53b7e8bd7..b68328ecb 100644 --- a/manifests/plugin/vmem.pp +++ b/manifests/plugin/vmem.pp @@ -1,10 +1,12 @@ # https://collectd.org/wiki/index.php/Plugin:vmem class collectd::plugin::vmem ( - $ensure = present, - $verbose = false, + $ensure = present, + $interval = undef, + $verbose = false, ) { collectd::plugin {'vmem': - ensure => $ensure, - content => template('collectd/plugin/vmem.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/vmem.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/write_graphite.pp b/manifests/plugin/write_graphite.pp index b9d646faf..045e25a01 100644 --- a/manifests/plugin/write_graphite.pp +++ b/manifests/plugin/write_graphite.pp @@ -6,6 +6,7 @@ $storerates = true, $graphiteprefix = 'collectd.', $graphitepostfix = undef, + $interval = undef, $escapecharacter = '_', $alwaysappendds = false, $protocol = 'tcp', @@ -17,7 +18,8 @@ validate_bool($logsenderrors) collectd::plugin {'write_graphite': - ensure => $ensure, - content => template('collectd/plugin/write_graphite.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/write_graphite.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/write_http.pp b/manifests/plugin/write_http.pp index df421d066..3497071bf 100644 --- a/manifests/plugin/write_http.pp +++ b/manifests/plugin/write_http.pp @@ -1,13 +1,15 @@ # https://collectd.org/wiki/index.php/Plugin:Write_HTTP class collectd::plugin::write_http ( $ensure = present, + $interval = undef, $urls = {}, ) { validate_hash($urls) collectd::plugin {'write_http': - ensure => $ensure, - content => template('collectd/plugin/write_http.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/write_http.conf.erb'), + interval => $interval, } } diff --git a/manifests/plugin/write_riemann.pp b/manifests/plugin/write_riemann.pp index 9cd4f1efa..95dd7d969 100644 --- a/manifests/plugin/write_riemann.pp +++ b/manifests/plugin/write_riemann.pp @@ -6,12 +6,14 @@ $protocol = 'UDP', $store_rates = false, $always_append_ds = false, + $interval = undef, ) { validate_bool($store_rates) validate_bool($always_append_ds) collectd::plugin {'write_riemann': - ensure => $ensure, - content => template('collectd/plugin/write_riemann.conf.erb'), + ensure => $ensure, + content => template('collectd/plugin/write_riemann.conf.erb'), + interval => $interval, } }