class GraylogAPI::System::Cluster
class for get system information of a node
Public Class Methods
new(client)
click to toggle source
# File lib/graylogapi/system/cluster.rb, line 5 def initialize(client) @client = client end
Public Instance Methods
node()
click to toggle source
# File lib/graylogapi/system/cluster.rb, line 9 def node @client.request(:get, '/system/cluster/node') end
node_by_hostname(hostname)
click to toggle source
# File lib/graylogapi/system/cluster.rb, line 21 def node_by_hostname(hostname) nodes['nodes'].find { |n| n['hostname'] == hostname } end
node_by_id(id)
click to toggle source
# File lib/graylogapi/system/cluster.rb, line 17 def node_by_id(id) @client.request(:get, "/system/cluster/nodes/#{id}") end
nodes()
click to toggle source
# File lib/graylogapi/system/cluster.rb, line 13 def nodes @client.request(:get, '/system/cluster/nodes') end