Guepard / Platform
Guepard Platform - Server Logs
Full visibility into server activity and performance
Guepard Platform provides a comprehensive logging system that captures and stores server activity, helping users monitor, debug, and optimize their deployments. Logs are categorized based on system components, allowing granular visibility into operations, errors, and performance metrics.
Tip: Regularly reviewing logs can help identify performance bottlenecks and security issues before they become critical.
Log Categories
Guepard Platform logs can be divided into the following categories:
- System Logs: Captures OS-level events, including resource usage and critical system events.
- Application Logs: Records events related to Guepard's core services, including execution traces and errors.
- Database Logs: Stores logs related to database interactions, including query execution times and errors.
- Security Logs: Tracks authentication attempts, access control events, and potential security threats.
Accessing Logs
Logs can be accessed via:
- Guepard Console: Navigate to the "Logs" section to browse, filter, and analyze log data.
- CLI: Use
guepard logscommand to fetch logs directly from the command line. - API: Guepard provides a REST API for querying logs programmatically.
Storage Considerations
Large log files can consume significant storage. Ensure you configure retention policies appropriately.
PostgreSQL Logs: Querying Without Additional Configuration
PostgreSQL maintains basic logs that can be accessed without changing configuration settings. You can retrieve useful insights using built-in SQL commands.
These queries allow you to analyze PostgreSQL performance and troubleshoot issues efficiently without modifying server configurations.
1. View Active Queries
Lists currently running queries along with execution time.
SELECT pid, usename, datname, query, state, query_start
FROM pg_stat_activity
ORDER BY query_start;
2. Check Recent Deadlocks
Displays conflicts such as deadlocks occurring in the database.
SELECT * FROM pg_stat_database_conflicts;
Tip: If you notice frequent deadlocks, consider optimizing query execution plans and indexing.
3. Monitor Query Statistics
Identifies tables with high sequential scans, which can indicate missing indexes.
SELECT relname, seq_scan, seq_tup_read, idx_scan
FROM pg_stat_user_tables
ORDER BY seq_scan DESC;
4. Find Long-Running Queries
Retrieves queries running for more than 5 minutes.
SELECT pid, age(clock_timestamp(), query_start), query
FROM pg_stat_activity
WHERE state != 'idle' AND age(clock_timestamp(), query_start) > interval '5 minutes';
Warning: Long-running queries can impact database performance. Investigate and optimize queries that take excessive time.
5. Check Connection Statistics
Provides an overview of database activity, including active connections and transaction status.
SELECT datname, numbackends, xact_commit, xact_rollback
FROM pg_stat_database;
Tip: Monitoring active connections helps prevent database overload and potential downtime.
Guepard Platform's logging capabilities provide essential insights into server health, application behavior, and database performance. By leveraging built-in PostgreSQL queries, users can gain immediate visibility into database activity without additional setup.
Tip: Set up automated alerts based on log anomalies to proactively detect and resolve potential issues.