Skip to content

Commit

Permalink
Merge pull request #46 from Sharpie/add-puppetdb-ha-metrics
Browse files Browse the repository at this point in the history
Add PuppetDB sync metrics
  • Loading branch information
npwalker committed Nov 13, 2017
2 parents b9d544e + deba0d8 commit 47a506c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Minor Release 4.6.0

## Improvements:
- Add PuppetDB HA Metrics
- [PR #46](https://github.com/npwalker/pe_metric_curl_cron_jobs/pull/46)

# Minor Release 4.5.0

## Improvements:
Expand Down
28 changes: 25 additions & 3 deletions manifests/puppetdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,32 @@
'url' => 'puppetlabs.puppetdb.database:name=PDBWritePool.pool.Wait' },
]

$ha_sync_metrics = [
{ 'name' => 'ha_last-sync-succeeded',
'url' => 'puppetlabs.puppetdb.ha:name=last-sync-succeeded' },
{ 'name' => 'ha_seconds-since-last-successful-sync',
'url' => 'puppetlabs.puppetdb.ha:name=seconds-since-last-successful-sync' },
{ 'name' => 'ha_failed-request-counter',
'url' => 'puppetlabs.puppetdb.ha:name=failed-request-counter' },
{ 'name' => 'ha_sync-duration',
'url' => 'puppetlabs.puppetdb.ha:name=sync-duration' },
{ 'name' => 'ha_catalogs-sync-duration',
'url' => 'puppetlabs.puppetdb.ha:name=catalogs-sync-duration' },
{ 'name' => 'ha_reports-sync-duration',
'url' => 'puppetlabs.puppetdb.ha:name=reports-sync-duration' },
{ 'name' => 'ha_factsets-sync-duration',
'url' => 'puppetlabs.puppetdb.ha:name=factsets-sync-duration' },
{ 'name' => 'ha_nodes-sync-duration',
'url' => 'puppetlabs.puppetdb.ha:name=nodes-sync-duration' },
{ 'name' => 'ha_record-transfer-duration',
'url' => 'puppetlabs.puppetdb.ha:name=record-transfer-duration' },
]

$additional_metrics = $::pe_server_version ? {
/^2015./ => $activemq_metrics,
/^2016./ => $activemq_metrics + $base_metrics + $storage_metrics + $connection_pool_metrics + $version_specific_metrics,
default => $base_metrics + $storage_metrics + $connection_pool_metrics + $version_specific_metrics,
/^2015\./ => $activemq_metrics,
/^2016\.[45]\./ => $activemq_metrics + $base_metrics + $storage_metrics + $connection_pool_metrics + $version_specific_metrics + $ha_sync_metrics,
/^2016\./ => $activemq_metrics + $base_metrics + $storage_metrics + $connection_pool_metrics + $version_specific_metrics,
default => $base_metrics + $storage_metrics + $connection_pool_metrics + $version_specific_metrics + $ha_sync_metrics,
}

$_ssl = $hosts ? {
Expand Down
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.5.0",
"version": "4.6.0",
"author": "npwalker",
"summary": "A Puppet module for gathering metrics from PE components",
"license": "Apache-2.0",
Expand Down

0 comments on commit 47a506c

Please sign in to comment.