Skip to main content

Administrator Guide - CS Monitor

Welcome, SysAdmin! This guide will help you deploy the CS Monitor Backend on your server and set up the Mobile App on your device.


🏗️ Phase 1: Deploy the Backend

You need to install the backend API on a server (VPS) that is accessible via the Internet (or VPN). This API acts as the bridge between your mobile phone and your managed servers.

1. Prerequisites

Ensure your server has Docker and Docker Compose installed. * Verification: Run docker --version and docker-compose --version.

2. Installation Steps

  1. Upload: Upload the backend folder provided in this zip file to your server (e.g., using SCP or FileZilla).

    scp -r backend user@your-server-ip:/home/user/cs-monitor
    
  2. Navigate: Go to the folder via SSH.

    cd /home/user/cs-monitor
    
  3. Start: Run the following command to build and start the container.

    sudo docker-compose up -d --build
    

    The -d flag runs it in the background.

  4. Create Admin User: You need a superuser to log in to the Django Admin panel (optional) and to protect the API.

    sudo docker-compose exec web python manage.py createsuperuser
    

    (Follow the prompts to set a username and password).

✅ Success! Your backend is now running at: http://your-server-ip:8000


📱 Phase 2: Mobile App Setup

1. Install the App

  • Android: Transfer the .apk file to your phone and install it. (You may need to allow "Install from Unknown Sources").
  • iOS: Note: The IPA file must be compiled manually using Xcode due to Apple restrictions, or installed via TestFlight if provided by the vendor.

2. First Login

  1. Open CS Monitor.
  2. Server URL: Enter the address of your deployed backend (e.g., http://192.168.1.50:8000 or https://monitor.yourdomain.com).
  3. Credentials: Use the username/password you created in Phase 1 (Step 4).

🔐 Security Tip: Once logged in, the app will ask to enable Biometric Auth (FaceID/Fingerprint). We strongly recommend enabling this for quick and secure access.


⚙️ Phase 3: Adding Your First Server

Now that the app is connected to the backend, let's add the servers you want to manage.

  1. Tap the Menu (⋮) in the top right corner.
  2. Select Server Admin.
  3. Tap the Floating (+) Button at the bottom right.

Configuration Fields

  • Name: A friendly name (e.g., "Production Web").
  • Local Server: Leave OFF (unless you are monitoring the machine where the backend runs).
  • Host/IP: The IP address of the target server.
  • Port: Usually 22.
  • SSH User: e.g., root or ubuntu.
  • Authentication:
    • Password: Enter the SSH password.
    • Private Key: Paste your PEM/OpenSSH private key content here.
  • Maintenance Mode (Optional):
    • Enable this if you want to toggle a "Maintenance Page" on your website.
    • Command: Enter the path to your script (e.g., /root/scripts/toggle_maintenance.sh). The app will append true or false when you toggle the switch.
  1. Tap Save.

📊 Using the Dashboard

Go back to the Home Screen. Select your new server from the list.

1. Resources

You will see real-time charts for CPU, RAM, and Disk. (These update every time you pull-to-refresh).

2. Services Management

To monitor specific services (like Nginx or Docker): 1. Tap the (+) button in the Service Tab. 2. Label: "Web Server". 3. Real Name: nginx (Must match the systemd service name). 4. Protected: Check this if you want to prevent accidental "Stop" commands (only Restart allowed).

3. Logs Viewer

To read remote logs: 1. Go to Menu > Logs Viewer. 2. Select the log file from the dropdown. 3. (Note: You must configure logs first in the Server Resources screen). * Type File: For standard files (e.g., /var/log/syslog). * Type Journal: For systemd logs (e.g., Service: ssh).


❓ Troubleshooting

Q: The app says "Connection Error" on login. A: Ensure your phone is on the same network as the server (if using local IP) or that port 8000 is open in your server's firewall (AWS Security Groups / UFW).

Q: SSH Connection failed. A: Check if your server allows Password Authentication or if the Private Key is correct. Verify the username.

Q: Data is not loading. A: Pull down on the screen to refresh. The app fetches data on demand to save battery and data.


Thank you for using CS Monitor!

Need more help? Contact support

💬
Asistente CoreSaaS BETA
⚠️ Límite: 10 consultas por sesión
×