Puppet Class: cloudinsight_agent::integrations::postgres
- Inherits:
- cloudinsight_agent::params
- Defined in:
- manifests/integrations/postgres.pp
Overview
Class: cloudinsight_agent::integrations::postgres
This class will install the necessary configuration for the postgres integration
Parameters:
$host:
The host postgres is running on
$dbname
The postgres database name
$port
The postgres port number
$username
The username for the cloudinsight user
$password
The password for the cloudinsight user
$tags
Optional array of tags
$tables
Track per relation/table metrics. Array of strings.
Warning: this can collect lots of metrics per relation
(10 + 10 per index)
Sample Usage:
class { 'cloudinsight_agent::integrations::postgres' :
host => 'localhost',
dbname => 'postgres'
username => 'cloudinsight',
password => 'some_pass',
}
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'manifests/integrations/postgres.pp', line 33
class cloudinsight_agent::integrations::postgres(
$host = 'localhost',
$dbname = 'postgres',
$port = '5432',
$username = 'cloudinsight',
$password,
$tags = [],
$tables = []
) inherits cloudinsight_agent::params {
validate_array($tags)
validate_array($tables)
file { "${cloudinsight_agent::params::conf_dir}/postgres.yaml":
ensure => file,
owner => $cloudinsight_agent::params::cloudinsight_user,
group => $cloudinsight_agent::params::cloudinsight_group,
mode => '0600',
content => template('cloudinsight_agent/agent-conf.d/postgres.yaml.erb'),
require => Package[$cloudinsight_agent::params::package_name],
notify => Service[$cloudinsight_agent::params::service_name],
}
}
|