By graphing Puppet infrastructure performance metrics you can diagnose and prevent performance issues and identify performance trends. Install and configure the Puppet metrics dashboard module using the steps in this article, and then troubleshoot a performance issue using the dashboard.
Version and installation information
Puppet version: 5.0 and later
Components: Puppet Server, PuppetDB, and PostgreSQL
OS: Redhat, Debian, Ubuntu
Installation type: Any
Gem requirements: toml-rb-1.1.2 and later
Solution
The puppetlabs-metrics_dashboard
module installs and configures InfluxDB and Grafana to visualize metrics. Use this tool with new agent nodes that do not run any current Puppet infrastructure components.
You can use Telegraf, the Puppet metrics collector module, or Graphite to collect performance data for the metrics_dashboard
module. Telegraf is preferred. It automatically polls metrics and imports them into Influx DB from Puppet Server, PuppetDB, and PostgreSQL. You can use it for real-time data or historical data. Examples in this article use the Telegraf. You can use the Puppet metrics collector with historical data (rather than with real-time data). Graphite is implemented for backward compatibility. It does not collect as many types of metrics as the other methods do.
Installation
Install the metrics dashboard.
-
Ensure that the node where you’re installing the
metrics_dashboard
meets the following requirements:-
It meets the
Low Load
requirements for InfluxDB. -
It is a puppetized node, but not an infrastructure node. In other words, it is not a primary server (formerly called a master), PuppetDB, or compiler node.
-
-
Install the
metrics_dashboard
module. -
For the node that you provisioned, add the class to the catalog. Classify it using your preferred method.
For example, to classify a node in
site.pp
:node 'pup-6-agent.puppetdebug.vlan' { class { 'puppet_metrics_dashboard': add_dashboard_examples => true, overwrite_dashboards => false, master_list => ['pup-6-server.puppetdebug.vlan'], puppetdb_list => ['pup-6-server.puppetdebug.vlan'], } }
The example gives us a collection and viewing platform running on the agent by:
-
Installing InfluxDB, Telegraf, and Grafana on the agent.
-
Installing some example dashboards into Grafana for Puppetserver and PuppetDB.
-
Making sure that changes to the dashboards that you make after installation aren’t overwritten.
-
Configuring Telegraf to query metrics from Puppet Server and PuppetDB on the primary server.
If you have additional Puppet Server and PuppetDB instances, collect data from them by adding to the
master_list
andpuppetdb_list
arrays in classification. -
-
On the node where you installed the
metrics_dashboard
, run the Puppet agent. -
To access metrics dashboards, navigate to port 3000 of the node where you installed the module in a web browser, for example,
http://pup-6-agent.puppetdebug.vlan:3000
. To log in, useadmin
for both the username and password.Note: Change the password by adding the
puppet_metrics_dashboard
module’sgrafana_password
parameter to the module’s classification.
Additional resources
Learn more about how to select different time frames, servers, and dashboards from the Grafana Documentation.
Learn how to use the metrics dashboard to diagnose a performance issue.
Comments
0 comments
Please sign in to leave a comment.