|
1 |
| -# Collect Metrics |
| 1 | +# @summary |
| 2 | +# This module manages the collection of Puppet and system Metrics |
| 3 | +# |
| 4 | +# @param puppetserver_metrics_ensure |
| 5 | +# Whether to enable or disable the collection of Puppetserver metrics. Valid values are 'present', and 'absent'. Default : 'present' |
| 6 | +# |
| 7 | +# @param output_dir |
| 8 | +# The directory to write the metrics to. Default: '/opt/puppetlabs/puppet-metrics-collector' |
| 9 | +# |
| 10 | +# @param collection_frequency |
| 11 | +# The frequency to collect metrics in minutes. Default: '5' |
| 12 | +# |
| 13 | +# @param retention_days |
| 14 | +# The number of days to retain metrics. Default: '90' |
| 15 | +# |
| 16 | +# @param puppetserver_hosts |
| 17 | +# The list of puppetserver hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the puppetserver profile. |
| 18 | +# |
| 19 | +# @param puppetserver_port |
| 20 | +# Port to connect to puppetserver on. Default: '8140' |
| 21 | +# |
| 22 | +# @param puppetdb_metrics_ensure |
| 23 | +# Whether to enable or disable the collection of PuppetDB metrics. Valid values are 'present', and 'absent'. Default : 'present' |
| 24 | +# |
| 25 | +# @param puppetdb_hosts |
| 26 | +# The list of puppetdb hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the puppetdb profile. |
| 27 | +# |
| 28 | +# @param puppetdb_port |
| 29 | +# Port to connect to puppetdb on. Default: '8081' |
| 30 | +# |
| 31 | +# @param orchestrator_metrics_ensure |
| 32 | +# Whether to enable or disable the collection of Orchestrator metrics. Valid values are 'present', and 'absent'. Default : 'present' |
| 33 | +# |
| 34 | +# @param orchestrator_hosts |
| 35 | +# The list of orchestrator hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the orchestrator profile. |
| 36 | +# |
| 37 | +# @param orchestrator_port |
| 38 | +# Port to connect to orchestrator on. Default: '8143' |
| 39 | +# |
| 40 | +# @param ace_metrics_ensure |
| 41 | +# Whether to enable or disable the collection of Ace metrics. Valid values are 'present', and 'absent'. Default : 'present' |
| 42 | +# |
| 43 | +# @param ace_hosts |
| 44 | +# The list of ace hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the ace profile. |
| 45 | +# |
| 46 | +# @param ace_port |
| 47 | +# Port to connect to ace on. Default: '44633' |
| 48 | +# |
| 49 | +# @param bolt_metrics_ensure |
| 50 | +# Whether to enable or disable the collection of Bolt metrics. Valid values are 'present', and 'absent'. Default : 'present' |
| 51 | +# |
| 52 | +# @param bolt_hosts |
| 53 | +# The list of bolt hosts to collect metrics from. Uses the hosts_with_pe_profile function to determine the list of hosts with the bolt profile. |
| 54 | +# |
| 55 | +# @param bolt_port |
| 56 | +# Port to connect to bolt on. Default: '62658' |
| 57 | +# |
| 58 | +# @param metrics_server_type |
| 59 | +# Optional Enum['influxdb','graphite','splunk_hec']: The metrics server type to send data to. Default: undef |
| 60 | +# |
| 61 | +# @ param metrics_server_hostname |
| 62 | +# Optional String: The hostname of the metrics server to send data to. Default: undef |
| 63 | +# |
| 64 | +# @ param metrics_server_port |
| 65 | +# Optional Integer: The port number of the metrics server to send data to. Default: undef |
| 66 | +# |
| 67 | +# @param metrics_server_db_name |
| 68 | +# Optional String: The database name on the metrics server to send data to. |
| 69 | +# Required for metrics_server_type of influxdb. Default: undef |
| 70 | +# |
| 71 | +# @param override_metrics_command |
| 72 | +# Optional String: Allows you to define the command that is executed to gather metrics. Default: undef |
| 73 | +# |
2 | 74 | class puppet_metrics_collector (
|
3 | 75 | String $puppetserver_metrics_ensure = 'present',
|
4 | 76 | String $output_dir = '/opt/puppetlabs/puppet-metrics-collector',
|
|
48 | 120 | file { "${scripts_dir}/create-metrics-archive":
|
49 | 121 | ensure => file,
|
50 | 122 | mode => '0755',
|
51 |
| - source => 'puppet:///modules/puppet_metrics_collector/create-metrics-archive' |
| 123 | + source => 'puppet:///modules/puppet_metrics_collector/create-metrics-archive', |
52 | 124 | }
|
53 | 125 |
|
54 | 126 | file { "${scripts_dir}/metrics_tidy":
|
55 | 127 | ensure => file,
|
56 | 128 | mode => '0744',
|
57 |
| - source => 'puppet:///modules/puppet_metrics_collector/metrics_tidy' |
| 129 | + source => 'puppet:///modules/puppet_metrics_collector/metrics_tidy', |
58 | 130 | }
|
59 | 131 | }
|
60 | 132 |
|
|
65 | 137 | file { "${scripts_dir}/json2timeseriesdb" :
|
66 | 138 | ensure => file,
|
67 | 139 | mode => '0755',
|
68 |
| - source => 'puppet:///modules/puppet_metrics_collector/json2timeseriesdb' |
| 140 | + source => 'puppet:///modules/puppet_metrics_collector/json2timeseriesdb', |
69 | 141 | }
|
70 | 142 |
|
71 | 143 | file { "${scripts_dir}/pe_metrics.rb" :
|
72 | 144 | ensure => file,
|
73 | 145 | mode => '0755',
|
74 |
| - source => 'puppet:///modules/puppet_metrics_collector/pe_metrics.rb' |
| 146 | + source => 'puppet:///modules/puppet_metrics_collector/pe_metrics.rb', |
75 | 147 | }
|
76 | 148 |
|
77 | 149 | file { "${scripts_dir}/puma_metrics" :
|
78 | 150 | ensure => file,
|
79 | 151 | mode => '0755',
|
80 |
| - source => 'puppet:///modules/puppet_metrics_collector/puma_metrics' |
| 152 | + source => 'puppet:///modules/puppet_metrics_collector/puma_metrics', |
81 | 153 | }
|
82 | 154 |
|
83 | 155 | file { "${scripts_dir}/tk_metrics" :
|
84 | 156 | ensure => file,
|
85 | 157 | mode => '0755',
|
86 |
| - source => 'puppet:///modules/puppet_metrics_collector/tk_metrics' |
| 158 | + source => 'puppet:///modules/puppet_metrics_collector/tk_metrics', |
87 | 159 | }
|
88 | 160 |
|
89 | 161 | exec { 'puppet_metrics_collector_daemon_reload':
|
|
0 commit comments