Git Product home page Git Product logo

puppet_metrics_dashboard's Introduction

⚠ WARNING ⚠

This Module and Repository has been deprecated and is no longer maintained

For the functional replacement of this module, please see puppet_operational_dashboards.

puppet_metrics_dashboard

Description

This module is used to configure Telegraf, InfluxDB, and Grafana, and collect, store, and display metrics collected from Puppet services. By default, those components are installed on a separate Dashboard node by applying the base class of this module to that node. That class will automatically query PuppetDB for Puppet Infrastructure nodes (Primary server, Compilers, PuppetDB hosts, PostgreSQL hosts) or you can specify them via associated class parameters. It is not recommended to apply the base class of this module to one of your Puppet Infrastructure nodes.

You have the option to use the included defined types to configure Telegraf to run on each Puppet Infrastructure node, with the metrics being stored and displayed by another node running InfluxDB and Grafana.
In environments where there is an existing InfluxDB/Grafana installation, this option is recommended. See Determining where Telegraf runs for details.

You have the option of collecting metrics using any or all of the following methods:

Setup

In PuppetDB 6.9.1 & 5.2.13 and newer, the /metrics/v1 endpoints are disabled by default and access to the /metrics/v2 endpoints are restricted to localhost only in response to CVE-2020-7943. Starting with version 2.3.0 of this module, PuppetDB metrics will not be setup by the main class if you are on the versions above or higher unless the main class is applied to the Primary Server. To collect PuppetDB metrics in other scenarios, you should use the puppet_metrics_dashboard::profile::puppetdb class applied to any PuppetDB nodes with the option enable_client_cert => false (the request will be to localhost and doen't require SSL)

Upgrade notes

  • Version 2 and up now requires the toml-rb gem installed on the Primary Server and any/all Compilers.
  • The puppet_metrics_dashboard::profile::postgres class is deprecated in favor of the puppet_metrics_dashboard::profile::master::postgres_access class.
  • Parameters telegraf_agent_interval and http_response_timeout were previously Integers but are now Strings. The value should match a time interval, such as 5s, 10m, or 1h.
  • influxdb_urls was previously a String, but is now an Array.

Previous versions of this module added several [[inputs.httpjson]] entries in /etc/telegraf/telegraf.conf. These entries should be removed, as all module-specific settings now reside in individual files within /etc/telegraf/telegraf.d/. Telegraf will continue to work if you do not remove them, however, the old [[inputs.httpjson]] will not be updated going forward.

Determining where Telegraf runs

Telegraf can be configured to run on the Dashboard node, or on each Puppet Infrastructure node. By default, this module configures Telegraf on the Dashboard node by querying PuppetDB to identify each Puppet Infrastructure node. To manually configure Telegraf on the Dashboard node, define the following puppet_metrics_dashboard class parameters: master_list, puppetdb_list and postgres_host_list.

To configure Telegraf to run on each Puppet Infrastructure node, use the corresponding profiles for those nodes. See Profile defined types. Apply the puppet_metrics_dashboard class to the Dashboard node to configure InfluxDB and Grafana, and apply the profile classes on each Puppet Infrastructure node to configure Telegraf.

Requirements

The toml-rb gem is a requirement of the puppet-telegraf module, and needs to be installed in Puppet Server on the Primary Server and any/all Compilers.

Apply the following class to the Primary Server and any/all Compilers to install the gem.

node 'primary.example.com' {
  include puppet_metrics_dashboard::profile::master::install
}
node 'compiler.example.com' {
  include puppet_metrics_dashboard::profile::master::install
}

Or, you can apply the puppet_metrics_dashboard::profile::master::install class to the PE Master Node Group, if using Puppet Enterprise.

Or, you can manually install the gem using the following command.

puppetserver gem install toml-rb

Restart the Puppet Server service after manually installing the gem.

If you are configuring the Dashboard node via a puppet apply workflow, you will need to install the gem into Puppet on that host.

Usage

Configure a Standard Primary Server and a Dashboard node

node 'primary.example.com' {
  include puppet_metrics_dashboard::profile::master::install
  include puppet_metrics_dashboard::profile::master::postgres_access
}

node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    add_dashboard_examples => true,
    overwrite_dashboards   => false,
  }
}

This will configure Telegraf, InfluxDB, and Grafana on the Dashboard node, and allow Telegraf on that host to access PostgreSQL on the Standard Primary Server.

Note that the add_dashboard_examples parameter enforces state on the example dashboards. Setting the overwrite_dashboards parameter to true disables overwriting your modifications (if any) to the example dashboards.

Manual configuration of a complex Puppet Infrastructure

node 'primary.example.com' {
  include puppet_metrics_dashboard::profile::master::install
}
node 'compiler01.example.com' {
  include puppet_metrics_dashboard::profile::master::install
}
node 'compiler02.example.com' {
  include puppet_metrics_dashboard::profile::master::install
}
node 'postgres01.example.com' {
  include puppet_metrics_dashboard::profile::master::postgres_access
}
node 'postgres02.example.com' {
  include puppet_metrics_dashboard::profile::master::postgres_access
}

node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    add_dashboard_examples => true,
    overwrite_dashboards   => false,
    configure_telegraf     => true,
    enable_telegraf        => true,
    master_list            => ['primary.example.com', ['compiler01.example.com', 9140], ['compiler02.example.com', 9140]],
    puppetdb_list          => ['puppetdb01.example.com', 'puppetdb02.example.com'],
    postgres_host_list     => ['postgres01.example.com', 'postgres02.example.com'],
  }
}
# Alternate ports are configured using a pair of: [host_name, port_number]

Note that the defaults for this module's class parameters are defined in its data/common.yaml directory.

The *_list parameters can be defined in the class declaration, or elsewhere in Hiera. For example:

puppet_metrics_dashboard::master_list:
  - "primary.example.com"
  - ["compiler01.example.com", 9140]
  - ["compiler02.example.com", 9140]
puppet_metrics_dashboard::puppetdb_list:
  - "puppetdb01.example.com"
  - "puppetdb02.example.com"
