Database Management
Overview
This page describes the configuration, connection methods, status checks, and default tuning policies for the data stores used by the installed PlantPulse platform.
The platform includes four internal data stores, each serving a distinct purpose.
| Store | Purpose | Default Port | Notes |
|---|---|---|---|
| Aster TSDB | Time series / large-volume data (tag points, events) | 9042 (CQL) | Keyspace pp. The platform's single large-capacity DB engine |
| PostgreSQL | Metastore (master / configuration data) | 5432 | Database pp, schema pp |
| Valkey (Redis-compatible) | Cache / session / real-time status | 6379 | Accessible via redis-cli |
| RustFS | Object storage (S3-compatible) | 9000 (S3) / 9001 (console) | Stores files / large outputs |
Additionally, the analytics layer (Spark / Kyuubi) uses a Hive Metastore + Iceberg table format, which the platform manages internally, so no separate operational tasks are required.
Note: The Aster TSDB ports 7000 (cluster gossip) and 7199 (JMX) are for internal communication only. Do not expose them externally.
Connection Methods
All commands below are based on being inside the data lake container. All four stores run within the same container (plantpulse-datalake), so opening a shell without arguments will enter that container.
cd /opt/kopens/plantpulse-platform-docker/bin
./shell.sh
Connection accounts and passwords are managed via environment variables (PP_CASSANDRA_USER/PASSWORD, PP_PG_USER/PASSWORD, PP_REDIS_PASSWORD, etc.).
| Item | Location |
|---|---|
| Actually applied values | Host's secret sidecar /etc/kopens/plantpulse-platform.env (permissions 0600) |
| How to change values | bin/passwd.sh — editing the file directly won't take effect → Password Rotation |
Path Verification — The source of truth for the secret sidecar is
/etc/kopens/plantpulse-platform.envonly (permissions0600). Older installations may have a duplicate with the same name under/opt/kopens/, but it is not read, and the installation script restores the canonical version → Environment Variable Reference
Aster TSDB (cqlsh)
cd /opt/kopens/plantpulse-platform/plantpulse-storage/db/cassandra/bin
./cqlsh -u <PP_CASSANDRA_USER> 127.0.0.1 9042
-- 키스페이스 / 테이블 확인
DESCRIBE KEYSPACE pp;
SELECT table_name FROM system_schema.tables WHERE keyspace_name = 'pp';
PostgreSQL (psql)
PostgreSQL 18 is used, and the client binaries are located in /usr/pgsql-18/bin.
/usr/pgsql-18/bin/psql -h 127.0.0.1 -U <PP_PG_USER> -d pp
-- 메타스토어 스키마 확인 (기본 search_path 는 pp 스키마)
\dn
\dt pp.*
Valkey (redis-cli)
redis-cli -h 127.0.0.1 -p 6379 -a '<PP_REDIS_PASSWORD>' ping
Caution: Use it only for query purposes (SELECT / DESCRIBE / ping). For data modifications or schema changes, please refer to Precautions.
Status Checks
Aster TSDB Node Status
The pd node command provides this by wrapping nodetool.
cd /opt/kopens/plantpulse-platform/plantpulse-datalake-cli/bin
./pd node status
In a healthy state, nodes are displayed as UN (Up / Normal). If any DN (Down) nodes are visible, restarting storage or checking logs is required.
PostgreSQL Status
/usr/pgsql-18/bin/pg_isready -h 127.0.0.1 -p 5432
/usr/pgsql-18/bin/psql -h 127.0.0.1 -U <PP_PG_USER> -d pp -c "SELECT version();"
Integrated Status Dashboard / Health API
# 포트별 서비스 상태 + CPU / 메모리 / 디스크 요약
cd /opt/kopens/plantpulse-platform/plantpulse-datalake-cli/bin
./status.sh
# 헬스 API — cassandra / postgres 컴포넌트 상태 포함
curl -kfsS https://127.0.0.1:4950/api/health | jq
Please verify that the cassandra and postgres components in the Health API response are healthy (UP).
Schema / Data Layout
| Item | Location | Content |
|---|---|---|
| Aster TSDB keyspace | pp | Time series data tables (tm_*) |
| PostgreSQL schema | Database pp / Schema pp | Master / configuration tables (mm_*) |
| Data file paths | /data1/pp-data | Mounted as Docker volume pp-data |
The PostgreSQL metastore schema is pre-seeded at image build time, so no separate schema creation is needed after installation. When connecting, search_path is set to the pp schema, allowing queries using just table names.
All data is stored under /data1/pp-data (volume pp-data), so removing containers or updating images preserves the data.
Tuning Defaults (Factory Settings)
Aster TSDB ships with the following defaults tailored for the platform's workload.
| Item | Factory Default | Description |
|---|---|---|
| JVM Heap | -Xms16G -Xmx16G | Initial / maximum heap identical (prevents dynamic resizing) |
| GC | ZGC (Generational) | Low-latency garbage collector |
| File cache | file_cache_enabled: false | Uses OS page cache, off-heap limit removed |
| Direct memory | -XX:MaxDirectMemorySize=6G | For memtable off-heap + IO buffers |
Important — Configuration Change Path: Configuration files deployed to each service path (e.g., Aster TSDB's
cassandra.yaml,jvm-server.options) are rendered outputs from templates inplantpulse-datalake-cli/config/templates/. If you modify these files directly, changes will be overwritten with template values on the next restart / configure cycle, and your modifications will be lost.If you need to change tuning values, proceed via the following path.
- Modify the template in
/etc/kopens/confon the host (bind-mounted toplantpulse-datalake-cli/config/templatesin the container) or thePP_*variable inbin/env.sh- Run
pd config renderinside the data lake container — it re-renders templates and deploys them to each service path- Restart the relevant service (e.g.,
pd restart storage)Since the template is a host directory, operators can edit it directly on the host, and your edits are preserved even across reinstalls.
If you need to change default values, we recommend consulting technical support first.
Backup Overview
All data, including databases, is stored in the pp-data volume, making volume-level backup the simplest and safest method.
cd /opt/kopens/plantpulse-platform-docker/bin
# 기본 세트 (pp-data · pp-security) 를 한 번에
./backup.sh
# 볼륨 하나만 — <volume-name> [보관일수] [백업경로]
./tools/backup-volume.sh pp-data 7 /data1/pp-backup/docker-volume
In the default set for backup.sh, pp-backup is the destination for backups, so pp-temp is excluded as it is useless for recovery. If necessary, you can specify it as an argument to include it in backups.
For detailed procedures such as point-in-time recovery, individual database backups, and external storage synchronization, please refer to the Admin Guide — Backup & Recovery page.
Precautions
- No direct DDL on operational DBs — Do not execute table creation / alteration / deletion (CREATE / ALTER / DROP / TRUNCATE) directly. Schema is managed by the platform's versioned migrations, and arbitrary changes can cause update failures or data loss.
- Avoid direct data modification — Please change master data (
mm_*) through the management console screens. Direct DB UPDATEs can cause inconsistencies with cache / integration services. - No embedded / alternative DBs — Configurations that replace the built-in Aster TSDB / PostgreSQL with other DB products or embedded DBs are not supported.
- No direct deletion of data files — Do not directly delete files under
/data1/pp-datato free up disk space. Contact technical support if you need to clean up data. - Account / port changes via environment variables — If you need to change DB accounts or ports, use environment variable (
PP_*) overrides rather than direct configuration file edits.
Technical Support
If you have any questions about database operations, feel free to contact us.
| Contact | Details |
|---|---|
| Technical Support | webmaster@kopens.com |