<commit_before>#! /usr/bin/env ruby
#
# check-topics
#
# DESCRIPTION:
#   This plugin checks topics properties.
#
# OUTPUT:
#   plain-text
#
# PLATFORMS:
#   Linux
#
# DEPENDENCIES:
#   gem: sensu-plugin
#
# USAGE:
#   ./check-consumer-lag
#
# NOTES:
#
# LICENSE:
#   <NAME>
#   Released under the same terms as Sensu (the MIT license); see LICENSE
#   for details.
#

require 'sensu-plugin/check/cli'

class TopicCheck < Sensu::Plugin::Check::CLI
  option :kafka_home,
         description: 'Kafka home',
         short:       '-k NAME',
         long:        '--kafka-home NAME',
         default:     '/opt/kafka'

  option :zookeeper,
         description: 'ZooKeeper connect string',
         short:       '-z NAME',
         long:        '--zookeeper NAME',
         default:     'localhost:2181'

  option :properites,
         description: 'Replication factor for this topic',<commit_msg>Fix doc<commit_after>#! /usr/bin/env ruby
#
# check-topics
#
# DESCRIPTION:
#   This plugin checks topics properties.
#
# OUTPUT:
#   plain-text
#
# PLATFORMS:
#   Linux
#
# DEPENDENCIES:
#   gem: sensu-plugin
#
# USAGE:
#   ./check-topics
#
# NOTES:
#
# LICENSE:
#   <NAME>
#   Released under the same terms as Sensu (the MIT license); see LICENSE
#   for details.
#

require 'sensu-plugin/check/cli'

class TopicCheck < Sensu::Plugin::Check::CLI
  option :kafka_home,
         description: 'Kafka home',
         short:       '-k NAME',
         long:        '--kafka-home NAME',
         default:     '/opt/kafka'

  option :zookeeper,
         description: 'ZooKeeper connect string',
         short:       '-z NAME',
         long:        '--zookeeper NAME',
         default:     'localhost:2181'

  option :properites,
         description: 'Replication factor for this topic',
{'fraction_non_alphanumeric': 0.13089887640449438, 'fraction_numerical': 0.0044943820224719105, 'mean_word_length': 2.341463414634146, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '3055230', 'n_tokens_mistral': 632, 'n_tokens_neox': 604, 'n_words': 152}