puppet_metrics_dashboard::postgres_host_list:
  - "postgres01.example.com"
  - "postgres02.example.com"

Configure Primary Server, Compiler running PuppetDB and a Dashboard node

node 'primary.example.com' {
  include puppet_metrics_dashboard::profile::master::install
}
node 'dbcompiler.example.com' {
  class { 'puppet_metrics_dashboard::profile::dbcompiler::install':
    influxdb_urls => ["http://dashboard.example.com:8086"]
  }
}
node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    add_dashboard_examples => true,
    overwrite_dashboards   => false,
  }
}

This will configure Telegraf, InfluxDB, and Grafana on the Dashboard node, and allow Telegraf on that host to access PuppetDB on the Compiler running PuppetDB.

Configure Graphite

node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    add_dashboard_examples => true,
    overwrite_dashboards   => false,
    consume_graphite       => true,
    influxdb_database_name => ['graphite'],
    master_list            => ['primary', 'compiler01'],
  }
}
  • This method requires enabling Graphite on the Primary Server and Compilers, as described here. The hostnames that you use in master_list must match the value(s) that you used for metrics_server_id in the puppet_enterprise::profile::master class. You must use hostnames rather than fully-qualified domain names (no dots) both in this class and in the puppet_enterprise::profile::master class.

Configure Telegraf, Graphite, and Archive

Archive refers to files imported from the puppetlabs/puppet_metrics_collector module.

node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    add_dashboard_examples => true,
    overwrite_dashboards   => false,
    configure_telegraf     => true,
    enable_telegraf        => true,
    consume_graphite       => true,
    influxdb_database_name => ['telegraf', 'graphite', 'puppet_metrics'],
  }
}

Allow Telegraf to access PE-PostgreSQL

The following class is required to be applied to the Primary Server (or the PE Database node if using external PostgreSQL) for collection of PostgreSQL metrics via Telegraf.

node 'primary.example.com' {
  class { 'puppet_metrics_dashboard::profile::master::postgres_access':
    telegraf_host => 'grafana-server.example.com',
  }
}

The telegraf_host parameter is optional. By default, the class will query PuppetDB for Dashboard nodes (with the puppet_metrics_dashboard class applied) and use the certname of the first node in the results. If the PuppetDB lookup fails to find a Dashboard node, and you do not specify telegraf_host then the class outputs a warning.

Refer to Issue 72 if the above generates the following error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Undef (file: /opt/puppetlabs/puppet/modules/pe_postgresql/manifests/server/role.pp, line: 66, column: 6) (file: /etc/puppetlabs/code/environments/production/modules/puppet_metrics_dashboard/manifests/profile/master/postgres_access.pp, line: 42) on node primary.example.com

A workaround for that error is to apply the puppet_metrics_dashboard::profile::master::postgres_access class to the PE Database Node Group in the Console, if using Puppet Enterprise.

Enable SSL

node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    use_dashboard_ssl => true,
  }
}

By default, this will create a set of certificates in /etc/grafana that are based on the Dashboard node's Puppet agent certificates. You can also specify different files by defining the dashboard_cert_file and dashboard_cert_key parameters, but managing certificate content or supplying your own certificates is unsupported by this module.

Note that enabling SSL on Grafana will not allow for running on privileged ports such as 443. To enable that capability, use the suggestions documented in the Grafana documentation

Profile defined types

The module includes defined types that you can use with an existing Grafana implementation. See REFERENCE.md for example usage.

Note that because of the way that the Telegraf module works, these examples will overwrite any configuration in telegraf.conf if it is not already managed by Puppet. See the puppet-telegraf documentation on how to manage that file and add other settings.

Other possibilities

Configure the password for InfluxDB , enable additional TICK Stack components, and customize Grafana.

node 'dashboard.example.com' {
  class { 'puppet_metrics_dashboard':
    influx_db_password  => 'secret',
    enable_chronograf   => true,
    enable_kapacitor    => true,
    grafana_http_port   => 3333,
    grafana_version     => '6.5.2',
  }
}

Default dashboards

This module comes with a few default dashboards. For reference, please check Default Dashboards.

Using Archive Metrics

Viewing Archive Metrics using Docker

This module comes with a the ability to view archive metrics using litmus, Docker, and PDK. This process provisions a Docker container with the module applied, and imports pe_metrics metrics from the puppetlabs-puppet_metrics_collector module. In order to run this, you need Docker and PDK installed on your system.

The following command will provision a local docker container with the local version of this module applied and import the last 30 days of metrics collected by the puppetlabs-puppet_metrics_collector module.

pdk bundle install
pdk bundle exec rake 'viewer[/path/to/offline/metrics]'

The command above will download a CentOS 7 container image configured in the viewer node-set, install Puppet 6.x, copy this module, and apply the module, and import metrics from the specified directory. The UI will be available on http://localhost:3000 with the default admin credentials. This method only uses the pe_metrics database and associated dashboards. To limit the number of days to import metrics, an optional day parameter can be passed into the pdk bundle exec rake 'litmus:viewer[/path/to/offline/metrics,20]' command.

The following command can be used to import additional metrics into a running instance.

pdk bundle exec rake 'viewer:import[/path/to/offline/metrics]'

The following command can be run to destroy the local instance.

pdk bundle exec rake viewer:destroy

Import Archive Metrics into InfluxDB

The json2timeseriesdb script from the puppetlabs/puppet_metrics_collector module can be used to transform its data and import it into InfluxDB.

Examples:

./json2timeseriesdb /opt/puppetlabs/puppet-metrics-collector/puppetserver/*/*.json --convert-to influxdb --influx-db puppet_metrics --netcat dashboard.example.com

This simple example can be used for small number of files. For a large number of files, use --pattern.

./json2timeseriesdb  --pattern '/opt/puppetlabs/puppet-metrics-collector/puppetserver/*/*.json' --convert-to influxdb --influx-db puppet_metrics --netcat dashboard.example.com

The --pattern flag accepts a Ruby glob argument, which the script will internally expand into a list of files.

