Class: Mackerel::Commands::Host

Inherits:
Thor
  • Object
show all
Defined in:
lib/mackerel/commands/host.rb

Instance Method Summary collapse

Instance Method Details

#listObject



12
13
14
# File 'lib/mackerel/commands/host.rb', line 12

def list
  puts JSON.pretty_generate Mackerel.hosts(options)
end

#metrics(id) ⇒ Object



36
37
38
# File 'lib/mackerel/commands/host.rb', line 36

def metrics(id)
  puts JSON.pretty_generate Mackerel.host_metrics(id, options)
end

#retire(id) ⇒ Object



28
29
30
# File 'lib/mackerel/commands/host.rb', line 28

def retire(id)
  puts JSON.pretty_generate Mackerel.retire_host(id)
end

#show(id) ⇒ Object



17
18
19
# File 'lib/mackerel/commands/host.rb', line 17

def show(id)
  puts JSON.pretty_generate Mackerel.host(id)
end