Module: Wazuh::Api::Endpoints::Rootcheck

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

Instance Method Summary collapse

Instance Method Details

#cleak_rootcheck_database_for_agent(agent_id) ⇒ Object

Clear rootcheck database of an agent Clears the rootcheck database for a specific agent.



19
20
21
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 19

def cleak_rootcheck_database_for_agent(agent_id)
  delete "/rootcheck/#{agent_id}"
end

#clear_rootcheck_databaseObject

Clear rootcheck database Clears the rootcheck database for all agents.



10
11
12
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 10

def clear_rootcheck_database
  delete '/rootcheck'
end

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

Get rootcheck CIS requirements Returns the CIS requirements of all rootchecks of the specified agent.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :offset (offset)
  • :limit (limit)
  • :sort (sort)
  • :search (search)

See Also:



41
42
43
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 41

def rootcheck_cis_requirements(agent_id, options = {})
  offset_request('get', "/rootcheck/#{agent_id}/cis", options)
end

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

Get rootcheck database Returns the rootcheck database of an agent.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :pci (pci)
  • :cis (cis)
  • :offset (offset)
  • :limit (limit)
  • :sort (sort)
  • :search (search)
  • :status (status)

See Also:



57
58
59
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 57

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

#rootcheck_last_scan(agent_id) ⇒ Object

Get last rootcheck scan Returns the timestamp of the last rootcheck scan.



28
29
30
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 28

def rootcheck_last_scan(agent_id)
  get "/rootcheck/#{agent_id}/last_scan"
end

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

Get rootcheck pci requirements Returns the PCI requirements of all rootchecks of the agent.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :offset (offset)
  • :limit (limit)
  • :sort (sort)
  • :search (search)

See Also:



70
71
72
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 70

def rootcheck_pic_requirements(agent_id, options = {})
  offset_request('get', "/rootcheck/#{agent_id}/pci", options)
end

#run_rootcheck(agent_id) ⇒ Object

Run rootcheck scan in an agent Runs syscheck and rootcheck on a specified agent (Wazuh launches both processes simultaneously)



87
88
89
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 87

def run_rootcheck(agent_id)
  put "/rootcheck/#{agent_id}"
end

#run_rootcheck_all_agentsObject

Run rootcheck scan in all agents Runs syscheck and rootcheck on all agents (Wazuh launches both processes simultaneously).



78
79
80
# File 'lib/wazuh/api/endpoints/rootcheck.rb', line 78

def run_rootcheck_all_agents
  put '/rootcheck'
end