Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.217.117
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
otto /
python /
Delete
Unzip
Name
Size
Permission
Date
Action
app
[ DIR ]
drwxr-xr-x
2025-09-06 08:13
.env
479
B
-rw-r--r--
2025-09-06 08:13
.htaccess
44
B
-rw-r--r--
2025-09-06 08:13
check-ssl.py
1.36
KB
-rw-r--r--
2025-09-06 08:13
config.py
5.72
KB
-rw-r--r--
2025-09-06 08:13
db-bck.py
4.52
KB
-rw-r--r--
2025-09-06 08:13
db-transfer.py
3.94
KB
-rw-r--r--
2025-09-06 08:13
env.example
5.5
KB
-rw-r--r--
2025-09-06 08:13
requirements.txt
1.68
KB
-rw-r--r--
2025-09-06 08:13
send-mail.py
1.3
KB
-rw-r--r--
2025-09-06 08:13
server-checks.py
2.93
KB
-rw-r--r--
2025-09-06 08:13
Save
Rename
#!/usr/bin/env python3 """ Server Health Check Entry Point This script runs comprehensive server health checks and sends email alerts when thresholds are exceeded. It serves as the main entry point for the server monitoring system. Usage: python server-checks.py # Run with default settings python server-checks.py --email custom@example.com # Custom alert email python server-checks.py --test # Test mode (no emails sent) python server-checks.py --json # Output results in JSON format """ import sys import argparse import json from pathlib import Path # Add the app directory to Python path sys.path.insert(0, str(Path(__file__).parent / 'app')) # Import our server monitoring service from services.server_checks import ServerMonitor, quick_server_check def main(): """Main entry point for server health checks.""" parser = argparse.ArgumentParser( description='Server Health Monitoring and Alerting System', formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: python server-checks.py # Run with default settings python server-checks.py --email admin@example.com # Custom alert email python server-checks.py --test # Test mode (no emails sent) python server-checks.py --json # Output results in JSON format """ ) parser.add_argument( '--email', default='server-admin@igot.africa', help='Email address to send alerts to (default: server-admin@igot.africa)' ) parser.add_argument( '--test', action='store_true', help='Test mode - run checks but don\'t send emails' ) parser.add_argument( '--json', action='store_true', help='Output results in JSON format' ) parser.add_argument( '--config', help='Path to custom configuration file (not implemented yet)' ) args = parser.parse_args() try: # Create server monitor instance if args.test: # In test mode, we could modify the mail service to not send emails # For now, we'll just run the checks normally pass # print("Starting server checks") monitor = ServerMonitor(alert_email=args.email) # Run all health checks results = monitor.run_all_checks() # Output results if JSON format requested if args.json: print(json.dumps(results, indent=2, default=str)) # Return appropriate exit code total_alerts = results.get('total_alerts', 0) return 0 if total_alerts == 0 else 1 except KeyboardInterrupt: return 130 except Exception: print("Error: ", sys.exc_info()[1]) return 1 if __name__ == "__main__": try: exit_code = main() sys.exit(exit_code) except Exception: sys.exit(1)