Reference

This module is documented via pdk bundle exec puppet strings generate --format markdown. Please refer to REFERENCE.md for more information.

Limitations

Repository failure for InfluxDB packages

When installing InfluxDB on CentOS/RedHat 6/7 you may encounter the following error message.

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install telegraf' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository: influxdb. Please verify its path and try again
Error: /Stage[main]/Puppet_metrics_dashboard::Telegraf/Package[telegraf]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install telegraf' returned 1: Error: Cannot retrieve repository metadata (repomd.xml) for repository: influxdb. Please verify its path and try again

This is due to a mismatch in the ciphers available in the operating system and on the InfluxDB repository. To resolve this issue, update nss and curl on the Dashboard node.

yum install curl nss --disablerepo influxdb

PostgreSQL metrics collection with older versions of Telegraf

PostgreSQL metrics collection requires Telegraf version 1.9.1 or later.

Puppet-Telegraf module version 4.0.0

This module is not compatible with puppet-telegraf version 4.0.0. Please use 3.x or 4.1+. See (#158)[#158] for more details.

Development

Please refer to CONTRIBUTING.md for more information.

puppet_metrics_dashboard's People

Contributors

bastelfreak avatar binford2k avatar coreymbe avatar genebean avatar gmcgrillan avatar henrywangpuppet avatar jarretlavallee avatar jpogran avatar m0dular avatar martyewings avatar npwalker avatar puppet-sup avatar randellp avatar seanmil avatar sharpie avatar suckatrash avatar timidri avatar tkishel avatar uberjew666 avatar vchepkov avatar yachub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet_metrics_dashboard's Issues

socket: too many open files

Telegraf is failing to make requests to masters due to socket: too many open files. We should manage the ulimits for the telegraf user or in systemd.

2019-05-07T19:33:21Z E! [inputs.httpjson]: Error in plugin: Get https:/example.com:8140/status/v1/services?level=debug: dial tcp: lookup example.com on xxx.xxx.xxx.xxx:53: dial udp xxx.xxx.xxx.xxx:53: socket: too many open files

Prevent from installing on the master

While it is technically possible to classify this on to the master, it should not be installed on the same server. Installing these items onto a puppet master can add additional load and consume resources that are outside of the metrics we suggest reviewing.

It would be nice if this module threw up an error or warning when it is classified to a Puppet master.

Make system metrics datasource configurable

Use Case

The dashboard for system metrics defined in Process_System_Stats.json has a hard coded datasource of influxdb_puppet_metrics. This should be configurable like the other example Archive dashboards.

The suggested workaround for CVE-2020-7943 does not result in a working stack

Describe the Bug

When setting "enable_client_cert => false" on the "puppet_metrics_dashboard::profile::puppetdb" class like the readme suggests, the puppetdb_metrics.each loop should switch to creating 'http' urls, in stead of 'https', otherwise all requests result in 403 responses, due to the protocol mismatch.

Expected Behavior

What the documentation suggests, should actually be feasible

Bundler updates broke CI

Travis is currently busted due to changes with bundler. I am working on a PR to fix this now.

v2 fails to load puppetserver toml-rb gem

It looks like a new installation will fail with the error denoted in voxpupuli/puppet-telegraf#124 and documented in https://github.com/voxpupuli/puppet-telegraf/blob/master/README.md#setup.

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Internal Server Error: org.jruby.exceptions.LoadError: (LoadError) no such file to load -- toml-rb

The workaround for PE is to install https://forge.puppet.com/puppetlabs/puppetserver_gem and add the following to the manifest.

  package {'toml-rb':
    ensure => present,
    provider => 'puppetserver_gem',
    notify => Service['pe-puppetserver']
  } 

$cert::ssldir is using the server's configuration, not the agent's

We use different ssldir parameters on the master and on the agents and get the following error:

Error: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Puppet_metrics_dashboard::Profile::Puppetdb[puppetdb87.example.com]/Puppet_metrics_dashboard::Certs[telegraf]/File[/etc/telegraf/node0389.example.com_key.pem]: Could not evaluate: Could not retrieve information from environment puppet7_metrics source(s) file:///etc/puppetlabs/puppetserver/ssl/private_keys/node0389.example.com.pem

This can be explained the following way:

The class certs uses $settings::ssldir which picks up the server's ssldir configuration option.
On the other hand, the certificate file resources are copied from the ssldir on the agent.
Therefore, when using different ssldir on master and agent, this does not work.

The agent's ssldir is not available to the master, thus we propose to move the ssldir variable as a parameter, with the current default.

Add new JRuby use per-borrow metric

SERVER-1975 added some new metrics we can visualize related to JRuby borrow timing.

It looks like telegraf will already be collecting these new metrics, but we should add some graphs for them.

Add graphs for more sar metrics

Use Case

Currently the included system metrics dashboard only includes graphs for %cpu and %mem, but we collect more, e.g. system_cpu.iowait. Add or edit graphs to show any of these that may be useful.

ordering issue with initial install

Describe the Bug

Upon initial puppet run influxdb was not installed but the configuration file was installed which then caused the package to not install in subsequent runs. (AFAIK). I haven't investigated that much but when jumping on the system puppet was complaining.

Info: Applying configuration version '1614906213'
Error: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[wait for influxdb]: Could not evaluate: Could not find command '/usr/bin/influx'
Notice: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[create influxdb admin user]: Dependency Exec[wait for influxdb] has failures: true
Warning: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[create influxdb admin user]: Skipping because of failed dependencies
Warning: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[create influxdb puppet_metrics database telegraf]: Skipping because of failed dependencies
Warning: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Grafana_datasource[influxdb_telegraf]: Skipping because of failed dependencies

Expected Behavior

Complete in a single run without intervention

Steps to Reproduce

Environment

  • Ubuntu 20.04
  • puppet 6.21 or PE 2019.8.5

Additional Context

To fix I installed influxdb as I think puppet had already setup the apt repo for me.

$ sudo apt install influxdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  influxdb
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 64.4 MB of archives.
After this operation, 158 MB of additional disk space will be used.
Get:1 https://repos.influxdata.com/ubuntu focal/stable amd64 influxdb amd64 1.8.4-1 [64.4 MB]
Fetched 64.4 MB in 3s (22.5 MB/s)
(Reading database ... 207354 files and directories currently installed.)
Preparing to unpack .../influxdb_1.8.4-1_amd64.deb ...
Unpacking influxdb (1.8.4-1) over (1.6.4-1build1) ...
Setting up influxdb (1.8.4-1) ...

Configuration file '/etc/influxdb/influxdb.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** influxdb.conf (Y/I/N/O/D/Z) [default=N] ? N
Synchronizing state of influxdb.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable influxdb
Processing triggers for man-db (2.9.1-1) ...
opselite@cyberpowerpc4:~$ which influx
/usr/bin/influx

Not able to upgrade compiler due to puppet_metrics_dashboard

Describe the Bug

Not able to upgrade compiler due to puppet_metrics_dashboard.

Expected Behavior

Compiler should be able to upgrade successfully.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Primary server upgrade from 2019.8.8 to 2021.3.0
    [root@pemom-p ~]# facter -p pe_build
    2021.3.0

  2. Upgrade compiler: [root@pemom-p ~]# puppet infrastructure upgrade compiler pecompiler01-p.puppetdebug.vlan,pecompiler02-p.puppetdebug.vlan

  3. Encounter error :
    Warning: Not using cache on failed catalog
    Error: Could not retrieve catalog; skipping run

    Kind: puppetlabs.installpe/run-puppet-failed
    Details:
    {"output"=>
    "Info: Using configured environment 'production'\n" +
    "Info: Retrieving pluginfacts\n" +
    "Info: Retrieving plugin\n" +
    "Info: Loading facts\n" +
    "Error: Could not retrieve catalog from remote server: Error 500 on
    SERVER: Server Error: Evaluation Error: Error while evaluating a Resource
    Statement, Evaluation Error: Error while evaluating a Function Call,
    'versioncmp' parameter 'a' expects a String value, got Undef (file:
    /opt/puppetlabs/puppet/modules/pe_postgresql/manifests/server/role.pp,
    line: 66, column: 6) (file:
    /etc/puppetlabs/code/environments/production/modules/puppet_metrics_dashboard/manifests/profile/master/postgres_access.pp,
    line: 47) on node pecompiler02-p.puppetdebug.vlan\n" +
    "Warning: Not using cache on failed catalog\n" +
    "Error: Could not retrieve catalog; skipping run\n"}
    pecompiler01-p.puppetdebug.vlan:
    Message: Running puppet failed on host with certname pecompiler01-p.puppetdebug.vlan. Output: Info: Using configured environment 'production'

Environment

  • Version [e.g. 2021.3.0]
  • Platform [e.g. Centos 7.2]

Additional Context

Add any other context about the problem here.

dbcompiler Broken on non-internet enabled servers

Use Case

manifests/profile/dbcompiler/install.pp requires internet access to use.

Describe the Solution You Would Like

Please expose telegraf::manage_repo as an optional parameter in this profile (dbcompiler::install) to enable use on non-internet connected servers.

Describe Alternatives You've Considered

I attempted workarounds involving yum, but the enforcement of the repo is pretty strong and those attempts did not work.

Add influxdb retention policy

Use Case

When collecting a lot of metrics for a scaled-out puppet environment with several compile masters, you can find yourself storing metrics for a longer time period than is necessary. Additionally, you can start to run out of disk space quite quickly. Adding an influxdb retention policy can help alleviate those issues.

Describe the Solution You Would Like

influxdb.conf can take a configuration value for a default retention policy on new db's.

Describe Alternatives You've Considered

For now, I have applied a retention policy manually to the telegraf db after it was created

Additional Context

remove periods from master_list in documentation

The documentation includes . in master_list in the examples, but Graphite separates the hierarchy of the metrics with ., so specifying a FQDN instead of a HOSTNAME results in no data points in the dashboards.

Port numbers for monitored services monitored by should be configurable

The telegraf.conf.epp template currently hardcodes the ports that it uses to collect data from monitored services, 8140, 8081. The Postgres collection also omits the port number, which is an equivalent to harcoding 5432.

PuppetDB commonly has to run on a different port as 8081 conflicts with several monitoring and anti-virus products. We should make the port numbers configurable.

PE 2019

A couple of places in the code reference the PE version but there's no entry for 2019... is this intentional? Also, shouldn't the activemq stuff be automatically disabled on 2019?

Sent with GitHawk

Compiler deployments fail when puppet_metrics_dashboard::profile::master::install classified.

Describe the Bug

If puppet_metrics_dashboard::profile::master::install class is included in the PE Master node group the deployments of any compilers will fail. Using the new puppet infrastructure provision compiler deployment process triggers puppet runs during the orchestration tasks. These puppet runs happen before the pe-puppetserver process has been installed so puppet_metrics_dashboard::profile::master::install fails when it tries to notify that service.

Expected Behavior

Somehow it needs to wait until the compiler deployment process has ben completed before trying to notify the service.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Add puppet_metrics_dashboard::profile::master::install class to the PE Master node group.
  2. Run puppet infrastructure provision compiler to deploy a compiler.

Environment

PE 2019.8.4

Additional Context

Add any other context about the problem here.

Agent_cert_regen: Downloading certs for compiler4.platform9.puppet.net
Starting: command /opt/puppetlabs/bin/puppet ssl download_cert on compiler4.platform9.puppet.net
Finished: command /opt/puppetlabs/bin/puppet ssl download_cert with 0 failures in 2.41 sec
Starting: task enterprise_tasks::run_puppet on compiler4.platform9.puppet.net
Finished: task enterprise_tasks::run_puppet with 1 failures in 8 min, 35 sec
Errors in task enterprise_tasks::run_puppet:
  compiler4.platform9.puppet.net:
    Message: Running puppet failed on host with certname compiler4.platform9.puppet.net
    Kind: puppetlabs.installpe/run-puppet-failed
    Details:
      "\e[0;32mInfo: Using configured environment 'production'\e[0m\n" +
      "\e[0;32mInfo: Retrieving pluginfacts\e[0m\n" +
      "\e[0;32mInfo: Retrieving plugin\e[0m\n" +
      "\e[0;32mInfo: Retrieving locales\e[0m\n" +
      "\e[0;32mInfo: Loading facts\e[0m\n" +
      "\e[1;31mError: Could not retrieve catalog from remote server: Error 500
      on SERVER: Server Error: Could not find resource 'Service[puppetserver]'
      in parameter 'notify' (file:
      /etc/puppetlabs/code/environments/production/modules/puppet_metrics_dashboard/manifests/profile/master/install.pp,
      line: 18) on node compiler4.platform9.puppet.net\e[0m\n" +
      "\e[1;33mWarning: Not using cache on failed catalog\e[0m\n" +
      "\e[1;31mError: Could not retrieve catalog; skipping run\e[0m\n"
Starting: task enterprise_tasks::enable_agent on compiler4.platform9.puppet.net
Finished: task enterprise_tasks::enable_agent with 0 failures in 4.45 sec
Agent_cert_regen: Restarting puppet service...
Starting: task enterprise_tasks::enable_agent_service on compiler4.platform9.puppet.net
Finished: task enterprise_tasks::enable_agent_service with 0 failures in 4.72 sec
Agent_cert_regen: ERROR: Failed to regenerate agent certificate on node compiler4.platform9.puppet.net
Agent_cert_regen: bolt/run-failure:Plan aborted: run_task 'enterprise_tasks::run_puppet' failed on 1 target
Agent_cert_regen: puppetlabs.installpe/run-puppet-failed Running puppet failed on host with certname compiler4.platform9.puppet.net: Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find resource 'Service[puppetserver]' in parameter 'notify' (file: /etc/puppetlabs/code/environments/production/modules/puppet_metrics_dashboard/manifests/profile/master/install.pp, line: 18) on node compiler4.platform9.puppet.net
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Starting: task enterprise_tasks::enable_agent on peauto12.platform9.puppet.net
Finished: task enterprise_tasks::enable_agent with 0 failures in 4.09 sec
Finished: plan enterprise_tasks::provision_compiler in 11 min, 14 sec
Overall job status: failure...
Error: Error during orchestrated plan run of enterprise_tasks::provision_compiler.
Error: An error has occurred while running orchestrated plan.
	Message: Error regenerating agent certificates on 1 node(s).
	Kind: bolt/plan-failure
	Details:
		class: Bolt::PlanFailure
[root@peauto12 ~]#

Travis Tests are failing

Describe the Bug

Without changes to the master branch, the spec tests are timing out after 10 minutes. This seems to be due to a recent gem update.

Expected Behavior

The test should complete without issues.

Steps to Reproduce

  1. bundle install
  2. bundle exec rake spec

It will hang and use 100% of the CPU. parallel_spec will use multiple and never complete.

Additional Context

Resolving deltas: 100% (151/151), done.
I, [2019-08-15T15:23:47.911482 #14561]  INFO -- : Creating symlink from spec/fixtures/modules/puppet_metrics_dashboard to /home/travis/build/puppetlabs/puppet_metrics_dashboard
2 processes for 15 specs, ~ 7 specs per process
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminate

Remove CentOS 6 support

Use Case

CentOS 6 is EOL and no longer receiving maintenance updates. Testing this is causing CI failures and support should be removed.

Describe the Solution You Would Like

Remove CentOS from CI testing and the metadata.json

Delete the master branch to complete migration to main

I attempted to delete the master branch but don't have permissions:

➜  puppet_metrics_dashboard git:(main) git push --delete origin master
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Cannot delete this protected branch
To https://github.com/puppetlabs/puppet_metrics_dashboard.git
 ! [remote rejected] master (protected branch hook declined)
error: failed to push some refs to 'https://github.com/puppetlabs/puppet_metrics_dashboard.git'
➜  puppet_metrics_dashboard git:(main) 

Acceptance tests fail in containers

Describe the Bug

Recently influxdb changed their systemd unit file to use Type=forking and a script to start the process. Unfortunately, this causes the service to fail to start in any recent container due to changes for CVE-2018-16888 in systemd 237+. Docker is not correctly reporting cgroup info and so systemd fails.

There is an open issue on docker for it, but it does not seem like they will ever fix it. docker/for-linux#835

Someone over at apache/bigtop#640 found a potential workaround for the issue, which is to add /sys/fs/cgroup:/sys/fs/cgroup:ro to allow for a read-only mount.

We can use the docker_run_opts option that we implemented in puppetlabs/provison to support mapping the ports for the local viewer.

I have confirmed this works in the local viewer workflow by adding it here: https://github.com/puppetlabs/puppet_metrics_dashboard/blob/main/provision.yaml#L23

vars: '{docker_run_opts: ["-p 8086:8086", "-p 3000:3000", "-v /sys/fs/cgroup:/sys/fs/cgroup:ro"]}'

It will need to be added to the CI configuration to allow CI to work. Below is an example usage from https://github.com/puppetlabs/provision#docker

$ bundle exec bolt --modulepath /Users/tp/workspace/git/ task run provision::docker --targets localhost  action=provision platform=ubuntu:14.04 inventory=/Users/tp/workspace/git/provision vars='{ "docker_run_opts": ["-p 8086:8086", "-p 3000:3000"]}'

QUESTION: Using the puppet_metrics_dashboard::profile::master::postgres_access class

Apologies for raising and "issue" on this, but I've been battling with this all day and can't get my head around what is happening.

if I declare puppet_metrics_dashboard::profile::master::postgres_access via the ENC (PE console), everything works as expected. If I declare it using include puppet_metrics_dashboard::profile::master::postgres_access via a profile, I get :

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, 'versioncmp' parameter 'a' expects a String value, got Undef (file: /opt/puppetlabs/puppet/modules/pe_postgresql/manifests/server/role.pp, line: 66, column: 6) (file: /etc/puppetlabs/code/environments/production/modules/puppet_metrics_dashboard/manifests/profile/master/postgres_access.pp, line: 42) on node master.xxxx

I can't figure out why declaring via the ENC would mean this works. I've gone through the code and it seems to be borking on $version being undef, but why that would happen using a profile rather than the ENC is what is frustrating me.

The issue was the same on on 2.2.1 as on 1.1.5 (discounting the change in class name).

I'm sure I'm missing something obvious. I'm going to keep looking but thought someone might have an idea as to what's going on.

Spec Tests are broken for debian based systems

Describe the Bug

CI is showing the following on all debian bases OSes

  5) puppet_metrics_dashboard with facter 3.14.0 on debian-9-x86_64 with manage_repos => false is expected to compile into a catalogue without dependency cycles
     Failure/Error: it { is_expected.to compile.with_all_deps }
       error during compilation: Could not find resource 'Class[Apt::Update]' for relationship on 'Package[telegraf]' on node testhost.example.com
     # ./spec/classes/init_spec.rb:102:in `block (5 levels) in <top (required)>'

Expected Behavior

They should work by default

Steps to Reproduce

bundle exec rake parallel_spec

Additional Context

A module update in an dependency broke the spec tests. This is a symptom of using the master branch in the fixtures.

We currently have manage_repo => false, set for the telegraf class. They recently pulled an ordering parameter out of the manage_repo => false, block which is causing us to fail since we do not declare the apt::update class.

voxpupuli/puppet-telegraf@0fe46ce

Replace httpjson input with http and configure tag_keys

The httpjson input used by the current Telegraf configuration is deprecated as of Telegraf 1.6. We should switch over to using the http input:

[[inputs.http]]
  data_format = json
  ...

We should also use the JSON parser's support for the tag_keys parameter to appropriately tag metrics arrays such as those produced by Puppet Server's master and puppet-profiler sections.

Collect System Metrics in Telegraf

Use Case

Provide a dashboard for the system metrics for the servers running Puppet services. This should include

  • Disk space
  • Memory consumption
  • CPU Usage
  • Swap usage

Add rake viewer tasks to README

The README has a "Import Archive Metrics" section that would be a great spot to document the new rake viewer tasks. These tasks are very helpful for setting up a local dashboard instance and populating it with data, but their visibility is low unless someone knows about running rake -T.

Missing License

There's currently no license specified. It would help us get proper approval to use this module if a license was added.

Refactor the Ordering and Containment

Ideally, we should refactor this to not use any chaining arrows or "post" classes like manifests/post_start_configs.pp. We should rework the layout of the classes, defined types, and inheritance so we can do things like

  • Have top level profile classes that can be used with include-like declarations
  • Create systemd services by instantiating defined types and having those types notify services, like in the metrics collector
  • Did I mention no chaining arrows

grafana-server service fails first startup on CentOS 7

When applied to a CentOS 7 node, the grafana-server service fails its first startup:

[root@tosxelobxsvsppq ~]# puppet --version
5.5.10
[root@tosxelobxsvsppq ~]# puppet module install puppetlabs/puppet_metrics_dashboard
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ puppetlabs-puppet_metrics_dashboard (v1.1.0)
  ├─┬ puppet-grafana (v5.0.0)
  │ └── puppet-archive (v3.2.1)
  ├── puppetlabs-apt (v6.3.0)
  ├─┬ puppetlabs-inifile (v2.5.0)
  │ └── puppetlabs-translate (v1.2.0)
  └── puppetlabs-stdlib (v5.2.0)
[root@tosxelobxsvsppq ~]# puppet apply -e 'include puppet_metrics_dashboard'
Notice: Compiled catalog for tosxelobxsvsppq.delivery.puppetlabs.net in environment production in 0.33 seconds
Notice: /Stage[main]/Puppet_metrics_dashboard::Repos/Yumrepo[influxdb]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Repos/Yumrepo[grafana-repo]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Install/Package[influxdb]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Service/Service[influxdb]/ensure: ensure changed 'stopped' to 'running'
Notice: /Stage[main]/Grafana::Install/Package[fontconfig]/ensure: created
Notice: /Stage[main]/Grafana::Install/Package[grafana]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Service/File[/usr/lib/tmpfiles.d/grafana.conf]/ensure: defined content as '{md5}f0a85d62f5a9408155c165fc941a994b'
Notice: /Stage[main]/Puppet_metrics_dashboard::Service/Exec[Create Systemd Temp Files]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[create influxdb admin user]/returns: executed successfully
Notice: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Exec[create influxdb puppet_metrics database telegraf]/returns: executed successfully
Notice: /Stage[main]/Grafana::Config/File[/etc/grafana/grafana.ini]/content: content changed '{md5}f2042cbb229fba6b450b339ad549b6e6' to '{md5}719ef8c42415b35ed434b2f0e3a8e945'
Notice: /Stage[main]/Grafana::Config/File[/etc/grafana/grafana.ini]/owner: owner changed 'root' to 'grafana'
Notice: /Stage[main]/Grafana::Config/File[/var/lib/grafana/plugins]/ensure: created
Error: Systemd start for grafana-server failed!
journalctl log for grafana-server:
-- Logs begin at Wed 2019-03-13 17:54:09 UTC, end at Wed 2019-03-13 18:23:10 UTC. --
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Starting Grafana instance...
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service: main process exited, code=exited, status=233/RUNTIME_DIRECTORY
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Failed to start Grafana instance.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Unit grafana-server.service entered failed state.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service failed.

Error: /Stage[main]/Grafana::Service/Service[grafana-server]/ensure: change from 'stopped' to 'running' failed: Systemd start for grafana-server failed!
journalctl log for grafana-server:
-- Logs begin at Wed 2019-03-13 17:54:09 UTC, end at Wed 2019-03-13 18:23:10 UTC. --
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Starting Grafana instance...
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service: main process exited, code=exited, status=233/RUNTIME_DIRECTORY
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Failed to start Grafana instance.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Unit grafana-server.service entered failed state.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service failed.

Notice: /Stage[main]/Grafana::Service/Service[grafana-server]: Triggered 'refresh' from 2 events
Notice: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Grafana_datasource[influxdb_telegraf]: Dependency Service[grafana-server] has failures: true
Warning: /Stage[main]/Puppet_metrics_dashboard::Post_start_configs/Grafana_datasource[influxdb_telegraf]: Skipping because of failed dependencies
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Install/Package[telegraf]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - interval]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - collection_jitter]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - flush_interval]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - flush_jitter]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - precision]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - logfile]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf agent - hostname]/value: value changed [redacted sensitive information] to [redacted sensitive information]
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf outputs.influxdb - urls]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf outputs.influxdb - database]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf outputs.influxdb - retention_policy]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf outputs.influxdb - write_consistency]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Ini_setting[telegraf outputs.influxdb - timeout]/ensure: created
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/File[/etc/telegraf/telegraf.d/puppet_metrics_dashboard.conf]/ensure: defined content as '{md5}6542186e2cd6eebb592a2989bd09b09e'
Error: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Puppet_metrics_dashboard::Certs[telegraf]/File[/etc/telegraf/tosxelobxsvsppq.delivery.puppetlabs.net_key.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:/etc/puppetlabs/puppet/ssl/private_keys/tosxelobxsvsppq.delivery.puppetlabs.net.pem
Error: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Puppet_metrics_dashboard::Certs[telegraf]/File[/etc/telegraf/tosxelobxsvsppq.delivery.puppetlabs.net_cert.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:/etc/puppetlabs/puppet/ssl/certs/tosxelobxsvsppq.delivery.puppetlabs.net.pem
Error: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Config/Puppet_metrics_dashboard::Certs[telegraf]/File[/etc/telegraf/ca.pem]: Could not evaluate: Could not retrieve information from environment production source(s) file:/etc/puppetlabs/puppet/ssl/certs/ca.pem
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Service/Service[telegraf]: Dependency File[/etc/telegraf/tosxelobxsvsppq.delivery.puppetlabs.net_key.pem] has failures: true
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Service/Service[telegraf]: Dependency File[/etc/telegraf/tosxelobxsvsppq.delivery.puppetlabs.net_cert.pem] has failures: true
Notice: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Service/Service[telegraf]: Dependency File[/etc/telegraf/ca.pem] has failures: true
Warning: /Stage[main]/Puppet_metrics_dashboard::Telegraf::Service/Service[telegraf]: Skipping because of failed dependencies
Notice: Applied catalog in 17.63 seconds

JournalD logs of the startup:

Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Starting Grafana instance...
Mar 13 18:23:10 tosxelobxsvsppq systemd[20344]: Failed at step RUNTIME_DIRECTORY spawning /usr/sbin/grafana-server: File exists
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service: main process exited, code=exited, status=233/RUNTIME_DIRECTORY
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Failed to start Grafana instance.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Unit grafana-server.service entered failed state.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service failed.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: grafana-server.service holdoff time over, scheduling restart.
Mar 13 18:23:10 tosxelobxsvsppq systemd[1]: Starting Grafana instance...

Consider dropping pe- prefix from example dashboards

In Puppet Server 5 the metrics, which had previously been a PE only feature, were moved to the open source build. This means that items like pe-jruby-metrics and pe-puppet-profiler became jruby-metrics and puppet-profiler. We should consider dropping the pe- prefix from the metric names used by the example dashboards so that they are usable out of the box for monitoring open source installations in addition to PE installs.

Also, the pe- prefixes are currently still around for backwards compatibility, but we should assume they will disappear one day.

SSL functionality depends on puppetlabs/puppet_agent

Enabling SSL depends on facts provided by puppetlabs/puppet_agent (puppet_sslpaths).

The metadata.json file doesn't include that module as a dependency, and the README doesn't mention it either.

Since it's not a hard requirement, the README should mention it as a requirement for SSL.

Testing oddity with rspec-puppet-facts

While working on #22 I tried to do the following:

require 'spec_helper'
describe 'puppet_metrics_dashboard' do
  on_supported_os.each do |os, facts|
    context "on #{os}" do
      let(:facts) do
        facts.merge(pe_server_version: '2017.2')
      end

      context 'with default values for all parameters' do
        it { is_expected.to compile.with_all_deps }
        it { is_expected.to contain_class('puppet_metrics_dashboard') }
      end
      context 'With an empty array of masters' do
        let(:pre_condition) do
          <<-PRE_COND
            class {'puppet_metrics_dashboard':
              master_list => [],
            }
          PRE_COND
        end

        it { is_expected.to compile.with_all_deps }
      end
    end
  end
end

It worked on RHEL 7 but not on the other os's. Below is the test output minus a couple of traces

╔ ☕️  gene:~/repos/genebean-puppet_metrics_dashboard (refactor ✘) ✹✭
╚ᐅ pdk bundle exec rspec spec/classes/init_spec.rb
pdk (INFO): Using Ruby 2.5.1
pdk (INFO): Using Puppet 6.0.2

puppet_metrics_dashboard
  on debian-8-x86_64
    with default values for all parameters
      should compile into a catalogue without dependency cycles (FAILED - 1)
      should contain Class[puppet_metrics_dashboard] (FAILED - 2)
    With an empty array of masters
      should compile into a catalogue without dependency cycles (FAILED - 3)
  on ubuntu-16.04-x86_64
    with default values for all parameters
      should compile into a catalogue without dependency cycles (FAILED - 4)
      should contain Class[puppet_metrics_dashboard] (FAILED - 5)
    With an empty array of masters
      should compile into a catalogue without dependency cycles (FAILED - 6)
  on redhat-7-x86_64
    with default values for all parameters
      should compile into a catalogue without dependency cycles
      should contain Class[puppet_metrics_dashboard]
    With an empty array of masters
      should compile into a catalogue without dependency cycles

Failures:

  1) puppet_metrics_dashboard on debian-8-x86_64 with default values for all parameters should compile into a catalogue without dependency cycles
     Failure/Error: it { is_expected.to compile.with_all_deps }
       error during compilation: Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /Users/gene.liverman/repos/genebean-puppet_metrics_dashboard/spec/fixtures/modules/puppet_metrics_dashboard/manifests/repos.pp, line: 34, column: 31) on node gene.liverman-c02r3abag8wp
     # ./spec/classes/init_spec.rb:10:in `block (5 levels) in <top (required)>'

  2) puppet_metrics_dashboard on debian-8-x86_64 with default values for all parameters should contain Class[puppet_metrics_dashboard]
     Failure/Error: contain puppet_metrics_dashboard::repos

     Puppet::PreformattedError:
       Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /Users/gene.liverman/repos/genebean-puppet_metrics_dashboard/spec/fixtures/modules/puppet_metrics_dashboard/manifests/repos.pp, line: 34, column: 31) on node gene.liverman-c02r3abag8wp

  3) puppet_metrics_dashboard on debian-8-x86_64 With an empty array of masters should compile into a catalogue without dependency cycles
     Failure/Error: it { is_expected.to compile.with_all_deps }
       error during compilation: Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /Users/gene.liverman/repos/genebean-puppet_metrics_dashboard/spec/fixtures/modules/puppet_metrics_dashboard/manifests/repos.pp, line: 34, column: 31) on node gene.liverman-c02r3abag8wp
     # ./spec/classes/init_spec.rb:22:in `block (5 levels) in <top (required)>'

  4) puppet_metrics_dashboard on ubuntu-16.04-x86_64 with default values for all parameters should compile into a catalogue without dependency cycles
     Failure/Error: it { is_expected.to compile.with_all_deps }
       error during compilation: Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /Users/gene.liverman/repos/genebean-puppet_metrics_dashboard/spec/fixtures/modules/puppet_metrics_dashboard/manifests/repos.pp, line: 34, column: 31) on node gene.liverman-c02r3abag8wp
     # ./spec/classes/init_spec.rb:10:in `block (5 levels) in <top (required)>'

  5) puppet_metrics_dashboard on ubuntu-16.04-x86_64 with default values for all parameters should contain Class[puppet_metrics_dashboard]
     Failure/Error: contain puppet_metrics_dashboard::repos

     Puppet::PreformattedError:
       Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /Users/gene.liverman/repos/genebean-puppet_metrics_dashboard/spec/fixtures/modules/puppet_metrics_dashboard/manifests/repos.pp, line: 34, column: 31) on node gene.liverman-c02r3abag8wp

  6) puppet_metrics_dashboard on ubuntu-16.04-x86_64 With an empty array of masters should compile into a catalogue without dependency cycles
     Failure/Error: it { is_expected.to compile.with_all_deps }
       error during compilation: Evaluation Error: Operator '[]' is not applicable to an Undef Value. (file: /Users/gene.liverman/repos/genebean-puppet_metrics_dashboard/spec/fixtures/modules/puppet_metrics_dashboard/manifests/repos.pp, line: 34, column: 31) on node gene.liverman-c02r3abag8wp
     # ./spec/classes/init_spec.rb:22:in `block (5 levels) in <top (required)>'

