Monitoring infrastructure
Overview
Monitoring is essential to ensure the health, performance, and security of your Rayls infrastructure. This section provides a high-level overview of monitoring key components in both the Private Subnet and Privacy Ledger infrastructures using popular third-party tools. These tools allow for real-time monitoring, alerting, and visualization of critical metrics.
Ensuring the reliability, performance optimization, and seamless operation of Rayls components is paramount to the success of any platform. Effective monitoring serves as one of the pillars of this endeavor, providing critical insights into system health, performance trends, and potential issues that require immediate attention.
Rayls Components generate logs, accessible throughout container outputs. These logs can be extracted or exported to alternative analysis and alerting solutions.
For detailed installation and configuration instructions, we recommend referring to the official documentation for the monitoring tools listed below.
Recommended Monitoring Tools
We suggest using the following third-party tools for monitoring the Rayls infrastructure:
- Prometheus: A popular open-source tool for collecting real-time metrics and monitoring system performance. Read more in Prometheus Documentation.
- Grafana: A powerful visualization tool that integrates with Prometheus to display real-time dashboards and monitor key metrics. Read more in Grafana Documentation.
- MongoDB Monitoring: MongoDB provides its own monitoring features that integrate with other tools like Prometheus and Grafana. Read more in MongoDB Monitoring Documentation.
- Centralized Logging: Solutions like the ELK Stack or Fluentd (Elasticsearch, Logstash, and Kibana) can be used to centralize and manage logs from Rayls components.
Key Metrics to Monitor
While the specific setup and configuration of monitoring tools depend on your environment, below are some general suggested metrics that could be monitored across the Private Subnet and Privacy Ledger infrastructures.
When monitoring your Private Subnet and Privacy Ledger, it's important to track key performance indicators for each component:
- For the Relayer, monitor CPU usage, transaction throughput, and error rates.
- The Commit Chain (as Hyperledger Besu) requires tracking block production time and peer connectivity.
- For MongoDB, focus on query performance, disk space usage, and replica set health, while also ensuring backup integrity.
- For the Block Explorer, monitor API response times and data consistency.
Each component in your Rayls infrastructure can expose metrics that are compatible with these tools, allowing for comprehensive monitoring. Refer to the documentation of each monitoring tool to learn how to configure the collection and visualization of these metrics.
Dashboard and Visualization Examples
Grafana provides customizable dashboards that can be tailored to display relevant metrics from both the Private Subnet and Privacy Ledger infrastructures.
- System Health Dashboard: Track CPU, memory, and disk usage across all Rayls components.
- Transaction Throughput Dashboard: Monitor the number of transactions processed by Relayers and other core components.
- Database Performance Dashboard: Visualize MongoDB performance metrics like query time and replication health.
For templates and examples, refer to the official Grafana documentation or explore available dashboards in the Grafana community. Read more in Grafana Dashboards.
Privacy Ledger Monitoring Example
The privacy ledger container exposes Prometheus-formatted metrics data. This data can be obtained from the /debug/metrics/prometheus
endpoint of the container.
Grafana Dashboard
A Grafana dashboard for visualizing the metrics from the privacy ledger container is included in the misc folder. You can import this dashboard into your Grafana instance to visualize the metrics.
Here is a sample of what the dashboard looks like:
Please note that the actual service names for Prometheus and Grafana may vary depending on how you've installed them in your cluster.
Prometheus operator and Service Monitor
The Prometheus Operator is used for managing Prometheus instances in a Kubernetes cluster. It also manages other monitoring components, such as Alertmanager and ServiceMonitor.
Service monitoring can be enabled in the Helm chart. This allows the Prometheus Operator to automatically scrape metrics from the privacy Ledger. To enable service monitoring, set serviceMonitor.enabled
to true in the values.yaml
file when installing the Helm chart.
Updated about 2 months ago