> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sync.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# System Monitoring

export const siteNameShortLower = "sync";

export const siteNameShort = "Sync";

export const siteName = "CData Sync";

System monitoring helps ensure that your {siteName} environment remains stable and available. This section describes the supported methods for monitoring {siteNameShort} at the server level.

Administrators can use the following approaches to monitor the health of the system.

* Monitoring the healthcheck endpoint
* Reviewing server logs

## Monitoring CData Sync with the Healthcheck Endpoint

{siteNameShort} exposes a healthcheck endpoint (http\://*YourHostName*:8181/pub/ping.rst) that you can use to monitor your server and ensure that it is running.

In this endpoint:

* *YourHostName* is the host name or IP address of your {siteNameShort} server.
* Port 8181 is the default {siteNameShort} web-server port. If you use a custom port, update the URL accordingly.

You can test the endpoint with a command similar to this cURL command:

`curl YourHostName:8181/pub/ping.rst`

<Note><span>While this example uses the cURL command-line tool, you can use other tools (for example, the Wget command-line tool or your monitoring system) to test the endpoint.</span></Note>

### Readiness Check

Unlike a simple ping, this endpoint performs a full readiness check. By default, once every 60 seconds it verifies the following information:

* The application data directory is readable and writable.
* The application database can be queried.
* The user directory can be loaded.

### Response Codes

The outcome of these checks is reflected by the response code that is returned:

* **200 OK:** The server is running and all readiness checks succeeded.
* **Response body:** `OK`
* **500 Internal Server Error:** The server process is running, but one or more readiness checks failed (for example, issues with the file system, database, or user manager).
* **No response / connection error:** The server is stopped or unreachable.

**Examples:**

If all readiness checks succeed, the request returns the message `OK`.

<img src="https://mintcdn.com/cdata-sync/ANiMw09F6wBBj5Tp/images/System-Monitoring_monitoring-sync-with-healthcheck-endpoint_1.png?fit=max&auto=format&n=ANiMw09F6wBBj5Tp&q=85&s=9410487d7a0d238be4dea68a280a1da8" width="350" alt="Successful healthcheck response" data-path="images/System-Monitoring_monitoring-sync-with-healthcheck-endpoint_1.png" />

If the server is stopped or unreachable, your monitoring tool might show a connection error similar to this message:

<img src="https://mintcdn.com/cdata-sync/ANiMw09F6wBBj5Tp/images/System-Monitoring_monitoring-sync-with-healthcheck-endpoint_2.png?fit=max&auto=format&n=ANiMw09F6wBBj5Tp&q=85&s=54e8a4e56fe87c3c2be6f170fd737b71" width="575" alt="Connection error response" data-path="images/System-Monitoring_monitoring-sync-with-healthcheck-endpoint_2.png" />

## Monitoring CData Sync with Logs

{siteNameShort} writes server activity logs to this directory: `ApplicationDirectory/logs/httpserver`.

<Note>The <em>ApplicationDirectory</em> location varies by operating system and deployment. For more details, see [Configuring the Application Directory](../installation-and-configuration/configuring-the-server#configuring-the-application-directory).</Note>

You can open these logs directly for troubleshooting or configure a log forwarder to integrate with external monitoring tools. For example, you might  integrate these logs with a third-party monitoring platform such as Datadog. (You can use other third-party monitoring tools besides Datadog, as well.)

With Datadog, you can use the Datadog Agent to collect and forward {siteNameShort} logs for centralized monitoring. The basic process is as follows:

* Collect logs from the `httpserver` directory.
* Use the Datadog Agent to ship the logs to Datadog.
* Configure dashboards and alerts in Datadog to track errors or downtime.

For a detailed explanation of these steps, see <a href={`https://community.cdata.com/cdata-${siteNameShortLower}-47/seamless-monitoring-between-cdata-sync-and-datadog-798`} target="_blank" rel="noopener noreferrer">Seamless Monitoring Between CData {siteNameShort} and Datadog</a>.
