RPort
  • RPort Knowledge Base
  • đź‘€WHAT IS RPORT
    • Features and benefits of RPort
      • Full feature list
    • Screenshots
    • Release Notes
      • 1.1.2
      • 1.1.0
      • 1.0.5
      • 1.0.4
      • 1.0.3
      • 1.0.2
      • 1.0.1
  • 🚀GETTING STARTED
  • Install the RPort Server
    • Launch RPort in the cloud
    • Install on-premises
    • Install on Vultr
    • Install on Azure
    • Install on AWS EC2
    • Install on Digital Ocean
    • Install on Scaleway
    • Install on Google Compute
    • Install on Hetzner Cloud
    • Install RPort on any virgin cloud VM
    • Change the FQDN of the RPort server
    • Enable two factor authentication
      • Use push on mobile for 2FA
      • Use TOTP
  • Connecting Clients
  • Using the remote access
    • Creating tunnels
      • VNC via browser
      • VNC via VNC® Viewer from RealVNC®
      • RDP via Browser
    • Open SSH from the browser
    • Scp,sftp through a tunnel
  • Renaming and tagging of clients
  • Organize clients with groups
  • Activate the vault
  • Manage users and permissions
  • Video Courses
    • Installation Preparation
    • Install on Prem
    • Install on Cloud
    • Client installation
    • Remote Access
    • Network communication
  • 🗣️ NEED HELP?
    • Troubleshoot common problems
      • RPort Server not starting
      • Restart rport through a tunnel
      • Attributes file path not set
      • Recover lost passwords
      • Client is not connecting
      • Id is already in use
  • 🔦DIGGING DEEPER
    • Using the API
      • Create client credentials
    • RPort Technology Explained
      • RPort Security Model
    • Commands and Scripts
      • Executing commands
      • Executing scripts
      • Tacoscript
    • The scheduler
    • File copy and reception
    • Client Configuration Options
      • Supervision of OS updates
      • Script and command execution
    • Advanced client management
      • Install the RPort client manually
      • Uninstall the RPort client
    • Server Maintenance
      • Monitoring of RPortd
      • Updating RPort
      • Backing up the rport server
      • Renewing certificates
    • FAQ
      • How to use Cloudflare
    • High Availability
    • Install on macOS
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. DIGGING DEEPER
  2. Server Maintenance

Monitoring of RPortd

Get notified about issues with your rport server

PreviousServer MaintenanceNextUpdating RPort

Last updated 1 year ago

Was this helpful?

The more clients you manage with RPort the more important it is to constantly monitor the faultless operation of the server. You must get notified quickly if errors occur.

If you have a monitoring solution in place, integrate your rport server there. If you run the rport server on a cloud service like AWS or Azure, you can use their monitoring.

A basic monitoring should supervise:

  1. The uptime of the server itself (ICMP Ping)

  2. Check if the port for the clients connections, 80 by default, is up.

  3. Check if the port of the API/UI, 443 is up and certificates have not expired.

  4. There is always enough disk space free on the server.

  5. Your backups are executed constantly and flawlessly.

Use the free Better Uptime service

While there a many monitoring services available at different prices, we will explain how to do it with as an example. For a reliable monitoring of a single RPort server, the free Basic plan is perfect.

Create monitors

On the left-side main menu click on Monitors and on the right side click the button "Create Monitor". When asked what to monitor, do not enter any URL, select "Alert us when the URL above, doesn't respond to a tcp port". The input form will change. Now enter as follows.

  • Host to monitor: <FQDN-OR-IP-OF-RPORT>

  • TCP Port: the port where clients connect

  • Keyword to find in response: leave empty

  • Send data to port: keep the default

Next, create a monitor for the RPort API and the user interface. Enter the URL of your RPort API. If the port is not the default port 443, append the port to the URL separated by a colon. You should get a green checkmark.

Unfold the “Advanced Setting” and enter a pronounceable monitor name like "RPort API/UI". On the SSL verification options enable "SSL expiration Alert 3 days before".

Monitor the disk space

To monitor the disk space of your RPort sever with Better Uptime click on Heartbeats on the left-side main menu. On the right side, click “Create Heartbeat”. Create the heartbeat as follows:

  • What service will this heartbeat track?: “RPort Server Disk Space”

  • Expect a heartbeat every: 30 minutes

  • with a grace period of: 5 minutes

After creating the heartbeat, a URL is created for you. Copy this URL to your clipboard and enter it to the below script on line 6.

On the rport server, store the following script under /usr/local/bin/discheartbeat.sh.

/usr/local/bin/discheartbeat.sh
#!/bin/sh
set -e
# Set the threshold. If disc space used percent if above, your heartbeat fires an alert.
MAX_ALLOWED=90
# Set the URL Better Uptime has created for your heartbeat
URL="https://betteruptime.com/api/v1/heartbeat/???????"
export LANG=en
LANG=en df -h --output=target,fstype,pcent|grep -E -v "(tmpfs|Mounted)"|
{
    while read -r LINE;do
        pused=$(echo $LINE|awk '{print $3}'|tr -d "%")
        fs=$(echo $LINE|awk '{print $1}')
        # Compare the used space percent with the threshold
        if [ "$pused" -gt "$MAX_USED_ALLOWED" ];then
            echo "Used space on $fs = $pused is above MAX_ALLOWED $MAX_ALLOWED"|logger -t discheartbeat
            exit 1
        fi
    done
    curl -sf "${URL}" >/dev/null 2>&1
    echo "all discs checked"|logger -t discheartbeat
}sh

Make the script executable and run it as a half-hourly cronjob.

chmod +x /usr/local/bin/discheartbeat.sh 
echo '*/30 * * * * root /usr/local/bin/discheartbeat.sh'>/etc/cron.d/discheartbeat

Now your disks are checked every 30 minutes. If none of your disks is filled by more than 90 percent, an "all good" confirmation will be sent to Better Uptime. If any disk exceeds the maximum allowed, the heartbeat is skipped, and you will receive an alert.

To make sure your heartbeat is running, you can check the syslog by grep discheartbeat /var/log/syslog.

On the list of active heartbeats, you will get a green light when your disks have enough space.

🔦
Betteruptime.com
Create a monitor for the client connections
Create a monitor for the API/UI
Create a “disk heartbeat”
Monitor the disc space of the RPort server.