Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions docs/installation/advanced/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,58 @@ docker exec seatable-server curl -sS http://localhost:7777/metrics --user "<user
```
</details>

### dtable-web

You can enable the `/metrics` endpoint and configure the basic auth credentials by adding the following variables inside `/opt/seatable-server/seatable/conf/dtable_web_settings.py`:

```python
ENABLE_METRIC = True
METRIC_AUTH_USER = "<username>"
METRIC_AUTH_PWD = "<password>"
```

Remember to restart SeaTable by running the following command:

```bash
docker restart seatable-server
```

You can test the metrics endpoint by running the following command on the host:

```bash
curl -sS https://$SEATABLE_SERVER_HOSTNAME/metrics --user "<username>:<password>"
```

<details>
<summary>Example Output</summary>
```text
# HELP realtime_automation_triggered_count The number of triggered realtime automations since start up
# TYPE realtime_automation_triggered_count gauge
realtime_automation_triggered_count{component="dtable_events",node="default"} 0
# HELP scheduled_automation_triggered_count The number of triggered scheduled automations since start up
# TYPE scheduled_automation_triggered_count gauge
scheduled_automation_triggered_count{component="dtable_events",node="default"} 0
# HELP automation_queue_size The number of automations in the queue
# TYPE automation_queue_size gauge
automation_queue_size{component="dtable_events",node="default"} 0
# HELP realtime_automation_heartbeat Heartbeat timestamp of realtime automations
# TYPE realtime_automation_heartbeat gauge
realtime_automation_heartbeat{component="dtable_events",node="default"} 1781268161.9465296
# HELP in_flight_request_total The number of currently running http requests.
# TYPE in_flight_request_total gauge
in_flight_request_total{component="go_fileserver",node="default"} 0
# HELP common_dataset_sync_count Common-dataset syncs count
# TYPE common_dataset_sync_count gauge
common_dataset_sync_count{component="dtable_events",node="default"} 0
# HELP common_dataset_sync_total_row_count Total rows processed in common-dataset syncs
# TYPE common_dataset_sync_total_row_count gauge
common_dataset_sync_total_row_count{component="dtable_events",node="default"} 0
# HELP common_dataset_sync_time_cost Time taken (in seconds) to complete common-dataset syncs job
# TYPE common_dataset_sync_time_cost gauge
common_dataset_sync_time_cost{component="dtable_events",node="default"} 0.01068
```
</details>

### Gunicorn

Gunicorn only supports the older **statsD** protocol to emit metrics.
Expand Down Expand Up @@ -438,6 +490,7 @@ prometheus.scrape "seatable_metrics" {
targets = [
{"__address__" = "seatable-server:7780", "instance" = "api-gateway"},
{"__address__" = "seatable-server:7777", "instance" = "dtable-db"},
{"__address__" = "seatable-server:80", "instance" = "dtable-web"},
{"__address__" = "statsd-exporter:9102", "instance" = "gunicorn"},
{"__address__" = "nginx-exporter:9113", "instance" = "nginx"},
]
Expand Down
Loading