Overview
This article outlines the procedures for diagnosing and resolving issues that prevent Warden statistics from generating correctly. Statistical data relies on a scheduled cron task and accurate server time synchronization. Follow the steps below to verify configurations, restore missing entries, or reset statistical records.
Prerequisites
- Root or administrative access to the server via SSH.
- Familiarity with command-line text editors (e.g., vi, nano).
Verify and Restore the Warden Crontab Entry
The Warden module requires a specific cron entry to update statistics on a scheduled basis. If this entry is missing, statistical data will not populate.
- Check for the existing crontab entry: Execute the following command to verify if the task is configured:
# crontab -u psaadm -l | grep warden - Verify expected output: A correctly configured system will return the following line:
0,9,19,29,39,49,59 * * * * /usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/warden/scripts/cron.php' - Add the missing entry: If the command returns no output, edit the crontab for the psaadm user:
Insert the appropriate line based on your operating system. Preserve the exact spacing and paths provided below:# crontab -u psaadm -e// edit the psaadm cron entry and enter the line depending on your OS // AlmaLinux/CloudLinux/RHEL 0,9,19,29,39,49,59 * * * * /usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/warden/scripts/cron.php' // Debian/Ubuntu 0,9,19,29,39,49,59 * * * * /opt/psa/admin/bin/php -dauto_prepend_file=sdk.php '/opt/psa/admin/plib/modules/warden/scripts/cron.php'
Correct Server Date, Time, and Timezone
Accurate system time is critical for statistics generation. Incorrect timezone or clock settings will cause data discrepancies or prevent updates entirely.
- Resolve time configuration issues: Follow the official documentation to correct your server's date, time, and timezone settings: Fix Incorrect Date and Time Display.
- Reset and regenerate statistics: After verifying the system clock, execute the following command to clear outdated statistical data and reset the update timestamp:
plesk db -s -N -e "use danami_warden; TRUNCATE TABLE statistics; UPDATE config SET config_value='s:19:\"2019-01-01 00:00:00\";' WHERE config_key='last_updated';"
Troubleshooting & Common Issues
- Delayed updates: Statistics regeneration occurs automatically during the next scheduled cron execution (approximately every 15 minutes). Allow up to 20 minutes for data to reflect after applying fixes.