Finished in 5.91 seconds (files took 5.8 seconds to load)
9 examples, 6 failures

Failed examples:

rspec './spec/classes/init_spec.rb[1:1:1:1]' # puppet_metrics_dashboard on debian-8-x86_64 with default values for all parameters should compile into a cataloguewithout dependency cycles
rspec './spec/classes/init_spec.rb[1:1:1:2]' # puppet_metrics_dashboard on debian-8-x86_64 with default values for all parameters should contain Class[puppet_metrics_dashboard]
rspec './spec/classes/init_spec.rb[1:1:2:1]' # puppet_metrics_dashboard on debian-8-x86_64 With an empty array of masters should compile into a catalogue withoutdependency cycles
rspec './spec/classes/init_spec.rb[1:2:1:1]' # puppet_metrics_dashboard on ubuntu-16.04-x86_64 with default values for all parameters should compile into a catalogue without dependency cycles
rspec './spec/classes/init_spec.rb[1:2:1:2]' # puppet_metrics_dashboard on ubuntu-16.04-x86_64 with default values for all parameters should contain Class[puppet_metrics_dashboard]
rspec './spec/classes/init_spec.rb[1:2:2:1]' # puppet_metrics_dashboard on ubuntu-16.04-x86_64 With an empty array of masters should compile into a catalogue without dependency cycles

