# Server Health Monitoring (Host Reachability)

## Goal

Monitor the configured host reachability and switch to a fallback when it becomes unreachable.

## Prerequisite

Set the host address in Essential Kit settings (Network Services section).

## Actions used

* `NetworkServicesStartNotifier`
* `NetworkServicesOnHostReachabilityChanged` (persistent listener)
* `NetworkServicesGetStatus` (optional)

## Variables

* `isHostReachable` (Bool)

## Flow

1. On app launch: call `NetworkServicesStartNotifier`.
2. Keep `NetworkServicesOnHostReachabilityChanged` in an active state:
   * `eventReachable` → use primary host
   * `eventUnreachable` → show maintenance / switch to backup
3. Optional: call `NetworkServicesGetStatus` whenever you need the latest booleans (`isHostReachable`, `isInternetActive`).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://assetstore.essentialkit.voxelbusters.com/features/network-services/playmaker/use-cases/use-case-2-server-health.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
