- Zig 89.7%
- Shell 10.3%
| .github/ISSUE_TEMPLATE | ||
| assets | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| install.sh | ||
| LICENSE | ||
| README.md | ||
⚡ZDSM ⚡ - Zig Implementation of BDSM Protocol
ZDSM is a ⚡blazingly fast ⚡ and efficient implementation of the BDSM (Basic Data Server Monitoring) protocol. It is designed to monitor your server's health with minimal impact, focusing on speed and modularity.
Key Features
- ⚡Blazingly Fast ⚡: ZDSM ensures swift and responsive server monitoring.
- Efficient Implementation: Minimal impact on server resources for optimal performance.
- Modular Design: Easily customizable with a pluging system. (not yet available)
- BDSM Protocol: Implements the BDSM protocol for simple server monitoring.
Getting Started
Prerequisites
- Linux Compatibility: Currently, ZDSM does not support Windows due to underlying library limitations. If you need to run ZDSM on Windows, you can use the Windows Subsystem for Linux (WSL), but please note that this may incur a performance cost.
- Glibc Dependency: Ensure that your system uses the GNU implementation of the C library (Glibc). If your system relies on a different libc implementation, you will need to compile ZDSM manually to ensure compatibility.
Installation
Automatic Installation
For a quick and automated installation, you can use the following one-liner in your terminal. This command will download and execute the installation script:
sh <(curl -sSf https://raw.githubusercontent.com/0x454d505459/ZDSM/main/install.sh)
Quick note: make sure you always check the scripts before executing them
Manual Installation
-
Get the Latest Release:
- Download the latest release or compile it yourself.
-
Set Execute Permission:
- Make sure the binary has the execute permission:
chmod +x zdsm
- Make sure the binary has the execute permission:
-
Move Binary to /usr/bin:
- Move the binary to the
/usr/bindirectory:sudo mv zdsm /usr/bin
- Move the binary to the
-
Run ZDSM:
- You can now run ZDSM by executing the following command in your terminal:
zdsm
- You can now run ZDSM by executing the following command in your terminal:
-
Optional: Create Your Service File:
- If needed, you may want to create your own service file based on your system's requirements.
Usage
To retrieve information from your server, you'll need a client that supports the new BDSM protocol. As of now, the official client is undergoing a complete rewrite and is not yet available.However, if necessary, an adapted version of the old client has been modified to use the new protocol. You can find this version available in this fork.
In the meantime, you can still query the server using tools like curl or xh in your terminal. Here's an example using curl:
curl -H "Authorization: Bearer <your-password>" http://localhost:3040/api
Replace <your-password> with your actual server password.
Configuration
You can customize your ZDSM server by editing the following environment variables.
-
PORT (Default: 3040):
- Set the port on which the ZDSM server will run.
-
SERVER_NAME (Default: "Unnamed server"):
- Provide a name for your server.
-
PASSWORD (Default: "admin"):
- Set the password for server authentication.
Additionally, ZDSM follows a specific configuration lookup order:
-
Look for
.envFile:- ZDSM first looks for a file named
.envnext to the executable. If found, it will use the configuration from this file.
- ZDSM first looks for a file named
-
Fallback to Environment Variables:
- If no
.envfile is found, ZDSM will check for the specified environment variables. You can set these directly in your environment.
- If no
-
Default Configuration:
- If neither an
.envfile nor environment variables are provided, ZDSM will fallback to the hardcoded configuration.
- If neither an
Compiling
If you prefer to compile ZDSM from source for various reasons, follow these steps:
-
Clone the Project:
- Clone the ZDSM project from the GitHub repository:
git clone https://github.com/0x454d505459/ZDSM.git
- Clone the ZDSM project from the GitHub repository:
-
Build the Project:
- Navigate to the project directory and run the build step using Zig:
cd ZDSM zig build
- Navigate to the project directory and run the build step using Zig:
-
Locate the Binary:
- After the build process completes, you can find the ZDSM binary in the following path:
zig-out/bin/ZDSM
- After the build process completes, you can find the ZDSM binary in the following path:
Contributing
Feel free to contribute to the development of ZDSM by opening issues or pull requests on the GitHub repository.
License
This project is licensed under the AGPLv3 license