Sha256: 4493d74086eb8c97293ad2a8724abcd2fcbece5f85829ef698b9ed45218aaab2

Contents?: true

Size: 1.32 KB

Versions: 5

Compression:

Stored size: 1.32 KB

Contents

require 'mixlib/cli'

module ZabbixNudge
  class NudgeCLI
    include Mixlib::CLI

    option :jmx__base_uri,
      :long  => "--jmx_base_uri uri",
      :description => "The jmx base uri"

  end

  class JmxCLI
    include Mixlib::CLI

    option :base_uri,
      :short => "-b uri",
      :default => "localhost:8080",
      :long  => "--base_uri uri",
      :description => "The jmx base uri"

    option :command,
      :short => "-o command",
      :default => "read",
      :long  => "--command action",
      :description => "The command to perform",
      :proc => Proc.new { |o| o.to_sym }

    option :mbean,
      :short => "-m mbean",
      :long  => "--mbean mbean",
      :description => "The name of the mbean e.g. java.lang:type=Memory (needed for read command)"

    option :attribute,
      :short => "-a attribute",
      :long  => "--attribute attribute",
      :description => "The name of the action e.g. HeapMemoryUsage (needed for read command)"

    option :path,
      :short => "-p path",
      :long  => "--path path",
      :description => "The name of the path e.g. used (needed for read and list command)"

    option :help,
      :short => "-h",
      :long => "--help",
      :description => "Show this message",
      :on => :tail,
      :boolean => true,
      :show_options => true,
      :exit => 0

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zabbix_nudge-0.1.9 lib/zabbix_nudge/jmx_cli.rb
zabbix_nudge-0.1.8 lib/zabbix_nudge/jmx_cli.rb
zabbix_nudge-0.1.7 lib/zabbix_nudge/jmx_cli.rb
zabbix_nudge-0.1.5 lib/zabbix_nudge/jmx_cli.rb
zabbix_nudge-0.1.3 lib/zabbix_nudge/jmx_cli.rb