Can't install above 1.0.3

Hi,

I can't install above 1.0.3 because I'm using inifile with version 3.1.0.

I see that in master the dependencies were updated and this would be resolved.

Is there an ETA for a new release with updated dependencies?

Thanks!

puppet-grafana - Requirement is breakable

To install the module puppetlabs-puppet_metrics_dashboard, the module puppet-grafana is required for version < 6.0.0.
Since these 2 modules have been updated the same day on the forge, I think the requirement in the metadata.json should be

    {
      "name": "puppet-grafana",
      "version_requirement": ">= 3.0.0 < 7.0.0"
    }

Allow support for puppet-telegraf 4.0.0

Currently the module only allows:

puppet-telegraf (>= 2.0.0 < 4.0.0)

In trying to upgrade the puppet-telegraf in our environment, we are unable due to the dependency of the puppet_metrics_dashboard.

Unknown variable: 'puppet_metrics_dashboard::enable_ldap_auth'

puppet_metrics_dashboard v2.5.0, PE 2019.8.6

Classified PE Master with class puppet_metrics_dashboard::profile::master::install get an error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown variable: 'puppet_metrics_dashboard::enable_ldap_auth'. (file: /etc/puppetlabs/code/environments/production/modules/puppet_metrics_dashboard/manifests/profile/master/install.pp, line: 15, column: 6) on node puppet.chepkov.lan
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Class uses $puppet_metrics_dashboard::enable_ldap_auth variable without sourcing the $puppet_metrics_dashboard class

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.