The flow_server.json file configures the FlowServer service. Pass it to FlowServer at startup using the -c flag, as described in Configure FlowServer.
{ "Host": "", "Port": 6060, "Gpfdist": { "Host": "", "Port": 6070, "ReuseTables": true }, "Prometheus": { "Host": "", "Port": 9080, "MetricsPath": "/flow_metrics" }, "DebugPort": 6080, "Logging": { "SplitLogByJob": false, "FrontendLevel": "debug", "BackendLevel": "info" } }
Parameters
Host: The hostname or IP address of the server. The default is an empty string, which means it will listen on all interfaces.Port: The port number on which the server listens for incoming connections. The default is 6060.Gpfdist: Configuration options for thegpfdistservice.Host: The hostname or IP address of thegpfdistservice. The default is an empty string, which means it will listen on all interfaces.Port: The port number on which thegpfdistservice listens. The default is 6070.ReuseTables: Whether to reuse existing tables in the database. The default isfalse. When you reuse external tables, FlowServer generates the external table name using a hash of various load configuration property values. By default, FlowServer drops the external table associated with a load operation (if one exists) and creates a new external table when you start or restart the job. If you don't reuse external tables, the external table name is based on the job name.
Prometheus: Configuration options for the Prometheus metrics endpoint. When this block is present, FlowServer automatically starts an HTTP server to expose metrics for scraping.Host: The hostname or IP address of the Prometheus service. The default is an empty string, which means it will listen on all interfaces.Port: The port number on which the Prometheus service listens. The default is 9080.MetricsPath: The path to the metrics endpoint. The default is/metrics.
DebugPort: The port number for the debug server. When set, FlowServer starts an HTTP listener, which exposes runtime diagnostics including CPU profiles, heap usage, and goroutine stacks athttp://<flowserver_host>:<DebugPort>/debug/pprof/. If not set, the debug server doesn't start.Logging: Configuration options for logging. The supported values aredebug,info,warn,error, andfatal.SplitLogByJob: Whether to split logs by job. The default istrue, meaning logs are separated by job.FrontendLevel: The logging level for the frontend/stdout. The default isinfo.BackendLevel: The logging level for the backend/log file. The default isdebug.
Prometheus metrics
FlowServer exposes the following metrics at the configured Host:Port/MetricsPath endpoint.
| Metric | Description |
|---|---|
whpg_flow_server_job_failed | Number of jobs that have faile. |
whpg_flow_server_job_running | Number of jobs currently running. |
whpg_flow_server_job_total | Total number of jobs processed by the server. |
whpg_flow_server_process_cpu_seconds_total | Total user and system CPU time spent in seconds. |
whpg_flow_server_process_max_fds | Maximum number of open file descriptors. |
whpg_flow_server_process_network_receive_bytes_total | Number of bytes received by the process over the network. |
whpg_flow_server_process_network_transmit_bytes_total | Number of bytes sent by the process over the network. |
whpg_flow_server_process_open_fds | Number of open file descriptors. |
whpg_flow_server_process_resident_memory_bytes | Resident memory size in bytes. |
whpg_flow_server_process_start_time_seconds | Start time of the process since Unix epoch in seconds. |
whpg_flow_server_process_virtual_memory_bytes | Virtual memory size in bytes. |
whpg_flow_server_process_virtual_memory_max_bytes | Maximum amount of virtual memory available in bytes. |