This document shows step-by-step instructions of how to get the BigAnimal database logs and export them to a file. This is applied to BigAnimal at Azure. For AWS, please refer to the document.
1. Open Azure Log Analytics workspaces.
2. Filter by Tags - ManagedBy BigAnimal to locate to the log analytics instance.
3. Click 'Logs' to query the logs.
4. Get the specific database cluster logs
Input below KQL search string to get the logs, please replace the database cluster ID at pg_cluster_id_s == 'p-c6dga9d6vp7f3n6t068g' with the your database cluster ID (Document has the instruction of how to get the database cluster ID).
| where pg_cluster_id_s == 'p-c6dga9d6vp7f3n6t068g'
| extend error_severity = extractjson("$.record.error_severity", Message), log_message = extractjson("$.record.message", Message), sql_state_code = extractjson("$.record.sql_state_code", Message)
| project TimeGenerated, record_log_time_s, pg_cluster_id_s, error_severity, log_message, sql_state_code, msg_s, logging_pod_s, Message
| sort by TimeGenerated asc
You can change the 'Time range', the default value is 'Last 24 hours'.
You can export the logs to CSV file by the 'Export' function.