0

Exporting 24 Hour Events List

Hi Is there any way we can generate a CSV and send it out of Canary for events every 24H?

 

Thanks

2 replies

null
    • jddios_osorio
    • 5 mths ago
    • Reported - view

    One way to generate a CSV and send it out of Canary for events every 24 hours is to configure an SQLite database and then query the database to retrieve the required events. Here is a step-by-step approach:

    1. Configure an SQLite Database:

      • Set up an SQLite database to store the events data from Canary.
    2. Insert Data into SQLite Database:

      • Ensure that your Canary system is configured to insert the event data into the SQLite database. 
    3. Query the SQLite Database:

      • Use a SQL query to select the events that occurred within the last 24 hours. Here is an example of a query that retrieves all events from the last 24 hours:
      • SELECT * FROM events WHERE timestamp >= datetime('now', '-1 day')
      • In this query:
        • events is the table name where your event data is stored.
        • timestamp is the column that stores the event time.
        • datetime('now', '-1 day') is an SQLite function that returns the date and time 24 hours ago from the current time.
    4. Export Query Results to CSV:

      • Use a script or tool to execute the above query and export the results to a CSV file.
    5. Automate the Process:

      • Schedule this process to run every 24 hours using a task scheduler or cron job, ensuring that a new CSV file is generated and sent out daily.
      • adand
      • 5 mths ago
      • Reported - view

      jddios. osorio  Thank you so much for your response. 

Content aside

print this pagePrint this page
  • 5 mths agoLast active
  • 2Replies
  • 38Views
  • 3 Following