Skip to content

rConfig - System Monitoring

10 mins V7 Pro V6 Core

Monitoring rConfig System Using External Tools

Introduction

rConfig is based on a robust stack of open-source software, including Laravel as its primary framework. Proper monitoring of the underlying tools, software, and platform is critical to ensure optimal performance, stability, and security. This document outlines key elements and metrics to monitor within your rConfig system and provides guidelines on using external tools to track these metrics effectively.

The foundational setup for monitoring should be referenced from the rConfig OS setup and installation documentation. This guide will focus on the essential metrics, tools, and practices to ensure a well-monitored rConfig environment.


Key Monitoring Areas and Metrics

Caveats

  • All thresholds and metrics provided in this document are recommendations. These should be customized based on your preferences or defined SLAs.
  • PHP-FPM monitoring is optional, depending on your system requirements.

1. Disk Usage

  • Metric: Monitor disk space utilization and I/O performance.
  • Why: Prevent issues due to insufficient disk space, especially for logs and backups.
  • Tools: Nagios, Zabbix, or custom scripts using df and iotop.
  • Alert: Set thresholds for usage at 80% and critical at 90%.

2. Apache HTTP Server

  • Metric: Track request counts, response times, and errors.
  • Why: Ensure web server stability and responsiveness.
  • Tools: Apache’s mod_status, ELK Stack, or Prometheus exporters.
  • Alert: High response time or repeated 500 errors.

3. PHP-FPM

  • Metric: Monitor active processes, request duration, and memory usage.
  • Why: Prevent PHP bottlenecks that can slow down the application.
  • Tools: PHP-FPM status page, New Relic, or Prometheus.
  • Alert: High memory usage or slow processing.

4. Memory and CPU Usage

  • Metric: Total and per-process memory/CPU usage.
  • Note: It is recommended to increase PHP memory usage from the default of 128MB (or 256MB on some systems) to half the amount of server RAM.
  • Why: Identify resource constraints that can affect rConfig performance.
  • Tools: Top, htop, or Zabbix.
  • Alert: Persistent high usage over 85%.

5. MariaDB

  • Metric: Query performance, connection counts, and database size.
  • Why: Database issues can cause rConfig slowdowns or failures.
  • Tools: Percona Monitoring Tools, MySQLTuner, or Grafana.
  • Alert: Slow query logs, high connections, or low available space.

6. Supervisord

  • Metric: Process health and status.
  • Note: Supervisord should always be running Laravel Horizon for queue management.
  • Why: Ensures background jobs are running smoothly.
  • Tools: Supervisor’s built-in monitoring or integration with external tools.
  • Alert: Any stopped or failed process.

7. Backup Monitoring

  • Metric: Backup success, completion time, and integrity.
  • Caveat: It is highly recommended to use an enterprise-grade backup solution. This solution should be incorporated into your monitoring strategy.
  • Why: Ensure critical configuration data is protected.
  • Tools: Custom scripts, backup logs, or third-party solutions like Bacula.
  • Alert: Backup failure or excessive runtime.

8. .env File Security

  • Metric: Monitor for changes to the .env file.
  • Note: All logs are stored in /var/www/html/rconfig7/current/storage/logs. Ensure that the .env file and logs are monitored for integrity.
  • Why: Ensure critical configuration secrets are secure and unchanged.
  • Tools: File integrity monitoring tools like Tripwire or custom scripts.
  • Alert: Any unauthorized changes.

9. Additional Metrics

  • Horizon (Laravel Horizon Queue Monitoring): Track queue depths and processing times.
  • Uptime Monitoring: Ensure the rConfig instance and all related services are accessible.
  • SSL Certificates: Monitor expiry dates and validity.

ToolPurpose
NagiosGeneral infrastructure monitoring
ZabbixComprehensive system and application monitoring
GrafanaVisualizing and alerting on metrics
PrometheusCollecting and monitoring time-series data
ELK StackLog analysis and centralized logging
New RelicApplication performance monitoring
TripwireFile integrity monitoring

Best Practices

  1. Centralize Monitoring: Use a unified monitoring platform to track all metrics.
  2. Set Alerts: Configure thresholds and alerts for critical metrics to avoid surprises.
  3. Backup Monitoring: Verify backups are running as expected and test restore processes regularly.
  4. Secure Configuration: Ensure .env and other sensitive files are stored in a key vault or password manager.
  5. Regular Audits: Periodically review logs and monitoring setups to ensure everything is functioning correctly.

Conclusion

Monitoring your rConfig system is a vital part of maintaining a healthy, secure, and reliable environment. By focusing on the outlined metrics and utilizing the recommended tools, you can ensure your rConfig system performs optimally while minimizing downtime and risks. Regularly review and enhance your monitoring strategies to stay ahead of potential issues.