Installation Guide #
Complete step-by-step installation instructions for the Server Monitor plugin.
Prerequisites #
Before installing ServerMonitor, ensure you have:
- OctoberCMS 3.0+ running
- Database access (MySQL/PostgreSQL)
- Command line access to your server
- Cron job configuration ability
- Queue driver configured (database or Redis recommended)
Required Dependencies #
1. SaasBase Plugin (Required) #
This plugin requires the Albrightlabs.SaasBase plugin to be installed first. SaasBase provides:
- Multi-tenant organization support
- User authentication and management
- Subscription billing integration
- Branding and customization framework
cd plugins
git clone [saasbase-repository-url] albrightlabs/saasbase
Make sure SaasBase is properly configured before proceeding. See the SaasBase documentation for:
- Stripe integration setup
- Branding configuration
- Running SaasBase migrations
Installation Steps #
1. Install ServerMonitor Plugin #
cd plugins
git clone [repository-url] albrightlabs/servermonitor
2. Run Database Migrations #
php artisan october:migrate
This creates the following tables:
servers- Server endpoint informationserver_logs- Status change historyserver_check_logs- Performance monitoringdispatch_logs- Queue performance trackingalert_logs- Communication historyservermonitor_notification_settings- Alert preferences
3. Configure Environment Variables #
Add these to your .env file:
# Queue Configuration
QUEUE_CONNECTION=database
# Server Monitor Settings
SERVER_MONITOR_API_KEY=your-secure-api-key-here
SERVER_MONITOR_ADMIN_EMAIL=admin@example.com
SERVERMONITOR_NOTIFICATION_DEBUG=false
SERVER_MONITOR_SMS_COST=0.0075
# Twilio Configuration (for SMS notifications)
TWILIO_SID=your-twilio-sid
TWILIO_TOKEN=your-twilio-token
TWILIO_NUMBER=+1234567890
# Branding (inherited from SaasBase)
SAAS_PRODUCT_ID=pulsey
SAAS_BRAND_NAME="Pulsey"
SAAS_BRAND_DESCRIPTION="Server monitoring made simple"
4. Create Configuration File (Optional) #
Create plugins/albrightlabs/servermonitor/config/config.php to override defaults:
<?php
return [
'admin_email' => env('SERVER_MONITOR_ADMIN_EMAIL', 'admin@example.com'),
'api_key' => env('SERVER_MONITOR_API_KEY'),
'notification_debug' => env('SERVERMONITOR_NOTIFICATION_DEBUG', false),
'sms_cost' => env('SERVER_MONITOR_SMS_COST', '0.0075'),
'plans' => [
'free' => [
'server_limit' => 50,
'user_limit' => 1,
'logs_enabled' => true,
'log_retention_days' => 7,
],
'basic' => [
'server_limit' => 200,
'user_limit' => 0, // unlimited
'logs_enabled' => true,
'log_retention_days' => 30,
],
// ... see configuration-guide.md for complete options
],
];
Post-Installation Setup #
1. Generate Secure API Key #
Create a strong API key for cron job authentication:
# Generate a secure random key
openssl rand -base64 32
Add this to your .env file as SERVER_MONITOR_API_KEY.
2. Configure Cache (Important) #
In config/cache.php, add:
'disableRequestCache' => true,
This prevents cache conflicts with queue workers.
3. Test Installation #
Check that the plugin is properly installed:
# Check if tables were created
php artisan tinker
>>> \Schema::hasTable('servers')
=> true
# Test the console command
php artisan servermonitor:checkserverstatus --help
Verification Checklist #
- [ ] SaasBase plugin installed and configured
- [ ] ServerMonitor plugin files present in
/plugins/albrightlabs/servermonitor/ - [ ] Database migrations completed successfully
- [ ] Environment variables configured
- [ ] API key generated and set
- [ ] Cache configuration updated
- [ ] Console commands respond properly
Next Steps #
After successful installation:
- Configure Settings - Set up plan limits and notification costs
- Set Up Queues - Configure Supervisor for background processing
- Add Cron Jobs - Schedule automated server checks
Troubleshooting Installation #
Common Issues #
Migration Failures
# Check database connection
php artisan tinker
>>> \DB::connection()->getPdo()
# Run migrations with verbose output
php artisan october:migrate --verbose
Plugin Not Found
# Verify directory structure
ls -la plugins/albrightlabs/
# Should show both 'saasbase' and 'servermonitor'
# Check October plugin cache
php artisan cache:clear
php artisan october:env
Permission Errors
# Fix file permissions
sudo chown -R www-data:www-data plugins/albrightlabs/servermonitor
sudo chmod -R 755 plugins/albrightlabs/servermonitor
Getting Help #
If you encounter issues:
- Check the Troubleshooting Guide
- Enable debug mode:
APP_DEBUG=truein.env - Check Laravel logs in
storage/logs/ - Contact support: support@albrightlabs.com
Previous: README | Next: Configuration Guide