pe_status_check
Version information
This version is compatible with:
- Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x
- Puppet >= 6.16.0 < 8.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-pe_status_check', '1.1.0'
Learn more about managing modules with a PuppetfileDocumentation
puppetlabs-pe_status_check
Description
puppetlabs-pe_status_check provides a way to alert the end-user when Puppet Enterprise is not in an ideal state. It uses pre-set indicators and has a simplified output that directs the end-user to next steps for resolution.
Users of the tool have greater ability to provide their own self-service resolutions and shorter incident resolution times with Puppet Support due to higher quality information available to our team.
Setup
What pe_status_check affects
This module installs two structured facts named pe_status_check
and agent_status_check
. Each fact contains an array of key pairs that output an indicator ID and a Boolean value. The pe_status_check
fact is confined to only Puppet Enterprise infrastructure agents, and the agent_status_check
fact is confined to non-infrastructure agent nodes.
Setup requirements
Enable plug-in sync to deliver required facts for this module.
Beginning with pe_status_check
This module primarily provides indicators using facts, so installing the module and allowing plug-in sync to occur lets the module start functioning.
Usage
The facts in this module can be directly consumed by monitoring tools such as Splunk, any element in the structured facts pe_status_check
or agent_status_check
reporting as false
indicates a fault state in Puppet Enterprise. When any element reports as false
, look up the incident ID in the reference section for next steps.
Alternatively, assigning the class pe_status_check
to the infrastructure notifies on each Puppet run if any indicator is reporting as false
.
Class declaration (optional)
To activate the notification functions of this module, classify your Puppet Infrastructure with the pe_status_check
class using your preferred classification method. Below is an example using site.pp
.
node 'node.example.com' {
include pe_status_check
}
For maximum coverage, report on all default indicators. However, if you need to make exceptions for your environment, classify the array parameter indicator_exclusions
with a list of all the indicators you do not want to report on.
This workflow is not available for the agent_status_check
fact.
class { 'pe_status_check':
indicator_exclusions => ['S0001','S0003','S0003','S0004'],
}
Reference
Refer to this section for next steps when any indicator reports a false
.
Fact: pe_status_check
Indicator ID | Description | Self-service steps | What to include in a Support ticket |
---|---|---|---|
S0001 | Determines if the puppet service is running on agents. | Starts the puppet service - puppet resource service puppet ensure=running |
If the service fails to start, open a Support ticket referencing S0001, and provide syslog and any errors output when attempting to restart the service. |
S0002 | Determines if the pxp-agent service is running. | Starts the pxp-agent service - puppet resource service pxp-agent ensure=running |
If the service fails to start, open a Support ticket referencing S0002, provide syslog any errors output when attempting to restart the service, and /var/log/puppetlabs/pxp-agent/pxp-agent.log |
S0003 | Determines if infrastructure components are running in noop. | Do not routinely configure noop on PE infrastructure nodes, as it prevents the management of key infrastructure settings. Disable this setting on infrastructure components. | If you are unable to disable noop or encounter an error when disabling noop, open a Support ticket referencing S0003, and provide any errors output when attempting to change the setting. |
S0004 | Determines if the Puppet Server status endpoint is returning any errors. | Runs the command puppet infrastructure status on your primary node, notes any services showing in an error state, and examines the corresponding service logs for potential causes. |
Open a Support ticket referencing S0004, provide the output of puppet infrastructure status and any service logs associated with the errors. |
S0005 | Determines if certificate authority (CA) cert expires in the next 90 days. | Install the puppetlabs-ca_extend module and follow steps to extend the CA cert. | Open a Support ticket referencing S0005 and provide support script output from the primary server, and any errors encountered when using the ca_extend module. |
S0006 | Determines if Puppet metrics collector is enabled and collecting metrics. | Metrics collector is a tool that lets you monitor a PE installation. If it is not enabled, enable it. | If you have issues enabling metrics, open a ticket referencing S0006 and provide the output of the support script. |
S0007 | Determines if there is at least 20% disk free on the PostgreSQL data partition. | Determines if growth is slow and expected within the TTL of your data. If there's an unexpected increase, use this article to troubleshoot PuppetDB | Open a Support ticket referencing S0007 and provide details about large files and folders, rate of growth, and a full support script from the affected node. |
S0008 | Determines if there is at least 20% disk free on the codedir data partition. | This can indicate you are deploying more code from the code repo than there is space for on the infrastructure components, or that something else is consuming space on this partition. Run puppet config print codedir , check that codedir partition indicated has enough capacity for the code being deployed, and check that no other outside files are consuming this data mount. |
|
S0009 | Determines if pe-puppetsever service is running and enabled on relevant components. | Checks that the service can be started and enabled by running puppet resource service pe-puppetserver ensure=running , examines /var/log/puppetlabs/puppetserver/puppetserver.log for failures. |
Open a Support ticket referencing S0009 and provide the /var/log/puppetlabs/puppetserver/puppetserver.log , showing an unsuccessful startup. |
S0010 | Determines if pe-puppetdb service is running and enabled on relevant components. | Checks that the service can be started and enabled by running puppet resource service pe-pupeptdb ensure=running , examines /var/log/puppetlabs/puppetdb/puppetdb.log for failures. |
Open a Support ticket referencing S0010 and provide the /var/log/puppetlabs/puppetdb/puppetdb.log log, showing an unsuccessful startup. |
S0011 | Determines if pe-postgres service is running and enabled on relevant components. | Checks that the service can be started and enabled by running puppet resource service pe-postgres ensure=running , examines /var/log/puppetlabs/postgresql/<postgresversion>/postgresql-<today>.log for failures. |
Open a Support ticket referencing S0011 and provide the /var/log/puppetlabs/postgresql/<postgresversion>/ postgresql-<today>.log log, showing an unsuccessful startup |
S0012 | Determines if Puppet produced a report during the last run interval. | Troubleshoot Puppet run failures. | Open a Support ticket referencing S0012 and provide the output of puppet agent -td > debug.log 2>&1 |
S0013 | Determines if the catalog was successfully applied during the last Puppet run. | Troubleshoot Puppet run failures. | Open a Support ticket referencing S0013 and provide the output of puppet agent -td > debug.log 2>&1 |
S0014 | Determines if anything in the command queue is older than a Puppet run interval. | This can indicate that the PuppetDB performance is inadequate for incoming requests. Review PuppetDB performance. Use metrics to pinpoint the issue. | Open a Support ticket referencing S0014 and provide the output of the support script. |
S0016 | Determines if there are any OutOfMemory errors in the puppetserver log. |
Increase the Java heap size for that service. | Open a Support ticket referencing S0016 and provide puppet metrics, /var/log/puppetlabs/puppetserver/puppetserver.log , and the output of puppet infra tune . |
S0017 | Determines if there are any OutOfMemory errors in the puppetdb log. |
Increase the Java heap size for that service. | Open a Support ticket referencing S0017 and provide puppet metrics, /var/log/puppetlabs/puppetdb/puppetdb.log , and the output of puppet infra tune . |
S0018 | Determines if there are any OutOfMemory errors in the orchestrator log. |
Increase the Java heap size for that service. | Open a Support ticket referencing S0018 and provide puppet metrics, /var/log/puppetlabs/orchestration-services/orchestration-services.log , and output of puppet infra tune . |
S0019 | Determines if there are sufficent jRubies available to serve agents. | Insufficent jRuby availability results in queued puppet agents and overall poor system performance. There can be many causes: Insufficent server tuning for load, a thundering herd, and insufficient system resources for scale. | If self-sevice fails to resolve the issue, open a ticket referencing S0019 and provide a description of actions so far and the output of the support script. |
S0021 | Determines if free memory is less than 10%. | Ensure your system hardware availablity matches the recommended configuration, note this assumes no third-party software using significant resources, adapt requirements accordingly for third-party requirements. | If you have issues with memory utilization in Puppet Enterprise that is not expected, open a Support ticket, referencing S0021 and provide the output of the support script |
S0022 | Determines if there is a valid Puppet Enterprise license in place at /etc/puppetlabs/license.key on the primary server which is not expiring in the next 90 days. |
Get help with Puppet Enterprise license issues | Open a Support ticket referencing S0022 and provide the output of the following commands ls -la /etc/puppetlabs/license.key and cat /etc/puppetlabs/license.key . |
S0030 | Determines when infrastructure components have the setting use_cached_catalog set to true. |
Don't configure use_cached_catalog on PE infrastructure nodes. It prevents the management of key infrastructure settings. Disable this setting on all infrastructure components. See our documentation for more information. | If you encounter errors after disabling use_cached_catalog, open a Support ticket referencing S0030 and provide the errors. |
S0031 | Determines if old PE agent packages exist on the primary server. | Remove the old PE agent packages. | |
S0033 | Determines if Hiera 5 is in use. | Upgrading to Hiera 5 offers some major advantages | If you're having issues upgrading to Hiera 5 or if your global Hiera configuration file was erroneously modified, open a Support ticket referencing S0033. Provide your global Hiera configuration file puppet config print hiera_config ; the default location is /etc/puppetlabs/puppet/hiera.yaml . |
S0034 | Determines if your PE deployment has not been upgraded in the last year. | Upgrade your PE instance. | If you need help upgrading PE, open a ticket and provide your current version and the version you would like to upgrade to (this could be the LTS or STS version of PE). |
S0036 | Determines if max-queued-requests is set above 150. |
The maximum value for jruby_puppet_max_queued_requests is 150 |
If you are unable to change the value of jruby_puppet_max_queued_requests or encounter an error when changing it, open a Support ticket referencing S0036 and provide any errors output when attempting to change the setting. |
S0039 | Determines if Puppets Server has reached its queue-limit-hit-rate ,and is sending messages to agents. |
Check the max-queued-requests article for more information. | Open a Support ticket referencing S0039 and provide the support script output from the primary server. |
S0040 | Determines if PE is collecting system metrics. | If system metrics are not collected by default, the sysstat package is not installed on the impacted PE infrastructure component. Install the package and set the parameter puppet_enterprise::enable_system_metrics_collection to true. See the documentation. |
After system metrics are configured, you do not see any files in /var/log/sa or if the /var/log/sa directory does not exist, open a Support ticket. |
Fact: agent_status_check
Indicator ID | Description | Self-service steps | What to include in a Support ticket |
---|---|---|---|
AS001 | Determines if the agent host certificate is expiring in the next 90 days. | Puppet Enterprise has a plan built into extend agent certificates. | Uses a puppet query to find expiring host certificates and pass the node ID to this plan: puppet plan run enterprise_tasks::agent_cert_regen agent=$(puppet query 'inventory[certname] { facts.agent_status_check.AS001 = false }' \| jq -r '.[].certname' \| paste -sd, -) master=$(puppet config print certname) |
How to report an issue or contribute to the module
If you are a PE user and need support using this module or encounter issues, our Support team is happy to help you. Open a ticket at the Support Portal. If you have a reproducible bug or are a community user, you can open an issue directly in the GitHub issues page of the module. We also welcome PR contributions to improve the module. Please see further details about contributing.
Reference
Table of Contents
Classes
pe_status_check
: This class should be enabled if you wish Puppet to notify when pe_status_check indicators are not at optimal values
Classes
pe_status_check
When this class is enabled, when any of the indicators in the pe_status_check fact are false puppet will notify of this, individual tests can be disabled by adding the ID to the indicator_exclusions parameter
Examples
include pe_status_check
Parameters
The following parameters are available in the pe_status_check
class:
indicator_exclusions
Data type: Array[String[1]]
List of disabled indicators, place any indicator ids you do not wish to report on in this list
Default value: []
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v1.1.0 (2022-02-24)
Added
v1.0.0 (2022-02-08)
Changed
- Rename Module to pe_status_check #74 (MartyEwings)
Added
- Adds Details to Warning Messages #76 (MartyEwings)
- Improve documentation #69 (MartyEwings)
- (SUP-2945) Updating S0004 to call the services API #68 (jordi-garcia)
- (SUP-2892) - No recent OOM errors logged in any JVM #58 (BartoszBlizniak)
- (SUP-2890) - Check command queue depth #56 (BartoszBlizniak)
- (SUP-2901) License check, tests and readme update #51 (pgrant87)
- (SUP-2896) Check Avg Free JRubies #50 (coreymbe)
- (SUP-2910) Check if older packages are still available to pe_repo #47 (asselvakumar)
- (SUP-2918) Check If Puppet Server is sending 503s to agents #44 (kksubbu72)
- (SUP-2946) Check Metrics Collector is enabled #41 (MartyEwings)
- (SUP-2913) Puppet not updated for more than a year #38 (gmcgrillan)
- (SUP-2912) Added S0033 to check if Global Hiera is Hiera 5, added tests, updated README #35 (taikaa)
- Adding Agent only Fact check for expiring host cert #32 (MartyEwings)
- (SUP-2919) - is puppet_metrics_collector::system configured #29 (tcwest23)
- (SUP-2915) Check if max-queued-requests is configured to above 150 #28 (elainemccloskey)
- (SUP-2909) Check that use_cached_catalog setting is false #27 (elainemccloskey)
Fixed
- Add confinement to S0036 #36 (elainemccloskey)
v0.2.0 (2022-01-11)
Added
- (SUP-2898) Available Memory on the platform is less than 10% #18 (MartyEwings)
v0.1.0 (2021-12-14)
Added
- (SUP-2862) Basic Readme for version 0.1.0 #13 (MartyEwings)
- (SUP-2861) Puppet Agent Health Checks #12 (MartyEwings)
- Adds a filesystem free method #9 (jarretlavallee)
- Adds in PE node confinement types and more status checks #8 (MartyEwings)
- Adds additional indicators #5 (MartyEwings)
- (maint) Move service logic to a module #3 (jarretlavallee)
Fixed
- (fix) Do not filter on Undef #10 (jarretlavallee)
* This Changelog was automatically generated by github_changelog_generator
Quality checks
We run a couple of automated scans to help you assess a module’s quality. Each module is given a score based on how well the author has formatted their code and documentation and select modules are also checked for malware using VirusTotal.
Please note, the information below is for guidance only and neither of these methods should be considered an endorsement by Puppet.
Malware scan results
The malware detection service on Puppet Forge is an automated process that identifies known malware in module releases before they’re published. It is not intended to replace your own virus scanning solution.
Learn more about malware scans- Module name:
- puppetlabs-pe_status_check
- Module version:
- 1.1.0
- Scan initiated:
- February 24th 2022, 4:04:50
- Detections:
- 0 / 58
- Scan stats:
- 58 undetected
- 0 harmless
- 0 failures
- 0 timeouts
- 0 malicious
- 0 suspicious
- 16 unsupported
- Scan report:
- View the detailed scan report