Netuitive / chef-netuitive

Installs Native Netuitive Agent
MIT License
4 stars 6 forks source link

Make DiskUsageCollector metrics whitelist configurable #43

Closed ziggythehamster closed 7 years ago

ziggythehamster commented 7 years ago

This introduces the disk_usage_collector_metrics_whitelist option, which is defaulted to the current value. Users might change this value if they want to ignore Docker device mapper metrics with a different whitelist value, like (?:^(?!iostat\.dm-).*\.io$|^(?!iostat\.dm-).*\.average_queue_length$|^(?!iostat\.dm-).*\.await$|^(?!iostat\.dm-).*\.iops$|^(?!iostat\.dm-).*\.read_await$|^(?!iostat\.dm-).*\.reads$|^(?!iostat\.dm-).*\.util_percentage|^(?!iostat\.dm-).*\.write_await$|^(?!iostat\.dm-).*\.writes$) (thanks, Jason ;)).

Since the constant is long, this adds the following Rubocop complaint:

libraries/resource_configure.rb:12:81: C: Line is too long. [225/80]
  attribute(:disk_usage_collector_metrics_whitelist, kind_of: String, default: '(?:^.*\.io$|^.*\.average_queue_length$|^.*\.await$|^.*\.iops$|^.*\.read_await$|^.*\.reads$|^.*\.util_percentage|^.*\.write_await$|^.*\.writes$)')
                                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Shortening that line would only make things more confusing, so I left it as is.

majormoses commented 7 years ago

By the way thank you for contributing!

majormoses commented 7 years ago

@ziggythehamster I merged and released to master and ensured its tagged. Thanks for contributing!