Commits on Jan 26, 2017

  1. Make output of puppetdb metrics cleaner

    Changes:
    
      * Change "puppet_server" to "puppetserver" when referring to the
        product and naming files. This is consistent with how puppetserver
        is referred to in product and documentation.
      * Refactor puppetserver metrics script to store all metrics for a
        timestamp in a single JSON file, even when multiple servers are
        queried
      * Refactor puppetdb metrics script to store all metrics for a
        timestamp in a single JSON file, even when multiple servers are
        queried
      * Standardize file timestamp format to use ISO 8601
      * Standardize filename to always be ${timestamp}.json
      * Move data out of puppetdb template and into manifest. Adheres to
        best practices for templates, which encourage keeping data and code
        out of templates as much as possible.
    
    These changes are targeted at simplifying data upload into Graphite /
    Grafana.
    reidmv committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    271bece View commit details
    Browse the repository at this point in the history
  2. Add error catching between hosts

    So that if gathering metrics from one host fails, it won't prevent
    others from being collected and written to file.
    reidmv committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    e4e1175 View commit details
    Browse the repository at this point in the history
  3. Add query time to data

    So that the total time it took to run the query for a given server is
    available.
    reidmv committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    30834a0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b817df0 View commit details
    Browse the repository at this point in the history
  5. Add timestamp to data files

    reidmv committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    22f5463 View commit details
    Browse the repository at this point in the history
  6. Embed metrics data in template

    While it's not awesome to have a conditional in a template, there
    doesn't seem to be an obviously more elegant way to do this right now.
    reidmv committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    6fe4d5c View commit details
    Browse the repository at this point in the history
  7. Implement outputdir/host/timestamp.json structure

    This commit updates the scripts to create one directory per server
    metrics are being obtained from, and to place files for each server in
    its dedicated directory.
    
    The idea is to make it easier to manually browse records on the
    filesystem using cd and ls, for very large sets of data.
    reidmv committed Jan 26, 2017
    Configuration menu
    Copy the full SHA
    3acaca0 View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2017

  1. Fix metrics_ensure=absent behavior

    Make it so that if a metric is ensured absent, the outputdir is also
    ensured absent
    reidmv committed Feb 7, 2017
    Configuration menu
    Copy the full SHA
    ead487c View commit details
    Browse the repository at this point in the history
  2. Add deprecated support for old puppet_server API

    So that customers already using this module don't have to change their
    own code to use the new version of the module.
    reidmv committed Feb 7, 2017
    Configuration menu
    Copy the full SHA
    a0d38ea View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2017

  1. Adhere to Unix philosophy "Rule of Silence"

    The cleanup script which runs nightly runs `find [...] -delete -print`
    to delete old reports. The -print flag causes the find command to
    produce output like the following on stdout - which is then emailed to
    users.
    
        /opt/puppetlabs/pe_metric_curl_cron_jobs/puppetserver/127.0.0.1/20170304T025501Z.json
        /opt/puppetlabs/pe_metric_curl_cron_jobs/puppetdb/127.0.0.1/20170304T025501Z.json
    
    This is a normal recurring activity and does not need to be logged.
    Sending emails for it violates the "Rule of Silence" in the Unix
    philosophy. When a program has nothing surprising to say, it should say
    nothing.
    
    This commit aligns the retention cleanup cron job with the Unix
    philosophy's rule of silence.
    reidmv committed Mar 7, 2017
    Configuration menu
    Copy the full SHA
    0414bcf View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2017

  1. Merge pull request #6 from reidmv/clean-output

    Cleanup output for easy import into visualization tools
    npwalker authored Mar 13, 2017
    Configuration menu
    Copy the full SHA
    081a627 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2017

  1. Add exception handling when failing to retrieve a puppetdb metric

    Prior to this commit, if a single metric fails to be retrieved
    from the api then the whole metric script would fail.
    
    This commit adds exception handling that causes the error received
    to be logged in place of the metric hash.
    
    Fixes #9
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    176a37e View commit details
    Browse the repository at this point in the history
  2. Add exception handling to puppet server mertrics script

    Prior to this commit, if the puppetserver status endpoint wasn't
    avialable or didn't respond then no metrics file would be created.
    
    After this commit, a metrics file is created with the error message
    in place of the metrics hash.
    
    Fixes #9
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    38b1d19 View commit details
    Browse the repository at this point in the history
  3. Create method for retrieving the status endpoint

    This allows for raising the error at the correct place, when
    gathering the metrics, and then still get the api start and stop
    times recorded.
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    3afee94 View commit details
    Browse the repository at this point in the history
  4. Add error and error count keys

    In PuppetServer metrics you can only fail to collect the status
    endpoint so there's one error and error count key.
    
    In PuppetDB metrics you can fail to gather any individual metric
    so there is an error and error count key per metric.
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    8ec159f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a95a992 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #12 from npwalker/fix_exception_handling

    Improve Exception Handling
    npwalker authored Mar 17, 2017
    Configuration menu
    Copy the full SHA
    a774921 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5a8ff5e View commit details
    Browse the repository at this point in the history
  8. Use new metric for command queue depth in PE 2017.1

    Prior to this commit, we used the activemq metrics to determine
    the command queue depth.
    
    After this commit, when the PE version is 2071.1 or higher and
    thus includes the new stockpile queue implementation we use the
    new metric for determining the queue depth.  Otherwise we continue
    to use the amq metrics.
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    01d92c1 View commit details
    Browse the repository at this point in the history
  9. Add command processing time and command processed metrics

    These metrics allow for the calculation of sec/command,
    commands/sec, and commands processed as shown on the PDB
    performance dashboard.
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    e1efe60 View commit details
    Browse the repository at this point in the history
  10. Remove retry-persistence metrics

    We added these while grasping for some new metrics that might be
    helpful.  This metric never provided any debugging help and it
    has been removed in PE 2017.1.0 so we might as well just remove
    it altogether instead of special casing for version.
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    7fe2b14 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #11 from npwalker/fix_command_queue_metric_in_2017_1

    Fix command queue metric in 2017.1
    npwalker authored Mar 17, 2017
    Configuration menu
    Copy the full SHA
    efdd142 View commit details
    Browse the repository at this point in the history
  12. Updated README.md to reflect version 3.0.0

    Prior to this commit the README.md showed information about v2.x, which
    is no longer accurate with v3. This update provides new output anf
    updated commands for the current state of the module.
    jarretlavallee authored and npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    d1f923c View commit details
    Browse the repository at this point in the history
  13. Cleanup old scripts after renaming with .sh extension

    Prior to this commit, if you upgrade from a < 2 version of the
    module to a > 2 version of the module you'd see that you had a
    puppetdb_metrics.sh script and a puppet_server_metrics.sh script
    in your scripts directory.
    
    After this commit, we ensure that those scripts are removed.
    npwalker committed Mar 17, 2017
    Configuration menu
    Copy the full SHA
    2acf494 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2017

  1. Configuration menu
    Copy the full SHA
    a78689f View commit details
    Browse the repository at this point in the history
  2. Merge pull request #10 from jarretlavallee/issue8_README

    Updated README.md to reflect version 3.0.0 changes
    npwalker authored Mar 20, 2017
    Configuration menu
    Copy the full SHA
    f795d99 View commit details
    Browse the repository at this point in the history
  3. Pull the PuppetDB status endpoint for consistent queue_depth metric

    Prior to this commit, we used ActiveMQ metrics to find the queue
    depth metric and then in 2017.1 we used a specific metric from
    PuppetDB.  However, the status endpoint has a queue_depth metric
    in it that correctly chooses the backend depending on version.
    
    After this commit, we will only track the status endpoint and not
    the specific queue depth metric so that we can look at the same
    metric across versions.
    npwalker committed Mar 20, 2017
    Configuration menu
    Copy the full SHA
    bed6a99 View commit details
    Browse the repository at this point in the history
  4. Combine puppetdb and puppetserver metrics script into one

    Prior to this commit, the puppetserver and puppetdb metrics
    gathering scripts were seperate.  However, after adding the status
    endpoint to puppetdb metrics tracking it became clear that these
    two scripts should be the same.
    
    After this commit, there is one template for making the metrics
    gathering script.
    npwalker committed Mar 20, 2017
    Configuration menu
    Copy the full SHA
    fa12e32 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2017

  1. Allow passing a different metric script template to pe_metric

    Prior to this commit, we consolidated the puppetdb and puppetserver
    metric script templates to be the same reducing complexity.
    However, after doing that we wanted to add a seperate script for
    tracking activemq metrics that doesn't follow the same template.
    
    After this commit, we allow new metrics like ActiveMQ to pass in a
    different script template to use.  This allows consolidation of the
    puppetdb and puppetserver scripts and still allows for a one-off
    metrics template for new metrics.
    
    This commit also renames the metrics template to tk_metrics to
    indicate it is made for interacting with trapper keeper metrics.
    npwalker committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    f3824a9 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2017

  1. Merge pull request #13 from npwalker/track_puppetdb_status_endpoint

    Pull the PuppetDB status endpoint for consistent queue_depth metric
    npwalker authored Mar 23, 2017
    Configuration menu
    Copy the full SHA
    17f490f View commit details
    Browse the repository at this point in the history
  2. Add activemq metrics

    This commit adds the ability to monitor ActiveMQ, assuming it's been
    configured with Jolokia. That basically means Support-patched systems
    (using Charlie's pe_activemq_jolokia module), 2016.4.x >= 2016.4.4, or
    >2017.1.x.
    reidmv authored and npwalker committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    fea6aff View commit details
    Browse the repository at this point in the history
  3. Make cron minute, retention rate configurable

    So that the frequency at which metrics are collected can be increased.
    This is especially useful and meaningful when systems like ActiveMQ,
    which have rapid changes in metrics we care about, are being monitored.
    reidmv authored and npwalker committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    899ad74 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eb4d1c7 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #14 from reidmv/activemq

    Add ActiveMQ metrics gathering capability
    Add ability to configure retention days and collection frequency
    npwalker authored Mar 23, 2017
    Configuration menu
    Copy the full SHA
    6794a66 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    74af0ad View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2017

  1. Merge pull request #16 from abottchen/do-not-delete-the-scripts

    Make tidy cron not delete scripts and only delete its own metrics
    npwalker authored Mar 24, 2017
    Configuration menu
    Copy the full SHA
    7f7bdde View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2017

  1. Configuration menu
    Copy the full SHA
    d35478b View commit details
    Browse the repository at this point in the history
  2. Refactor compression and deletion into one script

    Prior to this commit, deletion of old files and compression of files
    were seperate cron jobs.
    
    After this commit, we have a single script to do both and stick with
    one cron job for tidying things.
    npwalker committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    e2bf8d8 View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2017

  1. Include hour, minute, and second in compressed tarball name

    Prior to this commit, running the script to compress metrics files
    twice in one day would result in overwriting the existing tarball.
    If you want to run the script manually for debugging or any other
    reason, losing data would be a not preferred side effect.
    
    After this commit, the tarball name includes the hour, minute and
    second to avoid overwriting the tarball if run twice in one day.
    npwalker committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    aff9c5c View commit details
    Browse the repository at this point in the history
  2. Change paths in tidy compression

    Prior to this commit the tar in tidy would embed the absolute path of
    the json files. Since paths can change, it is worth doing a relative
    path when compressing the files.
    
    This commit changes to relative paths for the tidy script
    
    Signed-off-by: Nick Walker <nick.walker@puppetlabs.com>
    Jarret Lavallee authored and npwalker committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    821c468 View commit details
    Browse the repository at this point in the history
  3. Only run the tidy cron jobs once daily

        Prior to this commit the tidy cron jobs would run every minute of 2am,
        which overwrites the tarball initially created by the script every
        minute. This commit starts the cron job only at 2:00am instead.
    Jarret Lavallee committed Apr 3, 2017
    Configuration menu
    Copy the full SHA
    b8321b4 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #15 from abottchen/add-tar-compression

    Add compression of metrics files everyday.  This produces about a 90% reduction in space needed to store metrics.
    npwalker authored Apr 3, 2017
    Configuration menu
    Copy the full SHA
    9351f5f View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2017

  1. Move 'what do you get' to the top of the README (#19)

    This update moves the value of the module to the top of the README
    and places how to setup the module second to give people context
    for why they should use the module before how to use it.
    
    This update also addresses changes made in version 3 of the module
    npwalker authored Apr 4, 2017
    Configuration menu
    Copy the full SHA
    56121b2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    13e2a0b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9abe00b View commit details
    Browse the repository at this point in the history