Class: Nagios::Splunk::CLI

Inherits:
Object
  • Object
show all
Includes:
Mixlib::CLI
Defined in:
lib/nagios/splunk/cli.rb

Instance Method Summary collapse

Instance Method Details

#run(argv = ARGV) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/nagios/splunk/cli.rb', line 28

def run(argv = ARGV)
  parse_options(argv)

  client = RestClient.new(config[:server_url])
  splunk = Check.new(client)

  status, message = splunk.license_usage(config[:warn], config[:crit])

  puts message
  status
end