Showing with 83 additions and 25 deletions.
  1. +15 −0 CHANGELOG.md
  2. +28 −2 REFERENCE.md
  3. +2 −2 files/Filesync_performance.json
  4. +1 −1 files/Postgresql_performance.json
  5. +12 −8 manifests/init.pp
  6. +2 −2 manifests/profile/dashboards.pp
  7. +2 −2 metadata.json
  8. +14 −7 plans/load_metrics.pp
  9. +6 −0 plans/provision_dashboard.pp
  10. +1 −1 spec/classes/dashboards_spec.rb
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).

## [v1.10.0](https://github.com/puppetlabs/puppet_operational_dashboards/tree/v1.10.0) (2023-02-07)

[Full Changelog](https://github.com/puppetlabs/puppet_operational_dashboards/compare/v1.9.0...v1.10.0)

### Added

- Update default version of grafana installed [\#132](https://github.com/puppetlabs/puppet_operational_dashboards/pull/132) ([elainemccloskey](https://github.com/elainemccloskey))
- \(SUP-3459\) Add queries for G1GC metrics [\#124](https://github.com/puppetlabs/puppet_operational_dashboards/pull/124) ([m0dular](https://github.com/m0dular))
- Pass port to InfluxDB resources [\#118](https://github.com/puppetlabs/puppet_operational_dashboards/pull/118) ([m0dular](https://github.com/m0dular))

### Fixed

- Filesync dashboard cleanup [\#123](https://github.com/puppetlabs/puppet_operational_dashboards/pull/123) ([seanmil](https://github.com/seanmil))
- Ensure consistent config generation order [\#122](https://github.com/puppetlabs/puppet_operational_dashboards/pull/122) ([seanmil](https://github.com/seanmil))

## [v1.9.0](https://github.com/puppetlabs/puppet_operational_dashboards/tree/v1.9.0) (2022-12-02)

[Full Changelog](https://github.com/puppetlabs/puppet_operational_dashboards/compare/v1.8.0...v1.9.0)
Expand Down
30 changes: 28 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ The following parameters are available in the `puppet_operational_dashboards` cl
* [`influxdb_port`](#-puppet_operational_dashboards--influxdb_port)
* [`initial_org`](#-puppet_operational_dashboards--initial_org)
* [`initial_bucket`](#-puppet_operational_dashboards--initial_bucket)
* [`influxdb_bucket_retention_rules`](#-puppet_operational_dashboards--influxdb_bucket_retention_rules)
* [`influxdb_token`](#-puppet_operational_dashboards--influxdb_token)
* [`telegraf_token_name`](#-puppet_operational_dashboards--telegraf_token_name)
* [`manage_telegraf`](#-puppet_operational_dashboards--manage_telegraf)
Expand Down Expand Up @@ -102,6 +103,14 @@ Name of the InfluxDB bucket to configure and query. Defaults to the value of inf

Default value: `lookup(influxdb::initial_bucket, undef, undef, 'puppet_data')`

##### <a name="-puppet_operational_dashboards--influxdb_bucket_retention_rules"></a>`influxdb_bucket_retention_rules`

Data type: `Array`

Value for the initial InfluxDB bucket retention rules, Values are the same as in the influx_bucket type of the InfluxDB module.

Default value: `[{ 'type' => 'expire', 'everySeconds' => 7776000, 'shardGroupDurationSeconds' => 604800 }]`

##### <a name="-puppet_operational_dashboards--influxdb_token"></a>`influxdb_token`

Data type: `Optional[Sensitive[String]]`
Expand Down Expand Up @@ -280,9 +289,9 @@ Default value: `Sensitive('admin')`

Data type: `String`

Version of the Grafana package to install. Defaults to '8.5.15'
Version of the Grafana package to install. Defaults to '8.5.20'

Default value: `'8.5.15'`
Default value: `'8.5.20'`

##### <a name="-puppet_operational_dashboards--profile--dashboards--grafana_datasource"></a>`grafana_datasource`

Expand Down Expand Up @@ -788,6 +797,7 @@ The following parameters are available in the `puppet_operational_dashboards::lo
* [`telegraf_token`](#-puppet_operational_dashboards--load_metrics--telegraf_token)
* [`token_file`](#-puppet_operational_dashboards--load_metrics--token_file)
* [`conf_dir`](#-puppet_operational_dashboards--load_metrics--conf_dir)
* [`retention_rules`](#-puppet_operational_dashboards--load_metrics--retention_rules)
* [`telegraf_process`](#-puppet_operational_dashboards--load_metrics--telegraf_process)
* [`token`](#-puppet_operational_dashboards--load_metrics--token)

Expand Down Expand Up @@ -887,6 +897,22 @@ Directory to upload Telegraf configuration files to

Default value: `'/tmp/telegraf'`

##### <a name="-puppet_operational_dashboards--load_metrics--retention_rules"></a>`retention_rules`

Data type: `Array[Hash]`



Default value:

```puppet
[{
'type' => 'expire',
'everySeconds' => 3456000,
'shardGroupDurationSeconds' => 604800,
}]
```

##### <a name="-puppet_operational_dashboards--load_metrics--telegraf_process"></a>`telegraf_process`

Data type: `Enum['local', 'remote']`
Expand Down
4 changes: 2 additions & 2 deletions files/Filesync_performance.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
[
{
"params": [
"file-sync-client-service_status_experimental_metrics_average-lock-held-time"
"average-lock-held-time"
],
"type": "field"
},
Expand Down Expand Up @@ -222,7 +222,7 @@
[
{
"params": [
"file-sync-client-service_status_experimental_metrics_average-lock-wait-time"
"average-lock-wait-time"
],
"type": "field"
},
Expand Down
2 changes: 1 addition & 1 deletion files/Postgresql_performance.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@
"groupBy": [
{
"params": [
"$__interval"
"5m"
],
"type": "time"
},
Expand Down
20 changes: 12 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# Name of the InfluxDB organization to configure. Defaults to the value of influxdb::initial_org, or 'puppetlabs' if unset
# @param initial_bucket
# Name of the InfluxDB bucket to configure and query. Defaults to the value of influxdb::initial_bucket, or 'puppet_data' if unset
# @param influxdb_bucket_retention_rules
# Value for the initial InfluxDB bucket retention rules, Values are the same as in the influx_bucket type of the InfluxDB module.
# @param influxdb_token
# InfluxDB admin token in Sensitive format. Defaults to the value of influxdb::token.
# See the puppetlabs/influxdb documentation for more information about this token.
Expand All @@ -39,6 +41,7 @@
Integer $influxdb_port = lookup(influxdb::port, undef, undef, 8086),
String $initial_org = lookup(influxdb::initial_org, undef, undef, 'puppetlabs'),
String $initial_bucket = lookup(influxdb::initial_bucket, undef, undef, 'puppet_data'),
Array $influxdb_bucket_retention_rules = [{ 'type' => 'expire', 'everySeconds' => 7776000, 'shardGroupDurationSeconds' => 604800 }],

Optional[Sensitive[String]] $influxdb_token = lookup(influxdb::token, undef, undef, undef),
Optional[Sensitive[String]] $telegraf_token = undef,
Expand Down Expand Up @@ -69,17 +72,18 @@
use_ssl => $use_ssl,
port => $influxdb_port,
token => $influxdb_token,
require => Class['influxdb'],
token_file => $influxdb_token_file,
require => Class['influxdb'],
}
influxdb_bucket { $initial_bucket:
ensure => present,
use_ssl => $use_ssl,
port => $influxdb_port,
org => $initial_org,
token => $influxdb_token,
require => [Class['influxdb'], Influxdb_org[$initial_org]],
token_file => $influxdb_token_file,
ensure => present,
use_ssl => $use_ssl,
port => $influxdb_port,
org => $initial_org,
token => $influxdb_token,
retention_rules => $influxdb_bucket_retention_rules,
token_file => $influxdb_token_file,
require => [Class['influxdb'], Influxdb_org[$initial_org]],
}

Influxdb_auth {
Expand Down
4 changes: 2 additions & 2 deletions manifests/profile/dashboards.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# @param grafana_password
# Grafana admin password in Sensitive format. Defaults to 'admin'
# @param grafana_version
# Version of the Grafana package to install. Defaults to '8.5.15'
# Version of the Grafana package to install. Defaults to '8.5.20'
# @param grafana_datasource
# Name to use for the Grafana datasource. Defaults to 'influxdb_puppet'
# @param grafana_install
Expand Down Expand Up @@ -53,7 +53,7 @@
Integer $grafana_timeout = 10,
#TODO: document using task to change
Sensitive[String] $grafana_password = Sensitive('admin'),
String $grafana_version = '8.5.15',
String $grafana_version = '8.5.20',
String $grafana_datasource = 'influxdb_puppet',
String $grafana_install = $facts['os']['family'] ? {
/(RedHat|Debian)/ => 'repo',
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-puppet_operational_dashboards",
"version": "1.10.0",
"version": "1.11.0",
"author": "Adrian Parreiras Horta",
"summary": "A module for managing the installation and configuration of metrics dashboards for Puppet Infrastructure.",
"license": "Apache-2.0",
Expand All @@ -26,7 +26,7 @@
},
{
"name": "puppetlabs-influxdb",
"version_requirement": ">= 1.5.0 < 2.0.0"
"version_requirement": ">= 1.6.0 < 2.0.0"
},
{
"name": "puppetlabs-stdlib",
Expand Down
21 changes: 14 additions & 7 deletions plans/load_metrics.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@
String $telegraf_token = 'puppet telegraf token',
String $token_file = '/root/.influxdb_token',
String $conf_dir = '/tmp/telegraf',
#TODO
# 40 day default for bucket retention
Array[Hash] $retention_rules = [{
'type' => 'expire',
'everySeconds' => 3456000,
'shardGroupDurationSeconds' => 604800,
}],
#TODO
Enum['local', 'remote'] $telegraf_process = 'remote',
String $dest_dir = '/tmp',
#TODO
#TODO
Optional[String] $token = undef,
String $cleanup_metrics = 'true',
) {
Expand Down Expand Up @@ -77,11 +83,12 @@
}

influxdb_bucket { $influxdb_bucket:
ensure => present,
use_ssl => false,
org => $influxdb_org,
require => Influxdb_org[$influxdb_org],
token_file => $token_file,
ensure => present,
use_ssl => false,
org => $influxdb_org,
token_file => $token_file,
retention_rules => $retention_rules,
require => Influxdb_org[$influxdb_org],
}

service { 'grafana-server':
Expand Down
6 changes: 6 additions & 0 deletions plans/provision_dashboard.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@
use_ssl => false,
}
}
# Apply the class twice so we can use the token created by the first application
apply ($targets) {
class { 'puppet_operational_dashboards':
use_ssl => false,
}
}
}
2 changes: 1 addition & 1 deletion spec/classes/dashboards_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
context 'when using default parameters' do
it {
is_expected.to contain_class('grafana').with(
version: '8.5.15',
version: '8.5.20',
manage_package_repo: true,
)

Expand Down