plantpulse-data-gateway (Data Gateway)
Role
This is an HTTP REST + JDBC gateway through which external systems and the console securely access data. It's the security, authorization, and audit layer that enforces access only via this gateway, not directly to the storage. As of 2026-09-07, it also serves as the console's SQL execution screen.
| Item | Value |
|---|---|
| Module name | plantpulse-data-gateway |
| Installation path | /opt/kopens/plantpulse-platform/plantpulse-data-gateway/ |
| Port | 5500 (HTTP) · 5501 (TLS) |
pd Service | data-gateway — MASTER only |
| API authentication | X-API-Key: <PP_DATA_GATEWAY_API_KEY> |
| Console login | PP_DATA_GATEWAY_WEB_USER / PP_DATA_GATEWAY_WEB_PASSWORD — if empty, the console is closed |
Configuration
It connects to four backends via JDBC, which is why you can run SQL · CQL · TQL · 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 Settings
The core of plantpulse-jdbc.properties.template — the four backends and credentials are all 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 it via https://<server-ip>:5501/ and log in with PP_DATA_GATEWAY_WEB_USER / PP_DATA_GATEWAY_WEB_PASSWORD. It appears as a Data Gateway card in the admin console's Tools screen.
If the password is empty, the login form will reject it. Write it in the sidecar and restart → Web Console Login Account
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
| Symptom | Cause | Action |
|---|---|---|
| 403 / 401 | API key mismatch | passwd.sh PP_DATA_GATEWAY_API_KEY — server and gateway together |
| Console login rejected | PP_DATA_GATEWAY_WEB_PASSWORD empty | Sidecar + restart-datalake.sh |
| Only Spark SQL fails | Kyuubi not running | pd status analytics — if it started recently, wait 1 minute |
| Slow response | Backend load | Slow logs, shorten query time range |
| 504 | Reverse proxy timeout | nginx proxy_read_timeout |