From 2b85ffa5d9997b59223fab4dd527d0b3c0406be4 Mon Sep 17 00:00:00 2001 From: Biswa Kalyan Bhuyan Date: Sat, 3 May 2025 13:21:56 +0530 Subject: feat: site which monitors the system graph using openbsd snmpd --- README.md | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..ba64fa1 --- /dev/null +++ b/README.md @@ -0,0 +1,92 @@ +# Server Monitoring Dashboard + +A lightweight monitoring dashboard for servers with JWT authentication and real-time metrics. + +## Features + +- Real-time system metrics display +- Application performance monitoring +- Service status monitoring +- Secure JWT authentication +- Responsive web interface + +## Requirements + +- Python 3.6+ +- Dependencies: + - PyJWT + - (Optional) python-dotenv for .env file support + +## Installation + +1. Clone this repository +2. Install dependencies: + +```bash +pip install PyJWT +pip install python-dotenv # Optional but recommended +``` + +## Configuration + +You can configure the application using environment variables or by creating a `.env` file in the project root directory. + +### Using .env file (recommended) + +Create a `.env` file in the project root with the following variables: + +``` +# Security +JWT_SECRET=your_secret_jwt_key +AUTH_PASSWORD=your_secure_password + +# Server Configuration +SERVER_PORT=8000 +JWT_EXPIRATION_HOURS=8 + +# SNMP Configuration +SNMP_HOST=127.0.0.1 +SNMP_COMMUNITY=your_snmp_community_string +SNMP_VERSION=2c +SNMP_COLLECTION_INTERVAL=10 +``` + +### Using Environment Variables + +Alternatively, you can set the environment variables directly: + +```bash +export JWT_SECRET=your_secret_jwt_key +export AUTH_PASSWORD=your_secure_password +export SERVER_PORT=8000 +# ... and so on +``` + +### Security Notes + +- **JWT_SECRET**: Should be a random, secure string. You can generate one using: + ```python + python -c "import secrets; print(secrets.token_hex(32))" + ``` +- **AUTH_PASSWORD**: Choose a strong password to protect your metrics dashboard +- If no JWT_SECRET is provided, a random one will be generated at startup (not recommended for production) +- If no AUTH_PASSWORD is provided, a random one will be generated and displayed at startup + +## Running the Server + +```bash +python server.py +``` + +The server will start and display the URL where you can access the dashboard. + +## Accessing the Dashboard + +1. Navigate to the server URL in your browser (default: http://localhost:8000) +2. Click "View Server Metrics" +3. Enter the password configured in AUTH_PASSWORD +4. View your real-time metrics + +## License + +[MIT License](LICENSE) \ No newline at end of file -- cgit v1.2.3-59-g8ed1b