Module: Wazuh::Api::Endpoints::V4::Agents
Instance Method Summary
collapse
-
#add_agent_quick(agent_name) ⇒ Object
-
#add_agent_to_group(id, group) ⇒ Object
-
#add_agents_to_group(ids, group_id) ⇒ Object
-
#agent(agent_id, options = {}) ⇒ Object
-
#agent_by_name(agent_name, options = {}) ⇒ Object
-
#agent_summary ⇒ Object
-
#agent_upgrade(agent_id, options = {}) ⇒ Object
-
#agent_upgrade_custom(agent_id, options = {}) ⇒ Object
-
#agents_by_group(group_id, options = {}) ⇒ Object
-
#create_group(group_id) ⇒ Object
-
#delete_agent(agent_ids, options = {}) ⇒ Object
-
#delete_agent_by_group(ids) ⇒ Object
-
#get_file_in_group(group_id, filename, options = {}) ⇒ Object
-
#group_configuration(group_id, options = {}) ⇒ Object
-
#group_files(group_id, options = {}) ⇒ Object
-
#groups(options = {}) ⇒ Object
-
#remove_agents_of_group(ids, group) ⇒ Object
-
#remove_group(group_id) ⇒ Object
-
#upgrade_result_from_agent(agent_id, options = {}) ⇒ Object
Methods included from Agents
#add_agent, #agent_config, #agent_key, #agent_os_summary, #agent_sync_status, #agents_by_no_group, #all_agents, #delete_agents, #distinct_fields_in_agents, #insert_agent, #outdated_agents, #remove_agent_of_group, #remove_all_agent_of_group, #restart_agents, #restart_all_agents, #restart_an_agents, #update_group_ossec_configuration
Instance Method Details
#add_agent_quick(agent_name) ⇒ Object
75
76
77
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 75
def add_agent_quick(agent_name)
post "/agents/insert/quick/", {}, {agent_name: agent_name}
end
|
#add_agent_to_group(id, group) ⇒ Object
15
16
17
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 15
def add_agent_to_group(id, group)
put "/agents/#{id}/group/#{group}"
end
|
#add_agents_to_group(ids, group_id) ⇒ Object
63
64
65
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 63
def add_agents_to_group(ids, group_id)
put "/agents/group", { group_id: group_id, agents_list: ids}
end
|
#agent(agent_id, options = {}) ⇒ Object
27
28
29
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 27
def agent(agent_id, options = {})
get "/agents", options.merge({ agents_list: agent_id})
end
|
#agent_by_name(agent_name, options = {}) ⇒ Object
55
56
57
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 55
def agent_by_name(agent_name, options = {})
get "/agents", options.merge({name: agent_name})
end
|
#agent_summary ⇒ Object
59
60
61
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 59
def agent_summary
get "/agents/summary/status"
end
|
#agent_upgrade(agent_id, options = {}) ⇒ Object
67
68
69
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 67
def agent_upgrade(agent_id, options = {})
put "/agents/upgrade", options.merge({agents_list: agent_id})
end
|
#agent_upgrade_custom(agent_id, options = {}) ⇒ Object
71
72
73
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 71
def agent_upgrade_custom(agent_id, options = {})
put "/agents/upgrade_custom", options.merge({agents_list: agent_id})
end
|
#agents_by_group(group_id, options = {}) ⇒ Object
39
40
41
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 39
def agents_by_group(group_id, options = {})
offset_request('get', "/groups", options.merge({groups_list: group_id}))
end
|
#create_group(group_id) ⇒ Object
79
80
81
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 79
def create_group(group_id)
post "/agents/groups", {group_id: group_id}
end
|
#delete_agent(agent_ids, options = {}) ⇒ Object
7
8
9
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 7
def delete_agent(agent_ids, options = {})
delete "/agents", options.merge({ agents_list: agent_ids })
end
|
#delete_agent_by_group(ids) ⇒ Object
19
20
21
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 19
def delete_agent_by_group(ids)
delete '/agents/groups', {groups_list: ids}
end
|
#get_file_in_group(group_id, filename, options = {}) ⇒ Object
51
52
53
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 51
def get_file_in_group(group_id, filename, options = {})
get "groups/#{group_id}/files/#{filename}", options
end
|
#group_configuration(group_id, options = {}) ⇒ Object
43
44
45
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 43
def group_configuration(group_id, options = {})
get "/groups/#{group_id}/configuration", options
end
|
#group_files(group_id, options = {}) ⇒ Object
47
48
49
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 47
def group_files(group_id, options = {})
get "/groups/#{group_id}/files", options
end
|
#groups(options = {}) ⇒ Object
35
36
37
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 35
def groups(options = {})
get '/groups', options
end
|
#remove_agents_of_group(ids, group) ⇒ Object
11
12
13
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 11
def remove_agents_of_group(ids, group)
delete "/agents/group", {group_id: group, agents_list: ids }
end
|
#remove_group(group_id) ⇒ Object
23
24
25
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 23
def remove_group(group_id)
delete "/agents/groups", { groups_list: group_id }
end
|
#upgrade_result_from_agent(agent_id, options = {}) ⇒ Object
31
32
33
|
# File 'lib/wazuh/api/endpoints/v4/agents.rb', line 31
def upgrade_result_from_agent(agent_id, options = {})
get "/agents/upgrade_result", options.merge({ agents_list: agent_id})
end
|