Module: Wazuh::Api::Endpoints::Manager
- Included in:
- Wazuh::Api::Endpoints, V4::Manager
- Defined in:
- lib/wazuh/api/endpoints/manager.rb
Instance Method Summary collapse
-
#check_manager_configuration ⇒ Object
Check Wazuh configuration Returns if Wazuh configuration is OK.
-
#delete_manager_local_file(options = {}) ⇒ Object
Delete a local file Confirmation message.
-
#get_manager_local_file(options = {}) ⇒ Object
Get local file Returns the content of a local file (rules, decoders and lists).
-
#manager_active_configuration(component, configuration) ⇒ Object
Get manager active configuration Returns the requested configuration in JSON format.
-
#manager_analysisd_stats ⇒ Object
Get analysisd stats Returns a summary of the current analysisd stats.
-
#manager_configuration(options = {}) ⇒ Object
Get manager configuration Returns ossec.conf in JSON format.
-
#manager_information ⇒ Object
Get manager information Returns basic information about manager.
-
#manager_log ⇒ Object
Get ossec.log Returns the three last months of ossec.log.
-
#manager_remoted_stats ⇒ Object
Get remoted stats Returns a summary of the current remoted stats.
-
#manager_stats(options = {}) ⇒ Object
Get manager stats Returns Wazuh statistical information for the current or specified date.
-
#manager_stats_by_hour ⇒ Object
Get manager stats by hour Returns Wazuh statistical information per hour.
-
#manager_stats_by_weekly ⇒ Object
Get manager stats by weekly Returns Wazuh statistical information per week.
-
#manager_status ⇒ Object
Get manager status Returns the status of the manager processes.
-
#manager_summary_log ⇒ Object
Get summary of ossec.log Returns a summary of the last three months of the
ossec.log
file. -
#restart_manager ⇒ Object
Restart Wazuh manager Restarts Wazuh manager.
-
#update_manager_local_file(options = {}) ⇒ Object
Update local file Upload a local file (rules, decoders and lists).
Instance Method Details
#check_manager_configuration ⇒ Object
Check Wazuh configuration Returns if Wazuh configuration is OK.
32 33 34 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 32 def check_manager_configuration get '/manager/configuration/validation' end |
#delete_manager_local_file(options = {}) ⇒ Object
Delete a local file Confirmation message.
42 43 44 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 42 def delete_manager_local_file( = {}) delete '/manager/files', end |
#get_manager_local_file(options = {}) ⇒ Object
Get local file Returns the content of a local file (rules, decoders and lists).
54 55 56 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 54 def get_manager_local_file( = {}) get '/manager/files', end |
#manager_active_configuration(component, configuration) ⇒ Object
Get manager active configuration Returns the requested configuration in JSON format.
13 14 15 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 13 def manager_active_configuration(component, configuration) get "/manager/config/#{component}/#{configuration}" end |
#manager_analysisd_stats ⇒ Object
Get analysisd stats Returns a summary of the current analysisd stats.
116 117 118 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 116 def manager_analysisd_stats get '/manager/stats/analysisd' end |
#manager_configuration(options = {}) ⇒ Object
Get manager configuration Returns ossec.conf in JSON format.
24 25 26 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 24 def manager_configuration( = {}) get '/manager/configuration', end |
#manager_information ⇒ Object
Get manager information Returns basic information about manager.
76 77 78 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 76 def manager_information get '/manager/info' end |
#manager_log ⇒ Object
Get ossec.log Returns the three last months of ossec.log.
92 93 94 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 92 def manager_log offset_request('get', '/manager/logs') end |
#manager_remoted_stats ⇒ Object
Get remoted stats Returns a summary of the current remoted stats.
150 151 152 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 150 def manager_remoted_stats get '/manager/stats/remoted' end |
#manager_stats(options = {}) ⇒ Object
Get manager stats Returns Wazuh statistical information for the current or specified date.
126 127 128 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 126 def manager_stats( = {}) get '/manager/stats', end |
#manager_stats_by_hour ⇒ Object
Get manager stats by hour Returns Wazuh statistical information per hour. Each number in the averages field represents the average of alerts per hour.
134 135 136 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 134 def manager_stats_by_hour get '/manager/stats/hourly' end |
#manager_stats_by_weekly ⇒ Object
Get manager stats by weekly Returns Wazuh statistical information per week. Each number in the hours field represents the average alerts per hour for that specific day.
142 143 144 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 142 def manager_stats_by_weekly get '/manager/stats/weekly' end |
#manager_status ⇒ Object
Get manager status Returns the status of the manager processes.
84 85 86 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 84 def manager_status get '/manager/status' end |
#manager_summary_log ⇒ Object
Get summary of ossec.log Returns a summary of the last three months of the ossec.log
file.
100 101 102 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 100 def manager_summary_log get '/manager/logs/summary' end |
#restart_manager ⇒ Object
Restart Wazuh manager Restarts Wazuh manager.
108 109 110 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 108 def restart_manager put '/manager/restart' end |
#update_manager_local_file(options = {}) ⇒ Object
Update local file Upload a local file (rules, decoders and lists).
68 69 70 |
# File 'lib/wazuh/api/endpoints/manager.rb', line 68 def update_manager_local_file( = {}) post '/manager/files', end |