-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error checking in psql_metrics causes an error #77
Labels
bug
Something isn't working
Comments
Sharpie
added a commit
to Sharpie/puppetlabs-puppet_metrics_collector
that referenced
this issue
Jan 21, 2021
This commit updates the psql_metrics collection script to fix an issue with error checking. Previously, the script sanitized the hostname that output data was stored under by replacing "." characters with "-" characters. But, the error checking routine attempted to look up data using the un-sanitized hostname. This caused error checking to always register a failure even when data collection was successful, which resulted in email spam from cron. Ref. puppetlabs#71 Fixes puppetlabs#77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
A bug in the error checking of the
psql_metrics
script causes it to exit with an error:Data is still written, but the logging to STDERR and non-zero exit code cause some mail spam from the
cron
daemon.Expected Behavior
Script runs without error on a fresh PE install.
Steps to Reproduce
puppet_metrics_collector::system
classpuppet agent -t
Environment
Additional Context
This issue fell out of some last minute changes around munging
.
character to-
characters in hostnames (for consistency with other metrics datasets). The error checking logic uses thehostname
to look up results for a node to see if any errors were recorded:https://github.com/puppetlabs/puppetlabs-puppet_metrics_collector/blob/6.2.0/files/psql_metrics#L576
This lookup needs to use
hostname.gsub('.', '-')
.The text was updated successfully, but these errors were encountered: