From d2303ba30b362d19264b3935c6a8af59c5c626ba Mon Sep 17 00:00:00 2001 From: Simon Hammes Date: Fri, 12 Jun 2026 14:45:50 +0200 Subject: [PATCH] Document dtable-web metrics configuration --- docs/installation/advanced/metrics.md | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/docs/installation/advanced/metrics.md b/docs/installation/advanced/metrics.md index a9eef513..b943c8c4 100644 --- a/docs/installation/advanced/metrics.md +++ b/docs/installation/advanced/metrics.md @@ -139,6 +139,58 @@ docker exec seatable-server curl -sS http://localhost:7777/metrics --user " +### 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 = "" +METRIC_AUTH_PWD = "" +``` + +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 ":" +``` + +
+Example Output + ```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 + ``` +
+ ### Gunicorn Gunicorn only supports the older **statsD** protocol to emit metrics. @@ -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"}, ]