Server Monitoring - Settings
Configure monitoring intervals, alerts, and snapshot behavior
Overview
The Server Monitoring Settings page controls how ColdFusion collects, stores, and reports performance data. Proper configuration of these settings is essential for effective monitoring without negatively impacting server performance. These settings determine what metrics are collected, how frequently data is gathered, and how alerts are triggered.
Enable Monitoring
Primary controls for activating the server monitoring system.
Enable Server Monitoring
Production: Enable with appropriate thresholds
High-Traffic: Consider performance impact
- Troubleshooting performance issues
- Capacity planning and load testing
- Establishing performance baselines
- Monitoring production health (with appropriate settings)
- Debugging memory leaks or resource exhaustion
Enable Memory Tracking
- Diagnosing OutOfMemoryError issues
- Identifying memory leaks in application code
- Right-sizing JVM heap allocation
- Analyzing garbage collection patterns
Enable Profiling
Monitoring Intervals
Configure how frequently monitoring data is collected and updated.
Monitoring Data Refresh Interval
Production: 10-30 seconds to reduce overhead
Troubleshooting: 1-3 seconds for detailed analysis
- Lower intervals (1-3s): Higher overhead, more detailed data, faster issue detection
- Higher intervals (15-30s): Lower overhead, less granular data, acceptable for normal monitoring
- Balance based on monitoring needs and server load
Request History Size
Slow Request Tracking
Configure thresholds for identifying and tracking slow-running requests.
Slow Request Threshold
API Endpoints: 5-10 seconds
Reports: 15-30 seconds
Batch Jobs: Custom based on requirements
Very Slow Request Threshold
Log Slow Requests
{cf-home}/logs/monitoring.log- Review logs to identify recurring slow requests
- Correlate slow requests with server load patterns
- Use log data for performance trending over time
- Export to analysis tools for visualization
Slow Query Tracking
Configure thresholds for identifying slow database queries.
Slow Query Threshold
Reporting: 2-5 seconds
Analytics: 5-10 seconds
- Review slow queries regularly for optimization opportunities
- Add appropriate indexes on frequently queried columns
- Optimize JOIN operations and WHERE clauses
- Consider query caching for repeated queries
- Use database query execution plans to identify bottlenecks
Log Slow Queries
Snapshot Management
Configure automatic snapshot capture for preserving monitoring data at specific intervals.
Enable Automatic Snapshots
- Compare performance across different time periods
- Document performance before/after deployments
- Establish performance baselines
- Capacity planning and trend analysis
- Historical troubleshooting of past incidents
Snapshot Retention Period
Production: 7-30 days
Compliance: Based on retention requirements
Maximum Snapshots
Alert Configuration
Memory Usage Alert
- Trigger Threshold
- 85% heap utilization
- Recommendation
- 80-85% for production systems
Alert when memory usage reaches critical levels. Provides time to investigate before OutOfMemoryError occurs.
Request Queue Alert
- Trigger Threshold
- Queue depth exceeds 10
- Recommendation
- 5-10 based on normal traffic patterns
Alert when requests are queuing, indicating server unable to keep up with demand.
Thread Pool Alert
- Trigger Threshold
- 90% threads busy
- Recommendation
- 85-90% thread utilization
Alert when thread pool approaching exhaustion. May require thread pool tuning or request optimization.
Very Slow Request Alert
- Trigger Threshold
- Based on very slow threshold setting
- Recommendation
- Enable for critical performance monitoring
Alert on exceptionally slow requests that may indicate infinite loops or serious performance issues.
Monitoring Best Practices
Development Environment
- Monitoring: Enabled for debugging
- Refresh Interval: 3-5 seconds for responsive feedback
- Profiling: Enabled during performance analysis
- Slow Request Threshold: 3 seconds
- Slow Query Threshold: 500ms
- Snapshots: Manual only, 1-3 day retention
- Alerts: Disabled or local logging only
Production Environment
- Monitoring: Enabled with performance-optimized settings
- Refresh Interval: 10-30 seconds to minimize overhead
- Profiling: Disabled (enable only during active troubleshooting)
- Slow Request Threshold: 5 seconds for web pages
- Slow Query Threshold: 1 second
- Snapshots: Automatic hourly/daily, 7-30 day retention
- Alerts: Email/SMS for critical thresholds
- Log Slow Requests/Queries: Enabled
High-Traffic Environment
- Monitoring: Enabled with minimal overhead
- Refresh Interval: 30-60 seconds
- Profiling: Disabled except during off-peak troubleshooting
- Request History: Small (5-10) to reduce memory
- Snapshots: Less frequent (every 4-6 hours)
- Consider: External APM tools with lower overhead
Programmatic Configuration
Configure monitoring settings via Admin API for automation and consistency across environments.
<cfscript>
// Create admin API object
adminAPI = createObject("component", "cfide.adminapi.administrator");
adminAPI.login("admin", "password");
monitoringAPI = createObject("component", "cfide.adminapi.servermonitoring");
// Enable monitoring
monitoringAPI.setMonitoringEnabled(true);
// Configure monitoring intervals
monitoringAPI.setRefreshInterval(10); // 10 seconds
monitoringAPI.setRequestHistorySize(20);
// Configure slow request thresholds
monitoringAPI.setSlowRequestThreshold(5); // 5 seconds
monitoringAPI.setVerySlowRequestThreshold(15); // 15 seconds
monitoringAPI.setLogSlowRequests(true);
// Configure slow query thresholds
monitoringAPI.setSlowQueryThreshold(1); // 1 second
monitoringAPI.setLogSlowQueries(true);
// Configure snapshots
monitoringAPI.setAutoSnapshotEnabled(true);
monitoringAPI.setSnapshotRetentionDays(14);
monitoringAPI.setMaxSnapshots(30);
// Configure alerts
monitoringAPI.setMemoryAlertThreshold(85);
monitoringAPI.setRequestQueueAlertThreshold(10);
monitoringAPI.setThreadPoolAlertThreshold(90);
writeOutput("Monitoring settings configured successfully");
</cfscript><!--- Create admin API object --->
<cfset adminAPI = createObject("component", "cfide.adminapi.administrator")>
<cfset adminAPI.login("admin", "password")>
<cfset monitoringAPI = createObject("component", "cfide.adminapi.servermonitoring")>
<!--- Enable monitoring --->
<cfset monitoringAPI.setMonitoringEnabled(true)>
<!--- Configure monitoring intervals --->
<cfset monitoringAPI.setRefreshInterval(10)>
<cfset monitoringAPI.setRequestHistorySize(20)>
<!--- Configure slow request thresholds --->
<cfset monitoringAPI.setSlowRequestThreshold(5)>
<cfset monitoringAPI.setVerySlowRequestThreshold(15)>
<cfset monitoringAPI.setLogSlowRequests(true)>
<!--- Configure slow query thresholds --->
<cfset monitoringAPI.setSlowQueryThreshold(1)>
<cfset monitoringAPI.setLogSlowQueries(true)>
<!--- Configure snapshots --->
<cfset monitoringAPI.setAutoSnapshotEnabled(true)>
<cfset monitoringAPI.setSnapshotRetentionDays(14)>
<cfset monitoringAPI.setMaxSnapshots(30)>
<!--- Configure alerts --->
<cfset monitoringAPI.setMemoryAlertThreshold(85)>
<cfset monitoringAPI.setRequestQueueAlertThreshold(10)>
<cfset monitoringAPI.setThreadPoolAlertThreshold(90)>
<cfoutput>Monitoring settings configured successfully</cfoutput>- Consistent settings across multiple servers
- Version-controlled configuration
- Automated deployment and configuration management
- Environment-specific settings (dev, staging, production)
- Integration with infrastructure-as-code tools