Showing with 22 additions and 2 deletions.
  1. +6 −0 CHANGELOG.md
  2. +2 −0 manifests/pe_metric.pp
  3. +13 −1 manifests/puppetdb.pp
  4. +1 −1 metadata.json
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Z Release 4.4.1

## Bug Fixes:
- PuppetDB metrics could not be gathered by default in PE < 2016.4.0
- [PR #39](https://github.com/npwalker/pe_metric_curl_cron_jobs/pull/39)

# Minor Release 4.4.0

## Improvements
Expand Down
2 changes: 2 additions & 0 deletions manifests/pe_metric.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Integer $retention_days = 90,
String $metric_script_file = 'tk_metrics',
Array[Hash] $additional_metrics = [],
Boolean $ssl = true,
) {

$metrics_output_dir = "${output_dir}/${metrics_type}"
Expand All @@ -27,6 +28,7 @@
'additional_metrics' => $additional_metrics,
'clientcert' => $::clientcert,
'pe_version' => $facts['pe_server_version'],
'ssl' => $ssl,
}

file { "${scripts_dir}/${metrics_type}_config.yaml" :
Expand Down
14 changes: 13 additions & 1 deletion manifests/puppetdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,22 @@
default => $base_metrics + $storage_metrics + $connection_pool_metrics + $version_specific_metrics,
}

$_ssl = $hosts ? {
[ '127.0.0.1' ] => false,
default => true,
}

if $port == 8081 and $_ssl == false {
$_port = 8080
} else {
$_port = $port
}

pe_metric_curl_cron_jobs::pe_metric { 'puppetdb' :
metric_ensure => $metrics_ensure,
hosts => $hosts,
metrics_port => $port,
metrics_port => $_port,
ssl => $_ssl,
additional_metrics => $additional_metrics,
}
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "npwalker/pe_metric_curl_cron_jobs",
"version": "4.4.0",
"version": "4.4.1",
"author": "npwalker",
"summary": "A Puppet module for gathering metrics from PE components",
"license": "Apache-2.0",
Expand Down