Skip to content

๐ŸŽฎ PSN Monitoring Service โ€“ Monitors PlayStation Network outages, sends email alerts, and runs as a systemd service on Linux. ๐Ÿš€๐Ÿ“ก

Notifications You must be signed in to change notification settings

sachdev27/PSN-Monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ PSN Monitoring Service ๐Ÿš€

๐Ÿ“Œ Overview

This is a PlayStation Network (PSN) Monitoring Service that:

  • Fetches live PSN outage data from the PlayStation API
  • Detects service disruptions and affected devices
  • Sends email alerts using SMTP when an outage is detected
  • Runs as a background systemd service on Linux
  • Stores logs for debugging and analysis

๐Ÿ› ๏ธ Installation & Setup

1๏ธโƒฃ Clone the Repository

git clone https://github.com/sachdev27/psn-monitor.git
cd psn-monitor

2๏ธโƒฃ Setup Virtual Environment & Install Dependencies

chmod +x setup_and_run.sh
./setup_and_run.sh

This script will:

  • Create a Python Virtual Environment (venv/)
  • Install dependencies from requirements.txt
  • Setup and start the PSN monitoring service

โš™๏ธ Configuration

Edit the config.json file to update email credentials and API settings:

{
  "psn_api_url": "https://status.playstation.com/data/statuses/region/SCEE.json",
  "smtp_server": "smtp.gmail.com",
  "smtp_port": 587,
  "email_sender": "your_email@gmail.com",
  "email_password": "your_app_password",
  "email_receiver": "receiver_email@example.com",
  "retry_delay": 10,
  "max_retries": 5,
  "check_interval": 3600
}

๐Ÿ”น email_password โ†’ Use a Google App Password ๐Ÿ”น check_interval โ†’ Set time interval (in seconds) for checking PSN status


๐Ÿš€ Running the Service as a Background Process

This project runs as a systemd service on Linux.

1๏ธโƒฃ Check Service Status

sudo systemctl status psn_monitor

2๏ธโƒฃ Restart the Service

sudo systemctl restart psn_monitor

3๏ธโƒฃ Stop the Service

sudo systemctl stop psn_monitor

4๏ธโƒฃ Enable Service on Startup

sudo systemctl enable psn_monitor

๐Ÿ“ง Email Alerts

  • Sends beautiful HTML email notifications when a PSN outage occurs.
  • Uses a dark-themed PlayStation OG design.
  • Includes affected regions, devices, and downtime details.

โœ… Example Email Alert: Email Screenshot image


๐Ÿ“œ Logging & Debugging

All logs are stored in psn_monitor.log.

View Logs in Real-Time:

tail -f psn_monitor.log

Example Log Output

2025-02-08 12:00:00 INFO โœ… Logging enabled: Writing to both file & console.
2025-02-08 12:01:10 WARNING ๐Ÿšจ PSN Outage Detected! Sending email alert...
2025-02-08 12:02:00 INFO โœ… Email sent successfully.

๐Ÿ“ข Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-branch)
  3. Commit changes (git commit -m "Added new feature")
  4. Push to GitHub (git push origin feature-branch)
  5. Open a Pull Request

๐Ÿ“„ License

This project is open-source and licensed under the MIT License.


โค๏ธ Support

If you find this project useful, star โญ the repo and spread the word! Have questions? Open an issue or reach out.


About

๐ŸŽฎ PSN Monitoring Service โ€“ Monitors PlayStation Network outages, sends email alerts, and runs as a systemd service on Linux. ๐Ÿš€๐Ÿ“ก

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published