Module: Wazuh::Api::Endpoints::Syscollector

Included in:
Wazuh::Api::Endpoints, V4::Syscollector
Defined in:
lib/wazuh/api/endpoints/syscollector.rb

Instance Method Summary collapse

Instance Method Details

#hardware(agent_id, options = {}) ⇒ Object

Returns the agent’s hardware info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :select (select)

    List of selected fields separated by commas.

See Also:



12
13
14
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 12

def hardware(agent_id, options = {})
  get "/syscollector/#{agent_id}/hardware", options
end

#netaddr(agent_id, options = {}) ⇒ Object

Returns the agent’s network address info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

  • :select (select)

    List of selected fields separated by commas.

  • :iface (iface)

    Filters by interface name.

  • :proto (proto)

    Filters by proto.

  • :address (address)

    Filters by address.

  • :broadcast (broadcast)

    Filters by broadcast.

  • :netmask (netmask)

    Filters by netmask.

See Also:



40
41
42
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 40

def netaddr(agent_id, options = {})
  offset_request('get', "/syscollector/#{agent_id}/netaddr", options)
end

#netiface(agent_id, options = {}) ⇒ Object

Returns the agent’s network interface info

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

  • :select (select)

    List of selected fields separated by commas.

  • :name (name)

    Filters by name.

  • :adapter (adapter)

    Filters by adapter.

  • :type (type)

    Filters by type.

  • :state (state)

    Filters by state.

  • :mtu (mtu)

    Filters by mtu.

  • :tx_packets (tx_packets)
  • :rx_packets (rx_packets)
  • :tx_bytes (tx_bytes)
  • :rx_bytes (rx_bytes)
  • :tx_errors (tx_errors)
  • :rx_errors (rx_errors)
  • :tx_dropped (tx_dropped)
  • :rx_dropped (rx_dropped)

See Also:



76
77
78
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 76

def netiface(agent_id, options = {})
  offset_request('get', "/syscollector/#{agent_id}/netiface", options)
end

#netproto(agent_id, options = {}) ⇒ Object

Returns the agent’s network protocol info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

  • :select (select)

    List of selected fields separated by commas.

  • :iface (iface)

    Filters by interface name.

  • :type (type)

    Filters by type.

  • :gateway (gateway)

    Filters by gateway.

  • :dhcp (dhcp)

    Filters by dhcp.

See Also:



102
103
104
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 102

def netproto(agent_id, options = {})
  offset_request('get', "/syscollector/#{agent_id}/netproto", options)
end

#os(agent_id, options = {}) ⇒ Object

Returns the agent’s OS info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :select (select)

    List of selected fields separated by commas.

See Also:



112
113
114
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 112

def os(agent_id, options = {})
  get "/syscollector/#{agent_id}/os", options
end

#packages(agent_id, options = {}) ⇒ Object

Returns the agent’s packages info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

  • :select (select)

    List of selected fields separated by commas.

  • :vendor (vendor)

    Filters by vendor.

  • :name (name)

    Filters by name.

  • :architecture (architecture)

    Filters by architecture.

  • :format (format)

    Filters by format.

  • :version (version)

    Filters by format.

See Also:



140
141
142
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 140

def packages(agent_id, options = {})
  offset_request('get', "/syscollector/#{agent_id}/packages", options)
end

#ports(agent_id, options = {}) ⇒ Object

Get ports info of an agent Returns the agent’s ports info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

  • :select (select)

    List of selected fields separated by commas.

  • :pid (pid)

    Filters by pid.

  • :protocol (protocol)

    Filters by protocol.

  • :local_ip (local_ip)

    Filters by local_ip.

  • :local_port (local_port)

    Filters by local_port.

  • :remote_ip (remote_ip)

    Filters by remote_ip.

  • :tx_queue (tx_queue)

    Filters by tx_queue.

  • :state (state)

    Filters by state.

See Also:



173
174
175
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 173

def ports(agent_id, options = {})
  offset_request('get', "/syscollector/#{agent_id}/ports", options)
end

#processes(agent_id, options = {}) ⇒ Object

Get processes info Returns the agent's processes info.

Parameters:

  • agent_id (String)
  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :offset (offset)

    First element to return in the collection.

  • :limit (limit)

    Maximum number of elements to return.

  • :sort (sort)

    Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.

  • :search (search)

    Looks for elements with the specified string.

  • :select (select)

    List of selected fields separated by commas.

  • :pid (pid)

    Filters by pid.

  • :state (state)

    Filters by process state.

  • :ppid (ppid)

    Filters by process parent pid.

  • :egroup (egroup)

    Filters by process egroup.

  • :euser (euser)

    Filters by process euser.

  • :fgroup (fgroup)

    Filters by process fgroup.

  • :name (name)

    Filters by process name.

  • :nlwp (nlwp)

    Filters by process nlwp.

  • :pgrp (pgrp)

    Filters by process pgrp.

  • :priority (priority)

    Filters by process priority.

  • :rgroup (rgroup)

    Filters by process rgroup.

  • :ruser (ruser)

    Filters by process ruser.

  • :sgroup (sgroup)

    Filters by process sgroup.

  • :suser (suser)

    Filters by process suser.

See Also:



221
222
223
# File 'lib/wazuh/api/endpoints/syscollector.rb', line 221

def processes(agent_id, options = {})
  offset_request('get', "/syscollector/#{agent_id}/processes", options)
end