Compliance Calculation Engine
The Compliance Calculation Engine is the core component of STATUS that processes computation evidence to generate compliance metrics and guarantee points with time-based analysis. This section will guide you through understanding how the engine works and how to interpret calculation results.
The Calculation Engine runs automatically based on your control definitions and scheduling. Make sure your datasources are properly configured to ensure accurate calculations.
Overview
The Compliance Calculation Engine is responsible for:
- Processing computation evidence from datasources
- Calculating compliance status based on defined control rules
- Generating guarantee points for compliance verification
- Managing time windows for historical analysis
- Providing metrics for visualization and reporting
Figure 1: Calculation Engine data flow.
Compliance Metrics Calculation
The engine processes computation evidence to determine compliance status for each control.
Evidence Processing
When a computation is executed, the engine:
- Collects Evidence: Retrieves evidence from configured datasources
- Validates Data: Verifies data integrity and completeness
- Applies Rules: Processes evidence through control-defined rules
- Calculates Result: Determines pass/fail status for the control
- Stores Result: Persists the computation with all relevant metadata
Computation results are only generated when all required evidence is available. If any required evidence is missing, the computation will fail.
Metric Aggregation
The engine can aggregate multiple computation results into comprehensive metrics:
- Control-Level Metrics: Individual control compliance status
- Scope-Level Metrics: Compliance by scope definition
- Catalog-Level Metrics: Overall compliance for entire catalogs
- Time-Period Metrics: Compliance trends over time
Score Calculation
Compliance scores are calculated based on:
- Pass Rate: Percentage of computations that passed
- Weighted Scores: Custom weights for different evidence types
- Threshold Comparison: Comparison against defined compliance thresholds
- Severity Adjustments: Adjustments based on control severity
Guarantee Point Management
Guarantee points are data points that verify compliance status at specific points in time.
Point Generation
Guarantee points are generated automatically when:
- A computation completes successfully
- Time-based computations reach their scheduled execution
- Manual computations are triggered
Each guarantee point contains:
- Timestamp: When the computation was executed
- Control ID: Reference to the control being verified
- Result: Pass/fail status
- Evidence: All evidence used in the calculation
- Scope: The scope context for the computation
- Metadata: Additional information for tracking and analysis
Figure 2: Guarantee point data structure.
Temporal Storage
Guarantee points are stored with precise timestamps to enable:
- Historical Analysis: Track compliance trends over time
- Time Windowing: Analyze compliance in specific time periods
- Auditing: Verify compliance at any point in time
- Reporting: Generate historical compliance reports
Time Windowing
The engine supports various time window configurations for analyzing compliance over different periods.
Time Window Types
Rolling Windows
Calculate compliance over moving time periods that update continuously:
- Daily Rolling: Last 24 hours
- Weekly Rolling: Last 7 days
- Monthly Rolling: Last 30 days
- Custom Rolling: Custom number of days
Figure 3: Rolling time window example.
Fixed Windows
Analyze compliance in specific time ranges that don't change:
- Daily: Calendar days
- Weekly: Calendar weeks
- Monthly: Calendar months
- Custom: Specific date ranges
Figure 4: Fixed time window example.
Aggregation Periods
When analyzing compliance over time, you can aggregate data by:
- Hourly: Useful for real-time monitoring
- Daily: Most common aggregation period
- Weekly: Good for trend analysis
- Monthly: Suitable for long-term reporting
- Custom: Define your own aggregation periods
The aggregation period affects the granularity of your compliance metrics. Choose shorter periods for detailed analysis and longer periods for high-level trends.
Viewing Computation Results
You can view computation results in the Control Details page.
Access Computation Results
To view computation results for a control:
- Navigate to the Catalogs section
- Select a catalog
- Click on a control to view its details
- Scroll down to the Computation Results section
Figure 5: Computation results table.
Understanding Results
The computation results table shows:
- Index: Sequential number for reference (clickable to view details)
- Result: Pass/fail status with visual indicator
- Scope: The scope context for the computation
- From: Start time of the computation period
- Additional Columns: Custom columns based on your configuration
Click on the Index number to view detailed information about a computation, including all evidence used in the calculation.
Filtering and Search
The computation results table supports:
- Global Search: Search across all columns
- Column Visibility: Show/hide specific columns
- Pagination: Navigate through large result sets
- Export: Export results to various formats
Calculation Workflows
The Calculation Engine follows these workflows to generate compliance metrics.
Automatic Calculation
Most calculations run automatically based on your control configuration:
- Schedule Creation: Define computation schedules for each control
- Execution: Engine executes computations at scheduled times
- Processing: Evidence is collected and processed
- Result Storage: Results are stored as guarantee points
- Notification: Alerts are sent if computation fails
Make sure your Node-RED flows are properly configured for automatic computations to work correctly.
Manual Calculation
You can trigger calculations manually:
- Navigate to a control's details page
- Click the Run Computation button
- Select the scope and time period
- Wait for the computation to complete
- View results in the computation results table
Figure 6: Manual computation dialog.
Data Collection Workflow
The data collection process involves:
- Datasource Connection: Connect to configured datasources
- Evidence Retrieval: Pull relevant evidence based on control definitions
- Data Validation: Verify data integrity and completeness
- Transformation: Transform data into required format
- Processing: Process evidence through control rules
Validation Workflow
Before calculations are performed, the engine validates:
- Datasource Availability: Verify datasources are accessible
- Data Completeness: Ensure all required evidence is present
- Data Quality: Check for data anomalies or corruption
- Schema Compliance: Verify data matches expected schema
- Time Validity: Ensure timestamps are within valid ranges
Storage Workflow
After successful calculations:
- Result Generation: Create guarantee point with result
- Metadata Attachment: Add metadata for tracking and analysis
- Persistence: Store in appropriate database (MongoDB for flexible data)
- Indexing: Index for fast querying
- Cache Update: Update Redis cache for quick access
Performance Considerations
The Calculation Engine can consume significant resources when processing large volumes of data. Consider the following for optimal performance.
Optimization Tips
- Time Windows: Use appropriate time window sizes
- Indexing: Ensure databases are properly indexed
- Caching: Leverage Redis caching for frequently accessed data
- Scheduling: Spread computation schedules to avoid peak loads
- Data Pruning: Remove old computation results as needed
Monitoring
Monitor the Calculation Engine performance by:
- Checking computation execution times
- Monitoring datasource response times
- Tracking database query performance
- Reviewing error logs regularly
- Analyzing resource utilization
If you experience performance issues, consider reducing computation frequency or optimizing your datasource queries.
Best Practices
Follow these best practices for effective use of the Calculation Engine:
- Define Clear Schedules: Set appropriate computation schedules for each control
- Configure Time Windows: Use time windows that match your compliance requirements
- Monitor Results: Regularly review computation results for anomalies
- Handle Errors: Set up alerts for failed computations
- Optimize Queries: Optimize datasource queries for faster evidence retrieval
- Clean Up Data: Periodically clean up old computation results
- Document Workflows: Document your control definitions and computation logic
The Calculation Engine is a powerful component that requires proper configuration and monitoring. Invest time in understanding its capabilities and limitations to maximize its effectiveness.