Export Visualizations to scv

200 views
Skip to first unread message

Alex Boo

unread,
Aug 30, 2023, 12:47:15 PM8/30/23
to Wazuh | Mailing List
Hello!

I have compiled a table in the visualizer that uploads the session ID, user name and the maximum and minimum time according to these criteria. 
I need to get it automatically every day in CSV, but in the visualizer I can only get it in PDF
I can't repeat this in Discovery because I can't adjust the minimum and maximum column.
Is it possible to somehow implement uploading this table to CSV automatically. 

I can manually upload it to CSV via Inspect, but I need daily implementation.


Wazuh V.png

Alex Boo

unread,
Aug 30, 2023, 2:16:10 PM8/30/23
to Wazuh | Mailing List
Perhaps this can be done through some kind of request? For example, to BD wash, and pull out the data from there?

Nicolas Zapata

unread,
Aug 30, 2023, 9:12:39 PM8/30/23
to Wazuh | Mailing List
Hi Alex thanks for using wazuh!

I think you can use the API to retrive the visualization data with  curl -XGET --user admin:admin http://localhost:5601/api/saved_objects/_find?type=visualization, then you can write a script (Python, Bash, etc.) that utilizes the  API to fetch the required data from your visualization. This script can be scheduled to run daily using cron jobs (Linux) or Task Scheduler (Windows).
In the script, once you've fetched the data from the API, you can format it into a CSV structure. Python has libraries like csv that make this task straightforward. If you're using a different scripting language, there are similar libraries available.
 
If you need assistance with the implementation, please let us know and we will be happy to help.
Regards

Alex Boo

unread,
Aug 31, 2023, 3:38:07 AM8/31/23
to Wazuh | Mailing List
Hi  Nicolas!

I would be very glad if you could help me. 
I understand correctly that through the API I run a Python script from another server and upload the necessary data. 
Or can I run a Python script on the Wazuh server?

четверг, 31 августа 2023 г. в 04:12:39 UTC+3, Nicolas Zapata:

Nicolas Zapata

unread,
Sep 5, 2023, 12:47:54 PM9/5/23
to Wazuh | Mailing List
Hi Alex sorry for the delay! Yes, you can run the script from the server or from outside if you like. I recommend you to read this documentation section https://documentation.wazuh.com/current/user-manual/api/getting-started.html

Regards



pdnb

unread,
Aug 28, 2024, 5:51:36 AM8/28/24
to Wazuh | Mailing List

this is API from wazuh or opensearch? i don't recognize port :)
Reply all
Reply to author
Forward
0 new messages