Skip to content

Commit

Permalink
add port and ip for API
Browse files Browse the repository at this point in the history
  • Loading branch information
Deblintrake09 committed Feb 21, 2024
1 parent b0ce46f commit 8128e8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deps/wazuh_testing/wazuh_testing/scripts/wazuh_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ def get_script_arguments():
parser.add_argument('-a', '--use_api', dest='use_api', type=bool, action='store', default=False,
help="Determine if the API should be used to collect the data. Default False."
"For remoted set to True to get data from API. analysis_events uses API by default.")
parser.add_argument('-i', '--ip' dest='ip', action='store', default='localhost',
help=f"IP for the API. Default localhost.")
parser.add_argument('-p', '--port' dest='port', action='store', default='55000',
help=f"port for the API. Default localhost.")

return parser.parse_args()

Expand All @@ -54,7 +58,8 @@ def main():
logger.info(f'Started new session: {CURRENT_SESSION}')

for target in options.target_list:
monitor = StatisticMonitor(target=target, time_step=options.sleep_time, dst_dir=options.store_path, use_api=options.use_api)
monitor = StatisticMonitor(target=target, time_step=options.sleep_time, dst_dir=options.store_path,
use_api=options.use_api, ip=options.ip, port=options.port)
MONITOR_LIST.append(monitor)
monitor.start()

Expand Down

0 comments on commit 8128e8a

Please sign in to comment.