API Reference
GET
monitor_logs/{dropletId}Get Server Logs
Get Server Logs is a GET request to https://api.sharkcluster.com/monitor_logs/{dropletId} in the Server Management section of the SharkCluster API. Streams the most recent journalctl log entries for core services (MySQL, Nginx, Apache, PHP) to help diagnose errors or performance bottlenecks. It takes 1 parameter, 1 required (dropletId).
Request URL
GET
https://api.sharkcluster.com/monitor_logs/{dropletId}How do you call Get Server Logs?
- 1Get a token from the login endpoint (POST /login) and send it as Authorization: Bearer <token>. See Login.
- 2Send a GET request to https://api.sharkcluster.com/monitor_logs/{dropletId}, replacing {dropletId} in the path with your own value.
Request parameters
| Parameter | Type | Description |
|---|---|---|
dropletIdRequired | string | The Internal Server ID or Provider Instance ID. |
AuthorizationRequired | header | Bearer token for authentication (e.g., Bearer eyJ...). |
What does Get Server Logs return?
A successful call returns a JSON object with the fields mysql_log, nginx_log, apache_log, php_log and redis_log.
Request sample
const axios = require('axios');
const dropletId = "0000-1111-2222";
axios.get(`https://api.sharkcluster.com/monitor_logs/${dropletId}`, {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' }
})
.then(res => console.log("Real-time Stats:", res.data.data))
.catch(err => console.error(err));Response
{
"mysql_log": "May 05 08:40:06 demo systemd[1]: Starting mysql.service - MySQL Community Server...\nMay 05 08:40:07 demo systemd[1]: Started mysql.service - MySQL Community Server.\nMay 05 08:43:01 demo systemd[1]: Stopping mysql.service - MySQL Community Server...\nMay 05 08:43:03 demo systemd[1]: mysql.service: Deactivated successfully.\nMay 05 08:43:03 demo systemd[1]: Stopped mysql.service - MySQL Community Server.\nMay 05 08:43:03 demo systemd[1]: mysql.service: Consumed 2.800s CPU time, 378.2M memory peak, 0B memory swap peak.\nMay 05 08:43:03 demo systemd[1]: Starting mysql.service - MySQL Community Server...\nMay 05 08:43:04 demo systemd[1]: Started mysql.service - MySQL Community Server.\nMay 05 08:51:01 demo systemd[1]: Stopping mysql.service - MySQL Community Server...\nMay 05 08:51:02 demo systemd[1]: mysql.service: Deactivated successfully.\nMay 05 08:51:02 demo systemd[1]: Stopped mysql.service - MySQL Community Server.\nMay 05 08:51:02 demo systemd[1]: mysql.service: Consumed 5.727s CPU time, 405.1M memory peak, 0B memory swap peak.\n-- Boot 11c05c8572ca45cebcc42cb1fa612afd --\nMay 05 08:53:17 demo systemd[1]: Starting mysql.service - MySQL Community Server...\nMay 05 08:53:21 demo systemd[1]: Started mysql.service - MySQL Community Server.",
"nginx_log": "May 05 08:38:05 demo systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:38:05 demo systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:38:41 demo systemd[1]: Stopping nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:38:41 demo systemd[1]: nginx.service: Deactivated successfully.\nMay 05 08:38:41 demo systemd[1]: Stopped nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:38:41 demo systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:38:41 demo systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:43:28 demo systemd[1]: Stopping nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:43:28 demo systemd[1]: nginx.service: Deactivated successfully.\nMay 05 08:43:28 demo systemd[1]: Stopped nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:43:28 demo systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:43:29 demo systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:44:34 demo systemd[1]: Reloading nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:44:34 demo nginx[20254]: 2026/05/05 08:44:34 [notice] 20254#20254: signal process started\nMay 05 08:44:34 demo systemd[1]: Reloaded nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:45:32 demo systemd[1]: Stopping nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:45:32 demo systemd[1]: nginx.service: Deactivated successfully.\nMay 05 08:45:32 demo systemd[1]: Stopped nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:45:32 demo systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:45:32 demo systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.\nMay 05 08:51:01 demo systemd[1]: Stopping nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:51:01 demo systemd[1]: nginx.service: Deactivated successfully.\nMay 05 08:51:01 demo systemd[1]: Stopped nginx.service - A high performance web server and a reverse proxy server.\n-- Boot 11c05c8572ca45cebcc42cb1fa612afd --\nMay 05 08:53:17 demo systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...\nMay 05 08:53:18 demo systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.",
"apache_log": null,
"php_log": "May 05 08:42:30 demo systemd[1]: Starting php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:42:30 demo systemd[1]: Started php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:42:32 demo systemd[1]: Stopping php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:42:32 demo systemd[1]: php8.3-fpm.service: Deactivated successfully.\nMay 05 08:42:32 demo systemd[1]: Stopped php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:42:32 demo systemd[1]: Starting php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:42:32 demo systemd[1]: Started php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:42:58 demo systemd[1]: Stopping php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:42:58 demo systemd[1]: php8.3-fpm.service: Deactivated successfully.\nMay 05 08:42:58 demo systemd[1]: Stopped php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:42:58 demo systemd[1]: Starting php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:42:58 demo systemd[1]: Started php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:43:26 demo systemd[1]: Stopping php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:43:26 demo systemd[1]: php8.3-fpm.service: Deactivated successfully.\nMay 05 08:43:26 demo systemd[1]: Stopped php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:43:26 demo systemd[1]: Starting php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:43:27 demo systemd[1]: Started php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:51:01 demo systemd[1]: Stopping php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:51:01 demo systemd[1]: php8.3-fpm.service: Deactivated successfully.\nMay 05 08:51:01 demo systemd[1]: Stopped php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.\nMay 05 08:51:01 demo systemd[1]: php8.3-fpm.service: Consumed 8.841s CPU time, 18.2M memory peak, 0B memory swap peak.\n-- Boot 11c05c8572ca45cebcc42cb1fa612afd --\nMay 05 08:53:17 demo systemd[1]: Starting php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager...\nMay 05 08:53:18 demo systemd[1]: Started php8.3-fpm.service - The PHP 8.3 FastCGI Process Manager.",
"redis_log": null
}Related Server Management endpoints
Stuck on an integration?
Raise a ticket from the panel with the endpoint and the response you got back — it reaches an engineer with your server already attached.