This Python script monitors your server logs to track player activity — including joins, leaves, and deaths.
It also cleans up player names by removing symbols and color codes for better readability.
Additionally, it keeps track of your server IP and icon URL to send data to a connected website.
Python 3requests
sudo apt update && sudo apt install -y python3 python3-pippip3 install requests-
Download the script
-
Place the script in your server’s log folder
This should be the folder that containslatest.log. -
Edit the script
- Change all of these.
Example:
LOG_PATH = "/FULL/PATH/TO/LOGS/latest.log" SERVER_ID = "YOUR_SERVER_NAME_KEEP_IT_SHORT" SERVER_IP = "YOUR_SERVER_IP_ADDRESS" ICON_URL = "URL_FOR_ICON" GAMEMODE = "survival"
- Change all of these.
Example:
-
Run the script
python3 csm.pyNote: You must launch the game first, then run
csm.py, and only after that, open your server.