Historical Status
Displaying historical node data on the dashboard
Historical Node Data
The historical node data feature allows you to track and analyze the state of your cluster nodes over time. This is useful for identifying patterns, troubleshooting issues, and capacity planning.
Data Collection
Collect historical node data with this script (run hourly via cron):
#!/bin/bash
SAVE_DIR="/path/to/data/directory"
mkdir -p "$SAVE_DIR"
FILENAME=$(date +"%Y-%m-%dT%H-%M-%S.000Z.json.gz")
curl -s "http://localhost:3020/api/slurm/nodes" | gzip > "$SAVE_DIR/$FILENAME"
find "$SAVE_DIR" -name "*.json.gz" -type f -mtime +30 -delete
This script:
- Creates a timestamp-based filename in ISO format
- Fetches current node data from the API endpoint
- Compresses the data and stores it in the specified directory
- Automatically removes files older than 30 days to manage disk space
Configuration Options
You can configure the historical data retention period and collection frequency by updating the script above, and changing the crontab entry to run more often.