Skip to content

Commit

Permalink
Merge pull request #141 from SimonHoenscheid/shoenscheid_influx_bucke…
Browse files Browse the repository at this point in the history
…t_retention_time

Add influxdb_bucket_retention_rules parameter
  • Loading branch information
m0dular authored Feb 28, 2023
2 parents ac17820 + d9717f6 commit 021eb57
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Name of the InfluxDB organization to configure. Defaults to the value of influxdb::initial_org, or 'puppetlabs' if unset
# @param initial_bucket
# Name of the InfluxDB bucket to configure and query. Defaults to the value of influxdb::initial_bucket, or 'puppet_data' if unset
# @param influxdb_bucket_retention_rules
# Value for the initial InfluxDB bucket retention rules, Values are the same as in the influx_bucket type of the InfluxDB module.
# @param influxdb_token
# InfluxDB admin token in Sensitive format. Defaults to the value of influxdb::token.
# See the puppetlabs/influxdb documentation for more information about this token.
Expand All @@ -39,6 +41,7 @@
Integer $influxdb_port = lookup(influxdb::port, undef, undef, 8086),
String $initial_org = lookup(influxdb::initial_org, undef, undef, 'puppetlabs'),
String $initial_bucket = lookup(influxdb::initial_bucket, undef, undef, 'puppet_data'),
Array $influxdb_bucket_retention_rules = [{ 'type' => 'expire', 'everySeconds' => 7776000, 'shardGroupDurationSeconds' => 604800 }],

Optional[Sensitive[String]] $influxdb_token = lookup(influxdb::token, undef, undef, undef),
Optional[Sensitive[String]] $telegraf_token = undef,
Expand Down Expand Up @@ -69,17 +72,18 @@
use_ssl => $use_ssl,
port => $influxdb_port,
token => $influxdb_token,
require => Class['influxdb'],
token_file => $influxdb_token_file,
require => Class['influxdb'],
}
influxdb_bucket { $initial_bucket:
ensure => present,
use_ssl => $use_ssl,
port => $influxdb_port,
org => $initial_org,
token => $influxdb_token,
require => [Class['influxdb'], Influxdb_org[$initial_org]],
token_file => $influxdb_token_file,
ensure => present,
use_ssl => $use_ssl,
port => $influxdb_port,
org => $initial_org,
token => $influxdb_token,
retention_rules => $influxdb_bucket_retention_rules,
token_file => $influxdb_token_file,
require => [Class['influxdb'], Influxdb_org[$initial_org]],
}

Influxdb_auth {
Expand Down

0 comments on commit 021eb57

Please sign in to comment.