<commit_before>#! /usr/bin/env ruby
#
# check-ebs-snapshots
#
# DESCRIPTION:
#   Check EC2 Attached Volumes for Snapshots.  Only for Volumes with a Name tag.
#
# OUTPUT:
#   plain-text
#
# PLATFORMS:
#   Linux
#
# DEPENDENCIES:
#   gem: aws-sdk
#   gem: sensu-plugin
#
# USAGE:
#   ./check-ebs-snapshots.rb -r ${you_region}
#   ./check-ebs-snapshots.rb -r ${you_region} -p 1
#
# NOTES:
#
# LICENSE:
#   <NAME> <<EMAIL>>
#   Released under the same terms as Sensu (the MIT license); see LICENSE
#   for details.
#

require 'sensu-plugin/check/cli'
require 'aws-sdk'

class CheckEbsSnapshots < Sensu::Plugin::Check::CLI
  include Common
  option :period,
         short:       '-p N',
         long:        '--period Days',
         default:     7,
         description: 'Length in time to alert on missing snapshots'

  option :aws_region,<commit_msg>need to require the gem<commit_after>#! /usr/bin/env ruby
#
# check-ebs-snapshots
#
# DESCRIPTION:
#   Check EC2 Attached Volumes for Snapshots.  Only for Volumes with a Name tag.
#
# OUTPUT:
#   plain-text
#
# PLATFORMS:
#   Linux
#
# DEPENDENCIES:
#   gem: aws-sdk
#   gem: sensu-plugin
#
# USAGE:
#   ./check-ebs-snapshots.rb -r ${you_region}
#   ./check-ebs-snapshots.rb -r ${you_region} -p 1
#
# NOTES:
#
# LICENSE:
#   <NAME> <<EMAIL>>
#   Released under the same terms as Sensu (the MIT license); see LICENSE
#   for details.
#

require 'sensu-plugin/check/cli'
require 'sensu-plugins-aws'
require 'aws-sdk'

class CheckEbsSnapshots < Sensu::Plugin::Check::CLI
  include Common
  option :period,
         short:       '-p N',
         long:        '--period Days',
         default:     7,
         description: 'Length in time to alert on missing snapshots'

  option :aws_region,
{'fraction_non_alphanumeric': 0.13463751438434982, 'fraction_numerical': 0.0034522439585730723, 'mean_word_length': 2.7886710239651418, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5185810', 'n_tokens_mistral': 654, 'n_tokens_neox': 642, 'n_words': 173}