Admin Panel Statistics
This guide provides an overview of how the admin panel collects, processes, and utilizes statistics for billing purposes through the Cluster Panel. It explains the flow of data from raw statistics collection to the final billing calculations presented to users.
The admin panel plays a crucial role in the cloud infrastructure management system by:
1. Collecting raw statistics from virtual machines and infrastructure components
2. Processing and aggregating these statistics at various time intervals
3. Applying pricing policies to calculate billing information
4. Providing this information to the user panel for display and reporting
This guide will help administrators understand how this process works and how to configure it effectively.
## Statistics Collection Hierarchy
The system collects and processes statistics in a hierarchical manner:
1. Instant Statistics: Raw data collected at frequent intervals (typically every minute)
2. Hourly Statistics: Aggregated from instant statistics every hour
3. Daily Statistics: Aggregated from hourly statistics every day
4. Team Metrics: Resource usage statistics aggregated by team
This hierarchy allows for efficient storage and retrieval of statistics while maintaining the ability to perform detailed analysis when needed.
Instant Statistics Collection
What is Collected
The admin panel collects the following metrics:
- CPU Usage: Number of CPUs and utilization percentage
- RAM Usage: Memory consumption in GB
- Disk Usage: Storage consumption in GB
- GPU Usage: GPU utilization hours and TFLOPS (Teraflops) consumed
- Network Traffic: Public and private network traffic (in/out) in MB
- IOPS: Input/Output Operations Per Second for boot and additional disks
- Power State: Current state of the instance (On/Off)
Collection Process
1. The admin panel connects to each cluster in the infrastructure
2. It retrieves statistics for all instances
3. These statistics are stored in the database with a timestamp accurate to the minute
Statistics Aggregation
Hourly Aggregation
Hourly statistics are generated by aggregating instant statistics:
1. The system groups instant statistics by instance and hour
2. It calculates average and total values for each metric
3. The results are stored in the database
Key metrics in hourly aggregation:
- RAM Hours (GB-hours of memory consumption)
- Disk Hours (GB-hours of storage consumption)
- CPU Hours (Core-hours of CPU consumption)
- GPU Usage Hours
- Network Traffic (MB)
- IOPS
Daily Aggregation
Daily statistics are generated by aggregating hourly statistics:
1. The system groups hourly statistics by instance and day
2. It calculates daily totals for each metric
3. The results are stored in the database
Scheduling Statistics Collection and Aggregation
The admin panel uses schedulers to automate statistics collection and aggregation:
1. Instant Statistics Collection: Typically runs every minute
2. Hourly Aggregation: Runs at the end of each hour
3. Daily Aggregation: Runs at the end of each day