vinothlk06 opened a new issue, #13501:
URL: https://github.com/apache/seatunnel/issues/13501

   ### Motivation
   When running SeaTunnel Engine (Zeta) in separated cluster mode on Kubernetes 
with `dynamic-slot: false` and `telemetry.metric.enabled: true`, Prometheus 
scrapes `/hazelcast/rest/instance/metrics` on port `5801`.
   Currently, the Prometheus endpoint exports `node_count`, `node_state`, 
`job_count`, `hazelcast_*`, and `jvm_*`, **but does not expose:**
   1. **Cluster/worker slot capacity gauges** (`totalSlot`, `assignedSlot`, 
`unassignedSlot`) — which are only available as JSON on the REST v2 API (`GET 
:8080/overview` or `:8080/pending-jobs`).
   2. **Per-job status with `job_name` label** (e.g. which job is currently 
`FAILED` or `FAILING`). Currently `job_count{type="failed"}` only gives an 
aggregate count over `history-job-expire-minutes` without job names, and 
continues counting failures even after a job has been re-submitted and 
recovered.
   Because of this, operators cannot set up native Prometheus/Alertmanager 
alerts for:
   - Low available slots / slot exhaustion (`unassignedSlot`)
   - N-1 worker failover slot headroom checks
   - Identifying which specific job name failed in Alertmanager notifications
   ### Proposed Feature
   Expose the following metrics on SeaTunnel's Prometheus/OpenMetrics endpoint 
(`/hazelcast/rest/instance/metrics` and `/openmetrics`):
   1. Cluster & per-worker slot gauges (when `dynamic-slot: false`):
      - `seatunnel_cluster_slots_total`
      - `seatunnel_cluster_slots_assigned`
      - `seatunnel_cluster_slots_unassigned`
      - (optionally labeled by worker/tag)
   2. Per-job state gauge with `job_name` (and/or `job_status`) label or latest 
job state so Prometheus alerts can surface the failing/failed `job_name` 
directly.
   ### SeaTunnel Version
   2.3.13 (also observed in 3.0.0)
   ### Workaround
   Running an external HTTP/JSON exporter polling `:8080/overview`, 
`:8080/running-jobs`, and `:8080/finished-jobs/FAILED` and re-exposing them on 
`/metrics` for Prometheus.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to