Observability refers to the extent to which the internal state and behavior of a system can be understood, monitored, and analyzed from the outside, typically by developers and DevOps. It focuses on providing insight into how a system is performing, what is happening inside it, and how it is interacting with its environment.
The goal of observability is to make it easier to diagnose and resolve issues, optimize performance, and gain insights into the system's behavior. It is especially crucial in modern, complex, and distributed systems, where understanding the interactions between different services and components can be challenging. DevOps Research and Assessment (DORA) research shows that a comprehensive monitoring and observability solution, along with several other technical practices, positively contributes to the management of software infrastructure.
YugabytedDB provides several components and features that you can use to actively monitor your system and diagnose issues quickly.
Use metrics to track trends and identify performance issues, and manage the system's performance and reliability.
YugabyteDB exports various metrics, which are effectively quantitative measurements of the cluster's performance and behavior. These metrics include details on latency, connections, cache, consensus, replication, response times, resource usage, and more:
- Throughput and latency metrics
- Connection metrics
- Cache and storage metrics
- Raft and distributed system metrics
- Replication metrics
- YB-Master metrics
Alerting and monitoring
Monitoring involves continuously checking the system's health and performance and notifying stakeholders if any issues arise. For this, you can set up automated alerts based on predefined thresholds or conditions. All metrics exposed by YugabytedDB are exportable to third-party monitoring tools like Prometheus and Grafana which provide industry-standard alerting functionalities.
Visualization and analysis
YugabytedB provides dashboards that include charts, graphs, and other visual representations of the system's state and performance. yugabyted starts a web-UI on port 15433 that displays different charts for various metrics.
Logs from different services, such as the YB-TServer and YB-Master provide a historical record of what has happened and can be very useful in debugging and troubleshooting. These logs are rotated regularly, based on their size as configured. See Logs management.
View live queries using the pg_stat_activity view, and get query statistics (such as the time spent by a query) using the pg_stat_statements view. Use these query-level metrics to tune query performance.
To get more details about the various steps of a query execution, use the Explain Analyze command.