(PE-27794) collect data from ace and bolt (puma) services
With this commit, collect ace and bolt data: status and gc-status. Collects nothing unless PE is newer than 2019.4.0, in puma_metrics.rb. Modify to match when ace and bolt status endpoints are enabled in PE.
(SLV-631) add process tracking
Added tracking for the major puppet services using pidstat
(bug) rename puma_metrics.rb, correct urls and ssl
uma_metrics.rb should be uma_metrics urls should be /admin/status and /admin/gc_stat add ssl ca cert and key to https requests
Merge pull request #35 from puppetlabs/SLV-631
(SLV-631) add process tracking
(maint) update to match version of puma with metrics
Merge pull request #36 from tkishel/PE-27794_add_a_puma_status_endpoint
(PE-27794) collect data from ace and bolt (puma) services
(maint) normalize json2graphite.rb and json2timeseriesdb
These files could/should be functionaly identical: puppetlabs-puppet-metrics-viewer/json2graphite.rb puppetlabs-puppet_metrics_collector/files/json2timeseriesdb With this commit: Bi-directional merge of changes. Added comments. Replaced unnessary double-quotes with single-quotes.
(bug) use full path to puppet in puma_metrics
Because in cron ... X-Cron-Env: <PATH=/usr/bin:/bin>
Merge pull request #38 from tkishel/use_full_path_to_puppet
(bug) use full path to puppet in puma_metrics
(maint) sync up what bolt and ace are called
new metrics from bolt and ace call themselves bolt and ace, where as thier processes are called ace-server and bolt-server. Updated the generate_system_metrics to change to ace and bolt for consistency. Makes the graphite2json scripts which process those names cleaner.
Merge pull request #39 from puppetlabs/maint
(maint) sync up what bolt and ace are called
Merge branch 'master' into normalize_json_to_script
Merge pull request #37 from tkishel/normalize_json_to_script
(maint) normalize json2graphite.rb and json2timeseriesdb
(maint) normalize json2graphite.rb and json2timeseriesdb
These files could/should be functionaly identical: puppetlabs-puppet-metrics-viewer/json2graphite.rb puppetlabs-puppet_metrics_collector/files/json2timeseriesdb With this commit: Bi-directional merge of changes. Added comments. Replaced unnessary double-quotes with single-quotes.
(SLV-771) Fix bug where process data is missed
The process data gathering greps process names for the ones we wanted to track... then passes the list to sar to track. If a process passed to sar exists when sar starts, but exits before sar gathers the first round of data, then sar will crash while printing the average summaries. Thus we lose data. Also, if the process exited before sar ran, there would be no data and some of the generate_system_metrics code would crash expecting to find that process in the sar results. Fine tuned the process grep to avoid matching processes we don't care about. Put a catch to not crash if one of the processes we expect doesn't have any data.
Merge pull request #42 from puppetlabs/SLV-771
(SLV-771) Fix bug where process data is missed
(SLV-767) Updated measurement tagging
Fixed regex that looked for puppet_server instead of puppetserver Added regex's for bolt and ace This means all of the services consistently get replaced and tagged instead of just some. removed the gc-stats regex as it wasn't used and was making it harder to make graphs using it.
(PIE-178) Print metrics as line-delimited JSON
This commit updates the scripts that collect metrics from multiple hosts, amq_metrics, puma_metrics, and tk_metrics, to write each dataset to STDOUT with a trailing newline. The resulting output stream is therefore in line-delimited JSON format, which is easy to parse. Prior to this commit, datasets from multiple hosts were mashed together without separators, which was difficult to parse when used as input for other scripts.
Merge pull request #44 from Sharpie/PIE-178-fix-metric-output
(PIE-178) Print metrics as line-delimited JSON
Allow for handling multiple hashes with STDIN
Prior to this commit the json2timeseriesdb script would fail with the STDIN input method. The collection script outputs multiple newline delimited hashes, which caused the JSON parser to fail. This commit updates the json2timeseriesdb script to be able to handle this inpupt format.
Merge pull request #45 from jarretlavallee/fix/master/stdin_multiple_…
…hashes Allow for handling multiple hashes with STDIN
(bug) Use ARGV instead of ARGF
Do not check ARGF.filename for '-' as (empirically) it always contains '-' Actually, do not use ARGF as OptionParser.parse! will remove all of its options from ARGV, leaving only (optional) filenames. In addition, this guards against STDIN and '-' mismatches, and handles STDIN in the main data_files loop.
Merge pull request #51 from tkishel/argf_is_arguable
(bug) Use ARGV instead of ARGF
(refactor) reorganize manifests and scripts
Reorganize files to prepare for refactoring manifests and scripts.
(refactor) convert puppet-metrics-collector template
Convert from template to a script with parameters with defaults.
(refactor) convert tidy_cron template
Convert from template to a script with parameters with defaults
(refactor) consolidate and normalize metrics collection scripts
Consolidate duplicate metrics collection code into a library. Normalize reading of configuration data. Normalize service metrics output-dir parameter. Normalize the 'processors' system metrics type parameter. Normalize.
(refactor) reorganize into service and system classes
Reorganize into service and system classes Move duplicate code from service classes to defined types Move templated per-service tidy scripts to one common 'metrics_tidy' script Simplify the 'create-metrics-archive' script, removing the one constant parameter Do not symlink the 'create-metrics-archive' script to '/opt/puppetlabs/bin/' Store configuration and code in separate 'config' and 'scripts' directories Eliminate the '/opt/puppetlabs/puppet_metrics_collector/bin' directory Add puppet code to delete the resulting legacy directories and files Resolve various puppet-lint and rubocop issues
(refactor) consolidate and normalize metrics collection scripts
Consolidate duplicate metrics collection code into a library. Normalize reading of configuration data. Normalize service metrics output-dir parameter. Normalize the 'processors' system metrics type parameter. Normalize.
(refactor) reorganize into service and system classes
Reorganize into service and system classes Move duplicate code from service classes to defined types Move templated per-service tidy scripts to one common 'metrics_tidy' script Simplify the 'create-metrics-archive' script, removing the one constant parameter Do not symlink the 'create-metrics-archive' script to '/opt/puppetlabs/bin/' Store configuration and code in separate 'config' and 'scripts' directories Eliminate the '/opt/puppetlabs/puppet_metrics_collector/bin' directory Add puppet code to delete the resulting legacy directories and files Resolve various puppet-lint and rubocop issues
This commit changes the create and tidy scripts to:
* Accept arguments instead of positional parameters in metrics_tidy * Pipe the results of find to tar directly * Changes path validation to ensure the target directory ends in one of the services we collect metrics for * Use lowercase variables to we're not being yelled at
Change the parameter in the tidy and create scripts to -d and --directory Comments related to parameter expansion and adding valid paths to the tidy script
Merge pull request #43 from puppetlabs/SLV-767
(SLV-767) Updated measurement tagging
Merge branch 'master' into refactor_code_and_scripts_v2
Merge pull request #47 from tkishel/refactor_code_and_scripts_v2
(refactor) reorganize into service and system classes
Better error handling in tidy script
In this commit, we create a temp file to hold stdout and stderr. We set a trap on error, which will send the temp file to stdout. This has the effect of sending the output upon error to mail when run via cron.