> For the complete documentation index, see [llms.txt](https://vitrina-blogerov.gitbook.io/bloggers-showcase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitrina-blogerov.gitbook.io/bloggers-showcase/product-docs/product-docs-en/state-monitoring.md).

# State monitoring

## Utilities. State monitoring

After installation, the platform receives commands to check status, view logs, restart services, and update routing.

There are two levels of management:

* manager for a specific language version;
* general edge manager.

```mermaid
flowchart TD
    A["/opt/bloggers_platform/manager.sh"] --> B["General edge: Caddy, routing, errors"]
    C["/opt/bloggers_platform/apps/{lang}/manager.sh"] --> D["Version: backend, bot, db"]
```

### Quick command selection

{% tabs %}
{% tab title="Domain does not open" %}
First, check the general edge:

```bash
sudo /opt/bloggers_platform/manager.sh status
sudo /opt/bloggers_platform/manager.sh logs
```

{% endtab %}

{% tab title="Version does not work" %}
Check the manager for the required language version:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh status
sudo /opt/bloggers_platform/apps/ru/manager.sh logs
```

{% endtab %}

{% tab title="Bot does not respond" %}
Check the service logs `bot` of the required version:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh logs bot
```

{% endtab %}

{% tab title="Admin panel does not work" %}
Check the logs `backend` of the required version:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh logs backend
```

{% endtab %}
{% endtabs %}

### Language version check

For the Russian version:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh status
```

For other languages, only the folder code changes:

```bash
sudo /opt/bloggers_platform/apps/en/manager.sh status
sudo /opt/bloggers_platform/apps/zh/manager.sh status
sudo /opt/bloggers_platform/apps/ar/manager.sh status
```

The command shows the containers of the selected version: `backend`, `bot` and `db`.

### Language version logs

All logs of the selected version:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh logs
```

Logs of a specific service:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh logs backend
sudo /opt/bloggers_platform/apps/ru/manager.sh logs bot
sudo /opt/bloggers_platform/apps/ru/manager.sh logs db
```

{% hint style="info" %}
The logs open in follow mode. To exit, press `Ctrl+C`.
{% endhint %}

### Managing a language version

| Command              | What it does                                          |
| -------------------- | ----------------------------------------------------- |
| `manager.sh restart` | Restarts all services of the version                  |
| `manager.sh stop`    | Stops the version services                            |
| `manager.sh start`   | Starts the version services                           |
| `manager.sh update`  | Rebuilds and starts the version containers            |
| `manager.sh backup`  | Creates a backup of the version's database and assets |

Example:

```bash
sudo /opt/bloggers_platform/apps/ru/manager.sh restart
```

### General edge

The general edge is responsible for the domain, HTTPS, language routing, and error pages.

```bash
sudo /opt/bloggers_platform/manager.sh status
sudo /opt/bloggers_platform/manager.sh logs
sudo /opt/bloggers_platform/manager.sh restart
```

If language versions were added or changed, you can rebuild the Caddy configuration:

```bash
sudo /opt/bloggers_platform/manager.sh refresh
```

<details>

<summary>What refresh does</summary>

The command regenerates the Caddy configuration, the language selection page, and static error pages based on the actually installed language versions.

</details>

### Command safety

Commands `status` and `logs` only read the state.

Commands `restart`, `stop`, `start`, `update` and `refresh` manage containers and configuration, but do not delete the database or erase content.

To completely remove the platform, a separate uninstaller is used.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://vitrina-blogerov.gitbook.io/bloggers-showcase/product-docs/product-docs-en/state-monitoring.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
