Skip to main content

plantpulse-data-gateway (Data Gateway)

Role

An HTTP REST + JDBC gateway through which external systems and the console safely query data. It is a security, authorization, and audit layer that prevents direct access to storage—only through this gateway—and from 2026-09-07 onwards, also the console's SQL execution interface.

ItemValue
Module nameplantpulse-data-gateway
Installation path/opt/kopens/plantpulse-platform/plantpulse-data-gateway/
Port5500 (HTTP) · 5501 (TLS)
pd Servicedata-gateway — MASTER only
API authenticationX-API-Key: <PP_DATA_GATEWAY_API_KEY>
Console loginPP_DATA_GATEWAY_WEB_USER / PP_DATA_GATEWAY_WEB_PASSWORD — if empty, console login only is disabled

Architecture

Connects to four backends via JDBC — so you can use SQL, CQL, TQL, and Spark SQL from a single console screen.

Directory structure

plantpulse-data-gateway/
├── config/ # 생성물
│ ├── plantpulse-jdbc.properties # ← plantpulse-jdbc.properties.template — 백엔드 접속과 계정
│ └── plantpulse-data-gateway.properties # ← plantpulse-data-gateway.properties.template — 제한 · 타임아웃
├── bin/start.sh stop.sh
└── server/ # 내장 Tomcat — webapps/ROOT.war · logs/

Key configuration

plantpulse-jdbc.properties.template core settings — all four backends and credentials are rendered here.

jdbc.postgres.url = jdbc:postgresql://${PP_POSTGRES_HOST}:${PP_POSTGRES_PORT}/${PP_DB_NAME}
jdbc.cassandra.url = jdbc:cassandra://${PP_CASSANDRA_HOST}:${PP_CASSANDRA_PORT}/${PP_SCHEME}
jdbc.tse.url = jdbc:ts://${PP_TSE_HOST}:${PP_TSE_PORT}/${PP_SCHEME}
jdbc.spark.url = jdbc:spark://${PP_SPARK_HOST}:${PP_KYUUBI_PORT}/default/${PP_SCHEME}

data.gateway.api.key = ${PP_DATA_GATEWAY_API_KEY} # X-API-Key
data.gateway.web.user = ${PP_DATA_GATEWAY_WEB_USER} # 콘솔 로그인
data.gateway.web.password = ${PP_DATA_GATEWAY_WEB_PASSWORD}

plantpulse-data-gateway.properties.template — operational limits:

data.gateway.rate.limit=1000 # 초당 요청
data.gateway.slow.query.ms=10000 # 이보다 느리면 슬로우 로그
data.gateway.async.timeout.ms=60000

SQL Console

Open via https://<server-ip>:5501/ and log in with PP_DATA_GATEWAY_WEB_USER / PP_DATA_GATEWAY_WEB_PASSWORD. Available in the admin console as the Data Gateway card on the Tools screen. The legacy plantpulse-sql SQL tool has been merged into this → plantpulse-sql (deprecated)

If the password is empty, the login form will reject it. Set it in the sidecar and restart → Web console login credentials

Key APIs

# 표준 헬스체크 (익명, readiness — DB · InMemory · QueryLog 정상 시에만 UP. 이 경로만 HTTPS 강제 제외)
curl -fsS http://127.0.0.1:5500/api/health
# 200 {"status":"UP","service":"plantpulse-data-gateway-web",…,"checks":{"database":true,"inmemory":true,"query_log":true}}

# 태그 시계열 조회 (API 키 필요)
curl -fsS -H "X-API-Key: ${PP_DATA_GATEWAY_API_KEY}" \
"http://127.0.0.1:5500/api/v1/tags/TAG_001/values?from=2026-05-30T00:00:00Z&to=2026-05-30T23:59:59Z&limit=10000"

# QPS · 지연 메트릭
curl -fsS -H "X-API-Key: ${PP_DATA_GATEWAY_API_KEY}" http://127.0.0.1:5500/api/v1/metrics

Operational commands

docker exec plantpulse-datalake pd status data-gateway
docker exec plantpulse-datalake pd restart data-gateway
docker exec plantpulse-datalake pd logs --lines 100 data-gateway

Common issues

SymptomCauseResolution
403 / 401API key mismatchpasswd.sh PP_DATA_GATEWAY_API_KEY — restart server and gateway together
Console login deniedPP_DATA_GATEWAY_WEB_PASSWORD is emptySidecar + restart-datalake.sh
Spark SQL only failsKyuubi not runningpd status analytics — if immediately after startup, wait 1 minute
Slow responseBackend loadCheck slow logs, shorten query time range
504Reverse proxy timeoutnginx proxy_read_timeout