<commit_before>#!/usr/bin/env ruby
#
# RabbitMQ check cluster nodes health plugin
# ===
#
# This plugin checks if RabbitMQ server's cluster nodes are in a running state.
# It also accepts and optional list of nodes and verifies that those nodes are
# present in the cluster.
# The plugin is based on the RabbitMQ alive plugin by Abhijith G.
#
# Copyright 2012 <NAME> <<EMAIL>> and Runa Inc.
# Copyright 2014 <NAME> <<EMAIL>> and Cozy Services Ltd.
#
# Released under the same terms as Sensu (the MIT license); see LICENSE
# for details.

require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'sensu-plugin/check/cli'
require 'json'
require 'rest_client'

class CheckRabbitMQCluster < Sensu::Plugin::Check::CLI

  option :host,
    :description => "RabbitMQ host",
    :short => '-w',
    :long => '--host HOST',
    :default => 'localhost'

  option :username,
    :description => "RabbitMQ username",
    :short => '-u',
    :long => '--username USERNAME',
    :default => 'guest'
<commit_msg>Add todo for http vs. https in the cluster check<commit_after>#!/usr/bin/env ruby
#
# RabbitMQ check cluster nodes health plugin
# ===
#
# This plugin checks if RabbitMQ server's cluster nodes are in a running state.
# It also accepts and optional list of nodes and verifies that those nodes are
# present in the cluster.
# The plugin is based on the RabbitMQ alive plugin by Abhijith G.
#
#  Todo:
#    - Add ability to specify http vs. https
#
# Copyright 2012 <NAME> <<EMAIL>> and Runa Inc.
# Copyright 2014 <NAME> <<EMAIL>> and Cozy Services Ltd.
#
# Released under the same terms as Sensu (the MIT license); see LICENSE
# for details.

require 'rubygems' if RUBY_VERSION < '1.9.0'
require 'sensu-plugin/check/cli'
require 'json'
require 'rest_client'

class CheckRabbitMQCluster < Sensu::Plugin::Check::CLI

  option :host,
    :description => "RabbitMQ host",
    :short => '-w',
    :long => '--host HOST',
    :default => 'localhost'

  option :username,
    :description => "RabbitMQ username",
    :short => '-u',
    :long => '--username USERNAME',
    :default => 'guest'

{'fraction_non_alphanumeric': 0.12469908521906596, 'fraction_numerical': 0.01059220028887819, 'mean_word_length': 3.7770114942528736, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 31, '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': '1679951', 'n_tokens_mistral': 703, 'n_tokens_neox': 648, 'n_words': 253}