Classes
influxdb
: Main class that ties the module togetherinfluxdb::config
: Manages the configuration of InfluxDBinfluxdb::install
: Manages the installation of InfluxDBinfluxdb::service
: Manages the service of InfluxDB
Defined types
influxdb::database
: Manages a database within InfluxDBinfluxdb::retention_policy
: Manages a retention policy on a database, within InfluxDBinfluxdb::user
: Manages a user within InfluxDB
Resource types
influxdb_auth
: Setup http_auth in InfluxDB.influxdb_database
: Create or update a database in InfluxDB.influxdb_retention_policy
: Create or update a user in InfluxDB.influxdb_user
: Create or update a user in InfluxDB.
Manages InfluxDB
class { '::influxdb':
admin_username => $admin_username,
admin_password => $admin_password,
}
class { '::influxdb':
admin_username => $admin_username,
admin_password => $admin_password,
configuration => {
'data' => {
'dir' => '/mnt/influxdb/data',
'wal-dir' => '/mnt/influxdb/wal',
'max-series-per-database' => 0,
'max-values-per-tag' => 0,
}
},
databases => {
'prometheus' => {
'ensure' => present,
},
},
users => {
'grafana' => {
'password' => 'asdfghjkl!"§"!"$',
},
'prometheus' => {
'password' => 'asdfghjkl!"§"!"$',
},
}
}
The following parameters are available in the influxdb
class.
Data type: Enum['present','absent']
- Whether to create or destroy this resource
Default value: 'present'
Data type: Variant[String,Undef]
- Overwrite $ensure for the package only. Used if package needs to be anything but 'present' or 'absent'
Default value: undef
Data type: String
- The password used for the main admin account
Data type: String
- The username used for the main admin account
Data type: Hash
- The configuration to use. Default values will be provided for everything not written
Default value: {}
Data type: Integer
- The port which to connect to InfluxDB
Default value: 8086
Data type: String
- The path to the main configuration file
Default value: '/etc/influxdb/influxdb.conf'
Data type: String
- The group used for permission on for everything
Default value: 'influxdb'
Data type: String
- The owner used for permission on for everything
Default value: 'influxdb'
Data type: Hash[String, Hash[String, Any]]
- Create the provided databases. The hash is passed on to infludb::database
Default value: {}
Data type: Hash[String, Hash[String, Any]]
- Create the provided users. The hash is passed on to infludb::user via create_resources()
Default value: {}
Manages the configuration of InfluxDB
Use main class
Manages the installation of InfluxDB
Use main class
Manages the service of InfluxDB
Use main class
Creates or destroys a database within InfluxDB
influxdb::database { 'my_database_name': }
The following parameters are available in the influxdb::database
defined type.
Data type: Enum['present','absent']
- Create or destroy database
Default value: 'present'
- (namevar) The name of the database
Data type: String
Default value: $influxdb::admin_password
Data type: String
Default value: $influxdb::admin_username
Creates or destroys a retention policy on a database, within InfluxDB
influxdb::retention_policy { '1YearRetention':
database => 'prometheus',
duration => '8640h0m0s',
}
The following parameters are available in the influxdb::retention_policy
defined type.
Data type: Enum['present','absent']
- Create or destroy retention policies
Default value: 'present'
- (namevar) The name of the database
Data type: String
- The duration in which to keep metrics, in duration literals (https://docs.influxdata.com/influxdb/v1.7/query_language/spec/#durations)
Data type: Optional[String]
- The duration in which to keep shards. Set to undef to let InfluxDB decide
Default value: undef
Data type: String
- Which database the policy should be applied too
Data type: Integer
- The amount of replicas to use (should be the same as the number of nodes)
Default value: 1
Data type: Boolean
- Wheter the policy is the default for the database
Default value: true
Data type: String
Default value: $influxdb::admin_password
Data type: String
Default value: $influxdb::admin_username
Create, destroy or update a user within InfluxDB
influxdb::user { 'read_only_user':
password => 'mySuperSecretPassWORD',
privilege => 'READ',
database => 'my_database',
}
influxdb::user { 'admin2':
password => 'Admin?Need?Better&Password',
is_admin => true,
}
The following parameters are available in the influxdb::user
defined type.
Data type: Variant[Enum['READ', 'WRITE', 'ALL'],Undef]
- What privileges to give the user
Default value: undef
Data type: Boolean
- Whether the user should be created as an admin or not
Default value: false
Data type: Enum['present','absent']
- Create or destroy user
Default value: 'present'
Data type: Variant[String,Undef]
- What database the user should have $privileges too (only for non-admins)
Default value: undef
Data type: Variant[String,Undef]
- The plain-text password to give the user
Default value: undef
- (namevar) The username of the user
Data type: String
Default value: $influxdb::admin_password
Data type: String
Default value: $influxdb::admin_username
Setup http_auth in InfluxDB.
The following properties are available in the influxdb_auth
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the influxdb_auth
type.
namevar
A unique name for the resource
Admin username to manage the resource with
Admin password to manage the resource with
Path to the main config file
Create or update a database in InfluxDB.
The following properties are available in the influxdb_database
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The following parameters are available in the influxdb_database
type.
namevar
A unique name for the resource
Admin username to manage the resource with
Admin password to manage the resource with
The database to create
Create or update a user in InfluxDB.
The following properties are available in the influxdb_retention_policy
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
The duration to keep data for
The duration to keep shards for
The amount of replicas to use
Whether or not this policy is the default for the database
The following parameters are available in the influxdb_retention_policy
type.
namevar
A unique name for the resource
Admin username to manage the resource with
Admin password to manage the resource with
The retention policy to create
The database the retention policy should be applied to
Create or update a user in InfluxDB.
The following properties are available in the influxdb_user
type.
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
Which privilege to use
The following parameters are available in the influxdb_user
type.
namevar
A unique name for the resource
Admin username to manage the resource with
Admin password to manage the resource with
The user to create
Password for the user to create
Whether to user is a admin or normal user
Which database to grant access to