diff --git a/config/seatunnel.yaml b/config/seatunnel.yaml index 6b81b92ea3a..4117ecc89d3 100644 --- a/config/seatunnel.yaml +++ b/config/seatunnel.yaml @@ -34,3 +34,6 @@ seatunnel: namespace: /tmp/seatunnel/checkpoint_snapshot storage.type: hdfs fs.defaultFS: file:///tmp/ # Ensure that the directory has written permission + telemetry: + metric: + enabled: false diff --git a/docs/en/seatunnel-engine/telemetry.md b/docs/en/seatunnel-engine/telemetry.md new file mode 100644 index 00000000000..5b5805444c8 --- /dev/null +++ b/docs/en/seatunnel-engine/telemetry.md @@ -0,0 +1,152 @@ +--- +sidebar_position: 13 +--- + +# Telemetry + +Integrating `Metrices` through `Prometheus-exports` can better seamlessly connect to related monitoring platforms such +as Prometheus and Grafana, improving the ability to monitor and alarm of the SeaTunnel cluster. + +You can configure telemetry's configurations in the `seatunnel.yaml` file. + +The following is an example declarative configuration. + +```yaml +seatunnel: + engine: + telemetry: + metric: + enabled: true # Whether open metrics export +``` + +## Metrics + +The [metric text of prometheus](./telemetry/metrics.txt),which get +from `http:{instanceHost}:5801/hazelcast/rest/instance/metrics`. + +The [metric text of openMetrics](./telemetry/openmetrics.txt),which get +from `http:{instanceHost}:5801/hazelcast/rest/instance/openmetrics`. + +Available metrics include the following categories. + +Note: All metrics both have the same labelName `cluster`, that's value is the config of `hazelcast.cluster-name`. + +### Node Metrics + +| MetricName | Type | Labels | DESCRIPTION | +|-------------------------------------------|-------|------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------| +| cluster_info | Gauge | **hazelcastVersion**, the version of hazelcast. **master**, seatunnel master address. | Cluster info | +| cluster_time | Gauge | **hazelcastVersion**, the version of hazelcast. | Cluster time | +| node_count | Gauge | - | Cluster node total count | +| node_state | Gauge | **address**, server instance address,for example: "127.0.0.1:5801" | Whether is up of seatunnel node | +| hazelcast_executor_executedCount | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor executedCount of seatunnel cluster node | +| hazelcast_executor_isShutdown | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor isShutdown of seatunnel cluster node | +| hazelcast_executor_isTerminated | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor isTerminated of seatunnel cluster node | +| hazelcast_executor_maxPoolSize | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor maxPoolSize of seatunnel cluster node | +| hazelcast_executor_poolSize | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor poolSize of seatunnel cluster node | +| hazelcast_executor_queueRemainingCapacity | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor queueRemainingCapacity of seatunnel cluster node | +| hazelcast_executor_queueSize | Gauge | **type**, the type of executor, including: "async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | The hazelcast executor queueSize of seatunnel cluster node | +| hazelcast_partition_partitionCount | Gauge | - | The partitionCount of seatunnel cluster node | +| hazelcast_partition_activePartition | Gauge | - | The activePartition of seatunnel cluster node | +| hazelcast_partition_isClusterSafe | Gauge | - | Weather is cluster safe of partition | +| hazelcast_partition_isLocalMemberSafe | Gauge | - | Weather is local member safe of partition | + +### Thread Pool Status + +| MetricName | Type | Labels | DESCRIPTION | +|-------------------------------------|---------|--------------------------------------------------------------------|--------------------------------------------------------------------------------| +| job_thread_pool_activeCount | Gauge | **address**, server instance address,for example: "127.0.0.1:5801" | The activeCount of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_corePoolSize | Gauge | **address**, server instance address,for example: "127.0.0.1:5801" | The corePoolSize of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_maximumPoolSize | Gauge | **address**, server instance address,for example: "127.0.0.1:5801" | The maximumPoolSize of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_poolSize | Gauge | **address**, server instance address,for example: "127.0.0.1:5801" | The poolSize of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_queueTaskCount | Gauge | **address**, server instance address,for example: "127.0.0.1:5801" | The queueTaskCount of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_completedTask_total | Counter | **address**, server instance address,for example: "127.0.0.1:5801" | The completedTask of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_task_total | Counter | **address**, server instance address,for example: "127.0.0.1:5801" | The taskCount of seatunnel coordinator job's executor cached thread pool | +| job_thread_pool_rejection_total | Counter | **address**, server instance address,for example: "127.0.0.1:5801" | The rejectionCount of seatunnel coordinator job's executor cached thread pool | | + +### Job info detail + +| MetricName | Type | Labels | DESCRIPTION | +|------------|-------|-----------------------------------------------------------------------------------------------------------------------------|-------------------------------------| +| job_count | Gauge | **type**, the type of job, including: "canceled" "cancelling" "created" "failed" "failing" "finished" "running" "scheduled" | All job counts of seatunnel cluster | + +### JVM Metrics + +| MetricName | Type | Labels | DESCRIPTION | +|--------------------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------| +| jvm_threads_current | Gauge | - | Current thread count of a JVM | +| jvm_threads_daemon | Gauge | - | Daemon thread count of a JVM | +| jvm_threads_peak | Gauge | - | Peak thread count of a JVM | +| jvm_threads_started_total | Counter | - | Started thread count of a JVM | +| jvm_threads_deadlocked | Gauge | - | Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers | +| jvm_threads_deadlocked_monitor | Gauge | - | Cycles of JVM-threads that are in deadlock waiting to acquire object monitors | +| jvm_threads_state | Gauge | **state**, the state of jvm thread, including: "NEW" "TERMINATED" "RUNNABLE" "BLOCKED" "WAITING" "TIMED_WAITING" "UNKNOWN" | Current count of threads by state | +| jvm_classes_currently_loaded | Gauge | - | The number of classes that are currently loaded in the JVM | +| jvm_classes_loaded_total | Counter | - | The total number of classes that have been loaded since the JVM has started execution | +| jvm_classes_unloaded_total | Counter | - | The total number of classes that have been unloaded since the JVM has started execution | +| jvm_memory_pool_allocated_bytes_total | Counter | **pool**,including: "Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously | +| jvm_gc_collection_seconds_count | Summary | **gc**,including: "PS Scavenge" "PS MarkSweep" | Time spent in a given JVM garbage collector in seconds | +| jvm_gc_collection_seconds_sum | Summary | **gc**,including: "PS Scavenge" "PS MarkSweep" | Time spent in a given JVM garbage collector in seconds | +| jvm_info | Gauge | **runtime**, for example: "Java(TM) SE Runtime Environment". **vendor**, for example: "Oracle Corporation". **version** ,for example: "1.8.0_212-b10" | VM version info | +| process_cpu_seconds_total | Counter | - | Total user and system CPU time spent in seconds | +| process_start_time_seconds | Gauge | - | Start time of the process since unix epoch in seconds | +| process_open_fds | Gauge | - | Number of open file descriptors | +| process_max_fds | Gauge | - | Maximum number of open file descriptors | +| jvm_memory_objects_pending_finalization | Gauge | - | The number of objects waiting in the finalizer queue | +| jvm_memory_bytes_used | Gauge | **area**, including: "heap" "noheap" | Used bytes of a given JVM memory area | +| jvm_memory_bytes_committed | Gauge | **area**, including: "heap" "noheap" | Committed (bytes) of a given JVM memory area | +| jvm_memory_bytes_max | Gauge | **area**, including:"heap" "noheap" | Max (bytes) of a given JVM memory area | +| jvm_memory_bytes_init | Gauge | **area**, including:"heap" "noheap" | Initial bytes of a given JVM memory area | +| jvm_memory_pool_bytes_used | Gauge | **pool**, including: "Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | Used bytes of a given JVM memory pool | +| jvm_memory_pool_bytes_committed | Gauge | **pool**, including: "Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | Committed bytes of a given JVM memory pool | +| jvm_memory_pool_bytes_max | Gauge | **pool**, including: "Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | Max bytes of a given JVM memory pool | +| jvm_memory_pool_bytes_init | Gauge | **pool**, including: "Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | Initial bytes of a given JVM memory pool | +| jvm_memory_pool_allocated_bytes_created | Gauge | **pool**, including: "Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously | +| jvm_memory_pool_collection_used_bytes | Gauge | **pool**, including: "PS Eden Space" "PS Old Ge" "PS Survivor Space" | Used bytes after last collection of a given JVM memory pool | +| jvm_memory_pool_collection_committed_bytes | Gauge | **pool**, including: "PS Eden Space" "PS Old Ge" "PS Survivor Space" | Committed after last collection bytes of a given JVM memory pool | +| jvm_memory_pool_collection_max_bytes | Gauge | **pool**, including: "PS Eden Space" "PS Old Ge" "PS Survivor Space" | Max bytes after last collection of a given JVM memory pool | +| jvm_memory_pool_collection_init_bytes | Gauge | **pool**, including: "PS Eden Space" "PS Old Ge" "PS Survivor Space" | Initial after last collection bytes of a given JVM memory pool | +| jvm_buffer_pool_used_bytes | Gauge | **pool**, including: "direct" "mapped" | Used bytes of a given JVM buffer pool | +| jvm_buffer_pool_capacity_bytes | Gauge | **pool**, including: "direct" "mapped" | Bytes capacity of a given JVM buffer pool | +| jvm_buffer_pool_used_buffers | Gauge | **pool**, including: "direct" "mapped" | Used buffers of a given JVM buffer pool | + +## Cluster Monitoring By Prometheus & Grafana + +### Install Prometheus + +For a guide on how to set up Prometheus server go to +the [Installation](https://prometheus.io/docs/prometheus/latest/installation) + +### Configuration Prometheus + +Add seatunnel instance metric exports into `/etc/prometheus/prometheus.yaml`. For example: + +```yaml +global: + # How frequently to scrape targets from this job. + scrape_interval: 15s +scrape_configs: + # The job name assigned to scraped metrics by default. + - job_name: 'seatunnel' + scrape_interval: 5s + # Metrics export path + metrics_path: /hazelcast/rest/instance/metrics + # List of labeled statically configured targets for this job. + static_configs: + # The targets specified by the static config. + - targets: [ 'localhost:5801' ] + # Labels assigned to all metrics scraped from the targets. + # labels: [:] +``` + +### Install Grafana + +For a guide on how to set up Grafana server go to +the [Installation](https://grafana.com/docs/grafana/latest/setup-grafana/installation) + +### Monitoring Dashboard + +- Add Prometheus DataSource on Grafana. + - Import `Seatunnel Cluster` monitoring dashboard by [Dashboard JSON](./telemetry/grafana-dashboard.json) into Grafana. + +The [effect image](../../images/grafana.png) of the dashboard \ No newline at end of file diff --git a/docs/en/seatunnel-engine/telemetry/grafana-dashboard.json b/docs/en/seatunnel-engine/telemetry/grafana-dashboard.json new file mode 100644 index 00000000000..7a87e47ff38 --- /dev/null +++ b/docs/en/seatunnel-engine/telemetry/grafana-dashboard.json @@ -0,0 +1 @@ +{"annotations":{"list":[{"builtIn":1,"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"enable":true,"hide":true,"iconColor":"rgba(0, 211, 255, 1)","name":"Annotations & Alerts","target":{"limit":100,"matchAny":false,"tags":[],"type":"dashboard"},"type":"dashboard"}]},"editable":true,"fiscalYearStartMonth":0,"graphTooltip":0,"id":8,"links":[],"liveNow":false,"panels":[{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"super-light-blue","value":null},{"color":"red","value":100000}]}},"overrides":[]},"gridPos":{"h":4,"w":12,"x":0,"y":0},"id":17,"options":{"colorMode":"background","graphMode":"none","justifyMode":"center","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},"pluginVersion":"11.2.0","targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"node_count{instance=~\"$instance\"}","interval":"","legendFormat":"","range":true,"refId":"A"}],"title":"Total Node Count","type":"stat"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":4,"w":12,"x":12,"y":0},"id":18,"options":{"colorMode":"background","graphMode":"none","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":1},"textMode":"auto","wideLayout":true},"pluginVersion":"11.2.0","targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"sum(node_state{instance=~\"$instance\"})","interval":"","legendFormat":"__auto","range":true,"refId":"A"}],"title":"UP Node Count","type":"stat"},{"collapsed":false,"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"gridPos":{"h":1,"w":24,"x":0,"y":4},"id":22,"panels":[],"targets":[{"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"refId":"A"}],"title":"Hazelcast Partition","type":"row"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":5},"id":32,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_partition_partitionCount{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}","range":true,"refId":"A"}],"title":"partitionCount","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":5},"id":33,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_partition_activePartition{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}","range":true,"refId":"A"}],"title":"activePartition","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":0,"y":12},"id":34,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"pluginVersion":"8.3.3","targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_partition_isClusterSafe{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}","range":true,"refId":"A"}],"title":"isClusterSafe","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":7,"w":12,"x":12,"y":12},"id":35,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_partition_isLocalMemberSafe{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}","range":true,"refId":"A"}],"title":"isLocalMemberSafe","type":"timeseries"},{"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"gridPos":{"h":1,"w":24,"x":0,"y":19},"id":20,"targets":[{"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"refId":"A"}],"title":"Hazelcast Executor","type":"row"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":24,"x":0,"y":20},"id":24,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_executedCount{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"executedCount","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":26},"id":26,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_isTerminated{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"isTerminated","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":26},"id":25,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_isShutdown{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"isShutdown","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":34},"id":28,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_poolSize{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"poolSize","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":34},"id":27,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_maxPoolSize{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"maxPoolSize","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":42},"id":30,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_queueRemainingCapacity{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"queueRemainingCapacity","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":0,"gradientMode":"none","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":42},"id":29,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"hazelcast_executor_queueSize{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"}],"title":"queueSize","type":"timeseries"},{"collapsed":false,"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"gridPos":{"h":1,"w":24,"x":0,"y":50},"id":7,"panels":[],"targets":[{"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"refId":"A"}],"title":"System","type":"row"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":18,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineStyle":{"fill":"solid"},"lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":51},"id":9,"interval":"300","options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"rate(process_cpu_seconds_total{instance=~\"$instance\"}[$__interval])*100","interval":"","legendFormat":"{{instance}}","range":true,"refId":"A"}],"title":"Cpu Usage","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"description":"","fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":22,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":51},"id":10,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"100 * (jvm_memory_bytes_used{instance=~\"$instance\",area=\"heap\"} / jvm_memory_bytes_max{instance=~\"$instance\",area=\"heap\"})","interval":"","legendFormat":"{{instance}}","range":true,"refId":"A"}],"title":"Heap Memory Usage","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":0,"y":59},"id":12,"interval":"300","options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"increase(jvm_gc_collection_seconds_count[$__interval])","interval":"","legendFormat":"{{instance}}-{{gc}}","range":true,"refId":"A"}],"title":"GC Count","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":12,"x":12,"y":59},"id":13,"interval":"300","options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"increase(jvm_gc_collection_seconds_sum{instance=~\"$instance\"}[$__interval])*1000","interval":"","legendFormat":"{{instance}}-{{gc}}","range":true,"refId":"A"}],"title":"GC Cost Time","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"linear","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":8,"w":24,"x":0,"y":67},"id":14,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"jvm_threads_current{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-current","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"jvm_threads_daemon{instance=~\"$instance\"}","hide":false,"interval":"","legendFormat":"{{instance}}-daemon","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"jvm_threads_peak{instance=~\"$instance\"}","hide":false,"interval":"","legendFormat":"{{instance}}-peak","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"jvm_threads_deadlocked{instance=~\"$instance\"}","hide":false,"interval":"","legendFormat":"{{instance}}-deadlocked","range":true,"refId":"D"}],"title":"Jvm Threads","type":"timeseries"},{"collapsed":false,"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"gridPos":{"h":1,"w":24,"x":0,"y":75},"id":5,"panels":[],"targets":[{"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"refId":"A"}],"title":"Job","type":"row"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"continuous-YlBl"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null}]}},"overrides":[]},"gridPos":{"h":6,"w":24,"x":0,"y":76},"id":2,"options":{"displayMode":"basic","maxVizHeight":300,"minVizHeight":16,"minVizWidth":8,"namePlacement":"auto","orientation":"vertical","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showUnfilled":true,"sizing":"auto","valueMode":"color"},"pluginVersion":"11.2.0","targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"sum(job_count) by (type) ","hide":false,"interval":"","legendFormat":"__auto","range":true,"refId":"A"}],"title":"Job Count","type":"bargauge"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":12,"x":0,"y":82},"id":3,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"job_thread_pool_activeCount{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"job_thread_pool_corePoolSize{instance=~\"$instance\"}","hide":false,"interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"B"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"job_thread_pool_maximumPoolSize{instance=~\"$instance\"}","hide":true,"interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"C"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"job_thread_pool_poolSize{instance=~\"$instance\"}","hide":false,"interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"D"}],"title":"Job Thread Pool","type":"timeseries"},{"datasource":{"default":true,"type":"prometheus","uid":"edwo9tknxxgqof"},"fieldConfig":{"defaults":{"color":{"mode":"palette-classic"},"custom":{"axisBorderShow":false,"axisCenteredZero":false,"axisColorMode":"text","axisLabel":"","axisPlacement":"auto","barAlignment":0,"barWidthFactor":0.6,"drawStyle":"line","fillOpacity":12,"gradientMode":"opacity","hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineInterpolation":"smooth","lineWidth":1,"pointSize":1,"scaleDistribution":{"type":"linear"},"showPoints":"auto","spanNulls":false,"stacking":{"group":"A","mode":"none"},"thresholdsStyle":{"mode":"off"}},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"green","value":null},{"color":"red","value":80}]}},"overrides":[]},"gridPos":{"h":6,"w":12,"x":12,"y":82},"id":15,"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"mode":"single","sort":"none"}},"targets":[{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"job_thread_pool_completedTask_total{instance=~\"$instance\"}","interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"A"},{"datasource":{"type":"prometheus","uid":"jUi2yaj4k"},"editorMode":"code","exemplar":true,"expr":"job_thread_pool_task_total{instance=~\"$instance\"}","hide":false,"interval":"","legendFormat":"{{instance}}-{{type}}","range":true,"refId":"B"}],"title":"Job Thread Pool Total","type":"timeseries"}],"refresh":"30s","schemaVersion":39,"tags":[],"templating":{"list":[{"current":{"selected":true,"text":["All"],"value":["$__all"]},"datasource":{"type":"prometheus","uid":"edwo9tknxxgqof"},"definition":"label_values(cluster_info,instance)","description":"instance","hide":0,"includeAll":true,"label":"","multi":true,"name":"instance","options":[],"query":{"qryType":5,"query":"label_values(cluster_info,instance)","refId":"PrometheusVariableQueryEditor-VariableQuery"},"refresh":1,"regex":"","skipUrlSync":false,"sort":0,"type":"query"}]},"time":{"from":"now-15m","to":"now"},"timepicker":{},"timezone":"","title":"Seatunnel","uid":"bdx1j097hmku8d","version":11,"weekStart":""} \ No newline at end of file diff --git a/docs/en/seatunnel-engine/telemetry/metrics.txt b/docs/en/seatunnel-engine/telemetry/metrics.txt new file mode 100644 index 00000000000..25dc805602b --- /dev/null +++ b/docs/en/seatunnel-engine/telemetry/metrics.txt @@ -0,0 +1,296 @@ +# HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool. +# TYPE jvm_buffer_pool_used_bytes gauge +jvm_buffer_pool_used_bytes{pool="mapped",} 0.0 +jvm_buffer_pool_used_bytes{pool="direct",} 414142.0 +# HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool. +# TYPE jvm_buffer_pool_capacity_bytes gauge +jvm_buffer_pool_capacity_bytes{pool="mapped",} 0.0 +jvm_buffer_pool_capacity_bytes{pool="direct",} 414139.0 +# HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool. +# TYPE jvm_buffer_pool_used_buffers gauge +jvm_buffer_pool_used_buffers{pool="mapped",} 0.0 +jvm_buffer_pool_used_buffers{pool="direct",} 7.0 +# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds. +# TYPE jvm_gc_collection_seconds summary +jvm_gc_collection_seconds_count{gc="G1 Young Generation",} 6.0 +jvm_gc_collection_seconds_sum{gc="G1 Young Generation",} 0.047 +jvm_gc_collection_seconds_count{gc="G1 Old Generation",} 0.0 +jvm_gc_collection_seconds_sum{gc="G1 Old Generation",} 0.0 +# HELP jvm_memory_objects_pending_finalization The number of objects waiting in the finalizer queue. +# TYPE jvm_memory_objects_pending_finalization gauge +jvm_memory_objects_pending_finalization 0.0 +# HELP jvm_memory_bytes_used Used bytes of a given JVM memory area. +# TYPE jvm_memory_bytes_used gauge +jvm_memory_bytes_used{area="heap",} 8.4778896E7 +jvm_memory_bytes_used{area="nonheap",} 7.2728624E7 +# HELP jvm_memory_bytes_committed Committed (bytes) of a given JVM memory area. +# TYPE jvm_memory_bytes_committed gauge +jvm_memory_bytes_committed{area="heap",} 5.36870912E8 +jvm_memory_bytes_committed{area="nonheap",} 7.7594624E7 +# HELP jvm_memory_bytes_max Max (bytes) of a given JVM memory area. +# TYPE jvm_memory_bytes_max gauge +jvm_memory_bytes_max{area="heap",} 8.589934592E9 +jvm_memory_bytes_max{area="nonheap",} -1.0 +# HELP jvm_memory_bytes_init Initial bytes of a given JVM memory area. +# TYPE jvm_memory_bytes_init gauge +jvm_memory_bytes_init{area="heap",} 5.36870912E8 +jvm_memory_bytes_init{area="nonheap",} 7667712.0 +# HELP jvm_memory_pool_bytes_used Used bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_used gauge +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-nmethods'",} 1307520.0 +jvm_memory_pool_bytes_used{pool="Metaspace",} 4.9585376E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'profiled nmethods'",} 1.2327296E7 +jvm_memory_pool_bytes_used{pool="Compressed Class Space",} 6124368.0 +jvm_memory_pool_bytes_used{pool="G1 Eden Space",} 5.4525952E7 +jvm_memory_pool_bytes_used{pool="G1 Old Gen",} 1.3475728E7 +jvm_memory_pool_bytes_used{pool="G1 Survivor Space",} 1.6777216E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-profiled nmethods'",} 3384064.0 +# HELP jvm_memory_pool_bytes_committed Committed bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_committed gauge +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-nmethods'",} 2555904.0 +jvm_memory_pool_bytes_committed{pool="Metaspace",} 5.2035584E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'profiled nmethods'",} 1.2386304E7 +jvm_memory_pool_bytes_committed{pool="Compressed Class Space",} 7208960.0 +jvm_memory_pool_bytes_committed{pool="G1 Eden Space",} 3.20864256E8 +jvm_memory_pool_bytes_committed{pool="G1 Old Gen",} 1.9922944E8 +jvm_memory_pool_bytes_committed{pool="G1 Survivor Space",} 1.6777216E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-profiled nmethods'",} 3407872.0 +# HELP jvm_memory_pool_bytes_max Max bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_max gauge +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-nmethods'",} 5849088.0 +jvm_memory_pool_bytes_max{pool="Metaspace",} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'profiled nmethods'",} 1.22896384E8 +jvm_memory_pool_bytes_max{pool="Compressed Class Space",} 1.073741824E9 +jvm_memory_pool_bytes_max{pool="G1 Eden Space",} -1.0 +jvm_memory_pool_bytes_max{pool="G1 Old Gen",} 8.589934592E9 +jvm_memory_pool_bytes_max{pool="G1 Survivor Space",} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-profiled nmethods'",} 1.22912768E8 +# HELP jvm_memory_pool_bytes_init Initial bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_init gauge +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-nmethods'",} 2555904.0 +jvm_memory_pool_bytes_init{pool="Metaspace",} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'profiled nmethods'",} 2555904.0 +jvm_memory_pool_bytes_init{pool="Compressed Class Space",} 0.0 +jvm_memory_pool_bytes_init{pool="G1 Eden Space",} 2.7262976E7 +jvm_memory_pool_bytes_init{pool="G1 Old Gen",} 5.09607936E8 +jvm_memory_pool_bytes_init{pool="G1 Survivor Space",} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-profiled nmethods'",} 2555904.0 +# HELP jvm_memory_pool_collection_used_bytes Used bytes after last collection of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_used_bytes gauge +jvm_memory_pool_collection_used_bytes{pool="G1 Eden Space",} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Old Gen",} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Survivor Space",} 1.6777216E7 +# HELP jvm_memory_pool_collection_committed_bytes Committed after last collection bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_committed_bytes gauge +jvm_memory_pool_collection_committed_bytes{pool="G1 Eden Space",} 3.20864256E8 +jvm_memory_pool_collection_committed_bytes{pool="G1 Old Gen",} 0.0 +jvm_memory_pool_collection_committed_bytes{pool="G1 Survivor Space",} 1.6777216E7 +# HELP jvm_memory_pool_collection_max_bytes Max bytes after last collection of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_max_bytes gauge +jvm_memory_pool_collection_max_bytes{pool="G1 Eden Space",} -1.0 +jvm_memory_pool_collection_max_bytes{pool="G1 Old Gen",} 8.589934592E9 +jvm_memory_pool_collection_max_bytes{pool="G1 Survivor Space",} -1.0 +# HELP jvm_memory_pool_collection_init_bytes Initial after last collection bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_init_bytes gauge +jvm_memory_pool_collection_init_bytes{pool="G1 Eden Space",} 2.7262976E7 +jvm_memory_pool_collection_init_bytes{pool="G1 Old Gen",} 5.09607936E8 +jvm_memory_pool_collection_init_bytes{pool="G1 Survivor Space",} 0.0 +# HELP job_thread_pool_activeCount The activeCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_activeCount gauge +job_thread_pool_activeCount{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_completedTask_total The completedTask of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_completedTask_total counter +job_thread_pool_completedTask_total{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP job_thread_pool_corePoolSize The corePoolSize of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_corePoolSize gauge +job_thread_pool_corePoolSize{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_maximumPoolSize The maximumPoolSize of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_maximumPoolSize gauge +job_thread_pool_maximumPoolSize{cluster="seatunnel",address="127.0.0.1:5801",} 2.147483647E9 +# HELP job_thread_pool_poolSize The poolSize of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_poolSize gauge +job_thread_pool_poolSize{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_task_total The taskCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_task_total counter +job_thread_pool_task_total{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP job_thread_pool_queueTaskCount The queueTaskCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_queueTaskCount gauge +job_thread_pool_queueTaskCount{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_rejection_total The rejectionCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_rejection_total counter +job_thread_pool_rejection_total{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP jvm_memory_pool_allocated_bytes_total Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously. +# TYPE jvm_memory_pool_allocated_bytes_total counter +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'profiled nmethods'",} 1.1970688E7 +jvm_memory_pool_allocated_bytes_total{pool="G1 Old Gen",} 1.3475728E7 +jvm_memory_pool_allocated_bytes_total{pool="G1 Eden Space",} 1.61480704E8 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-profiled nmethods'",} 3166720.0 +jvm_memory_pool_allocated_bytes_total{pool="G1 Survivor Space",} 1.6777216E7 +jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space",} 6084208.0 +jvm_memory_pool_allocated_bytes_total{pool="Metaspace",} 4.927032E7 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-nmethods'",} 1303936.0 +# HELP jvm_threads_current Current thread count of a JVM +# TYPE jvm_threads_current gauge +jvm_threads_current 114.0 +# HELP jvm_threads_daemon Daemon thread count of a JVM +# TYPE jvm_threads_daemon gauge +jvm_threads_daemon 10.0 +# HELP jvm_threads_peak Peak thread count of a JVM +# TYPE jvm_threads_peak gauge +jvm_threads_peak 124.0 +# HELP jvm_threads_started_total Started thread count of a JVM +# TYPE jvm_threads_started_total counter +jvm_threads_started_total 140.0 +# HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers +# TYPE jvm_threads_deadlocked gauge +jvm_threads_deadlocked 0.0 +# HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors +# TYPE jvm_threads_deadlocked_monitor gauge +jvm_threads_deadlocked_monitor 0.0 +# HELP jvm_threads_state Current count of threads by state +# TYPE jvm_threads_state gauge +jvm_threads_state{state="NEW",} 0.0 +jvm_threads_state{state="TERMINATED",} 0.0 +jvm_threads_state{state="RUNNABLE",} 12.0 +jvm_threads_state{state="BLOCKED",} 0.0 +jvm_threads_state{state="WAITING",} 80.0 +jvm_threads_state{state="TIMED_WAITING",} 22.0 +jvm_threads_state{state="UNKNOWN",} 0.0 +# HELP cluster_info Cluster info +# TYPE cluster_info gauge +cluster_info{cluster="seatunnel",hazelcastVersion="5.1",master="127.0.0.1:5801",} 1.0 +# HELP cluster_time Cluster start time +# TYPE cluster_time gauge +cluster_time{cluster="seatunnel",hazelcastVersion="5.1",} 1.725364524614E12 +# HELP node_count Cluster node total count +# TYPE node_count gauge +node_count{cluster="seatunnel",} 1.0 +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total counter +process_cpu_seconds_total 16.511054 +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 1.725363614623E9 +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 162.0 +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 10240.0 +# HELP job_count All job counts of seatunnel cluster +# TYPE job_count gauge +job_count{cluster="seatunnel",type="canceled",} 0.0 +job_count{cluster="seatunnel",type="cancelling",} 0.0 +job_count{cluster="seatunnel",type="created",} 0.0 +job_count{cluster="seatunnel",type="failed",} 0.0 +job_count{cluster="seatunnel",type="failing",} 0.0 +job_count{cluster="seatunnel",type="finished",} 0.0 +job_count{cluster="seatunnel",type="running",} 0.0 +job_count{cluster="seatunnel",type="scheduled",} 0.0 +# HELP node_state Whether is up of seatunnel node +# TYPE node_state gauge +node_state{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP hazelcast_executor_executedCount The hazelcast executor executedCount of seatunnel cluster node +# TYPE hazelcast_executor_executedCount gauge +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 224.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 16469.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_isShutdown The hazelcast executor isShutdown of seatunnel cluster node +# TYPE hazelcast_executor_isShutdown gauge +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_isTerminated The hazelcast executor isTerminated of seatunnel cluster node +# TYPE hazelcast_executor_isTerminated gauge +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_maxPoolSize The hazelcast executor maxPoolSize of seatunnel cluster node +# TYPE hazelcast_executor_maxPoolSize gauge +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 200.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 16.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 20.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 10.0 +# HELP hazelcast_executor_poolSize The hazelcast executor poolSize of seatunnel cluster node +# TYPE hazelcast_executor_poolSize gauge +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_queueRemainingCapacity The hazelcast executor queueRemainingCapacity of seatunnel cluster +# TYPE hazelcast_executor_queueRemainingCapacity gauge +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 2.147483647E9 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 2.147483647E9 +# HELP hazelcast_executor_queueSize The hazelcast executor queueSize of seatunnel cluster node +# TYPE hazelcast_executor_queueSize gauge +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_partition_partitionCount The partitionCount of seatunnel cluster node +# TYPE hazelcast_partition_partitionCount gauge +hazelcast_partition_partitionCount{cluster="seatunnel",address="127.0.0.1:5801",} 271.0 +# HELP hazelcast_partition_activePartition The activePartition of seatunnel cluster node +# TYPE hazelcast_partition_activePartition gauge +hazelcast_partition_activePartition{cluster="seatunnel",address="127.0.0.1:5801",} 271.0 +# HELP hazelcast_partition_isClusterSafe Whether is cluster safe of partition +# TYPE hazelcast_partition_isClusterSafe gauge +hazelcast_partition_isClusterSafe{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP hazelcast_partition_isLocalMemberSafe Whether is local member safe of partition +# TYPE hazelcast_partition_isLocalMemberSafe gauge +hazelcast_partition_isLocalMemberSafe{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP jvm_info VM version info +# TYPE jvm_info gauge +jvm_info{runtime="OpenJDK Runtime Environment",vendor="Azul Systems, Inc.",version="11.0.13+8-LTS",} 1.0 +# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM +# TYPE jvm_classes_currently_loaded gauge +jvm_classes_currently_loaded 9168.0 +# HELP jvm_classes_loaded_total The total number of classes that have been loaded since the JVM has started execution +# TYPE jvm_classes_loaded_total counter +jvm_classes_loaded_total 9168.0 +# HELP jvm_classes_unloaded_total The total number of classes that have been unloaded since the JVM has started execution +# TYPE jvm_classes_unloaded_total counter +jvm_classes_unloaded_total 0.0 +# HELP jvm_memory_pool_allocated_bytes_created Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously. +# TYPE jvm_memory_pool_allocated_bytes_created gauge +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'profiled nmethods'",} 1.725364266616E9 +jvm_memory_pool_allocated_bytes_created{pool="G1 Old Gen",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="G1 Eden Space",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-profiled nmethods'",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="G1 Survivor Space",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="Compressed Class Space",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="Metaspace",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-nmethods'",} 1.725364266619E9 \ No newline at end of file diff --git a/docs/en/seatunnel-engine/telemetry/openmetrics.txt b/docs/en/seatunnel-engine/telemetry/openmetrics.txt new file mode 100644 index 00000000000..cf34553c51c --- /dev/null +++ b/docs/en/seatunnel-engine/telemetry/openmetrics.txt @@ -0,0 +1,295 @@ +# TYPE jvm_buffer_pool_used_bytes gauge +# HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool. +jvm_buffer_pool_used_bytes{pool="mapped"} 0.0 +jvm_buffer_pool_used_bytes{pool="direct"} 414142.0 +# TYPE jvm_buffer_pool_capacity_bytes gauge +# HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool. +jvm_buffer_pool_capacity_bytes{pool="mapped"} 0.0 +jvm_buffer_pool_capacity_bytes{pool="direct"} 414139.0 +# TYPE jvm_buffer_pool_used_buffers gauge +# HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool. +jvm_buffer_pool_used_buffers{pool="mapped"} 0.0 +jvm_buffer_pool_used_buffers{pool="direct"} 7.0 +# TYPE jvm_gc_collection_seconds summary +# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds. +jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 6.0 +jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 0.047 +jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0 +jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0 +# TYPE jvm_memory_objects_pending_finalization gauge +# HELP jvm_memory_objects_pending_finalization The number of objects waiting in the finalizer queue. +jvm_memory_objects_pending_finalization 0.0 +# TYPE jvm_memory_bytes_used gauge +# HELP jvm_memory_bytes_used Used bytes of a given JVM memory area. +jvm_memory_bytes_used{area="heap"} 8.0584592E7 +jvm_memory_bytes_used{area="nonheap"} 7.2669072E7 +# TYPE jvm_memory_bytes_committed gauge +# HELP jvm_memory_bytes_committed Committed (bytes) of a given JVM memory area. +jvm_memory_bytes_committed{area="heap"} 5.36870912E8 +jvm_memory_bytes_committed{area="nonheap"} 7.7529088E7 +# TYPE jvm_memory_bytes_max gauge +# HELP jvm_memory_bytes_max Max (bytes) of a given JVM memory area. +jvm_memory_bytes_max{area="heap"} 8.589934592E9 +jvm_memory_bytes_max{area="nonheap"} -1.0 +# TYPE jvm_memory_bytes_init gauge +# HELP jvm_memory_bytes_init Initial bytes of a given JVM memory area. +jvm_memory_bytes_init{area="heap"} 5.36870912E8 +jvm_memory_bytes_init{area="nonheap"} 7667712.0 +# TYPE jvm_memory_pool_bytes_used gauge +# HELP jvm_memory_pool_bytes_used Used bytes of a given JVM memory pool. +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-nmethods'"} 1307520.0 +jvm_memory_pool_bytes_used{pool="Metaspace"} 4.9582016E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'profiled nmethods'"} 1.2312704E7 +jvm_memory_pool_bytes_used{pool="Compressed Class Space"} 6124368.0 +jvm_memory_pool_bytes_used{pool="G1 Eden Space"} 5.0331648E7 +jvm_memory_pool_bytes_used{pool="G1 Old Gen"} 1.3475728E7 +jvm_memory_pool_bytes_used{pool="G1 Survivor Space"} 1.6777216E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-profiled nmethods'"} 3342464.0 +# TYPE jvm_memory_pool_bytes_committed gauge +# HELP jvm_memory_pool_bytes_committed Committed bytes of a given JVM memory pool. +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-nmethods'"} 2555904.0 +jvm_memory_pool_bytes_committed{pool="Metaspace"} 5.2035584E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'profiled nmethods'"} 1.2320768E7 +jvm_memory_pool_bytes_committed{pool="Compressed Class Space"} 7208960.0 +jvm_memory_pool_bytes_committed{pool="G1 Eden Space"} 3.20864256E8 +jvm_memory_pool_bytes_committed{pool="G1 Old Gen"} 1.9922944E8 +jvm_memory_pool_bytes_committed{pool="G1 Survivor Space"} 1.6777216E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-profiled nmethods'"} 3407872.0 +# TYPE jvm_memory_pool_bytes_max gauge +# HELP jvm_memory_pool_bytes_max Max bytes of a given JVM memory pool. +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-nmethods'"} 5849088.0 +jvm_memory_pool_bytes_max{pool="Metaspace"} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'profiled nmethods'"} 1.22896384E8 +jvm_memory_pool_bytes_max{pool="Compressed Class Space"} 1.073741824E9 +jvm_memory_pool_bytes_max{pool="G1 Eden Space"} -1.0 +jvm_memory_pool_bytes_max{pool="G1 Old Gen"} 8.589934592E9 +jvm_memory_pool_bytes_max{pool="G1 Survivor Space"} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-profiled nmethods'"} 1.22912768E8 +# TYPE jvm_memory_pool_bytes_init gauge +# HELP jvm_memory_pool_bytes_init Initial bytes of a given JVM memory pool. +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-nmethods'"} 2555904.0 +jvm_memory_pool_bytes_init{pool="Metaspace"} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'profiled nmethods'"} 2555904.0 +jvm_memory_pool_bytes_init{pool="Compressed Class Space"} 0.0 +jvm_memory_pool_bytes_init{pool="G1 Eden Space"} 2.7262976E7 +jvm_memory_pool_bytes_init{pool="G1 Old Gen"} 5.09607936E8 +jvm_memory_pool_bytes_init{pool="G1 Survivor Space"} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-profiled nmethods'"} 2555904.0 +# TYPE jvm_memory_pool_collection_used_bytes gauge +# HELP jvm_memory_pool_collection_used_bytes Used bytes after last collection of a given JVM memory pool. +jvm_memory_pool_collection_used_bytes{pool="G1 Eden Space"} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Old Gen"} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Survivor Space"} 1.6777216E7 +# TYPE jvm_memory_pool_collection_committed_bytes gauge +# HELP jvm_memory_pool_collection_committed_bytes Committed after last collection bytes of a given JVM memory pool. +jvm_memory_pool_collection_committed_bytes{pool="G1 Eden Space"} 3.20864256E8 +jvm_memory_pool_collection_committed_bytes{pool="G1 Old Gen"} 0.0 +jvm_memory_pool_collection_committed_bytes{pool="G1 Survivor Space"} 1.6777216E7 +# TYPE jvm_memory_pool_collection_max_bytes gauge +# HELP jvm_memory_pool_collection_max_bytes Max bytes after last collection of a given JVM memory pool. +jvm_memory_pool_collection_max_bytes{pool="G1 Eden Space"} -1.0 +jvm_memory_pool_collection_max_bytes{pool="G1 Old Gen"} 8.589934592E9 +jvm_memory_pool_collection_max_bytes{pool="G1 Survivor Space"} -1.0 +# TYPE jvm_memory_pool_collection_init_bytes gauge +# HELP jvm_memory_pool_collection_init_bytes Initial after last collection bytes of a given JVM memory pool. +jvm_memory_pool_collection_init_bytes{pool="G1 Eden Space"} 2.7262976E7 +jvm_memory_pool_collection_init_bytes{pool="G1 Old Gen"} 5.09607936E8 +jvm_memory_pool_collection_init_bytes{pool="G1 Survivor Space"} 0.0 +# TYPE job_thread_pool_activeCount gauge +# HELP job_thread_pool_activeCount The activeCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_activeCount{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_completedTask counter +# HELP job_thread_pool_completedTask The completedTask of seatunnel coordinator job's executor cached thread pool +job_thread_pool_completedTask_total{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE job_thread_pool_corePoolSize gauge +# HELP job_thread_pool_corePoolSize The corePoolSize of seatunnel coordinator job's executor cached thread pool +job_thread_pool_corePoolSize{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_maximumPoolSize gauge +# HELP job_thread_pool_maximumPoolSize The maximumPoolSize of seatunnel coordinator job's executor cached thread pool +job_thread_pool_maximumPoolSize{cluster="seatunnel",address="127.0.0.1:5801"} 2.147483647E9 +# TYPE job_thread_pool_poolSize gauge +# HELP job_thread_pool_poolSize The poolSize of seatunnel coordinator job's executor cached thread pool +job_thread_pool_poolSize{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_task counter +# HELP job_thread_pool_task The taskCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_task_total{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE job_thread_pool_queueTaskCount gauge +# HELP job_thread_pool_queueTaskCount The queueTaskCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_queueTaskCount{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_rejection counter +# HELP job_thread_pool_rejection The rejectionCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_rejection_total{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE jvm_memory_pool_allocated_bytes counter +# HELP jvm_memory_pool_allocated_bytes Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously. +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'profiled nmethods'"} 1.1970688E7 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'profiled nmethods'"} 1.725364266616E9 +jvm_memory_pool_allocated_bytes_total{pool="G1 Old Gen"} 1.3475728E7 +jvm_memory_pool_allocated_bytes_created{pool="G1 Old Gen"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="G1 Eden Space"} 1.61480704E8 +jvm_memory_pool_allocated_bytes_created{pool="G1 Eden Space"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-profiled nmethods'"} 3166720.0 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-profiled nmethods'"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="G1 Survivor Space"} 1.6777216E7 +jvm_memory_pool_allocated_bytes_created{pool="G1 Survivor Space"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space"} 6084208.0 +jvm_memory_pool_allocated_bytes_created{pool="Compressed Class Space"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="Metaspace"} 4.927032E7 +jvm_memory_pool_allocated_bytes_created{pool="Metaspace"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-nmethods'"} 1303936.0 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-nmethods'"} 1.725364266619E9 +# TYPE jvm_threads_current gauge +# HELP jvm_threads_current Current thread count of a JVM +jvm_threads_current 114.0 +# TYPE jvm_threads_daemon gauge +# HELP jvm_threads_daemon Daemon thread count of a JVM +jvm_threads_daemon 10.0 +# TYPE jvm_threads_peak gauge +# HELP jvm_threads_peak Peak thread count of a JVM +jvm_threads_peak 124.0 +# TYPE jvm_threads_started counter +# HELP jvm_threads_started Started thread count of a JVM +jvm_threads_started_total 140.0 +# TYPE jvm_threads_deadlocked gauge +# HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers +jvm_threads_deadlocked 0.0 +# TYPE jvm_threads_deadlocked_monitor gauge +# HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors +jvm_threads_deadlocked_monitor 0.0 +# TYPE jvm_threads_state gauge +# HELP jvm_threads_state Current count of threads by state +jvm_threads_state{state="NEW"} 0.0 +jvm_threads_state{state="TERMINATED"} 0.0 +jvm_threads_state{state="RUNNABLE"} 12.0 +jvm_threads_state{state="BLOCKED"} 0.0 +jvm_threads_state{state="WAITING"} 80.0 +jvm_threads_state{state="TIMED_WAITING"} 22.0 +jvm_threads_state{state="UNKNOWN"} 0.0 +# TYPE cluster_info gauge +# HELP cluster_info Cluster info +cluster_info{cluster="seatunnel",hazelcastVersion="5.1",master="127.0.0.1:5801"} 1.0 +# TYPE cluster_time gauge +# HELP cluster_time Cluster start time +cluster_time{cluster="seatunnel",hazelcastVersion="5.1"} 1.725364506292E12 +# TYPE node_count gauge +# HELP node_count Cluster node total count +node_count{cluster="seatunnel"} 1.0 +# TYPE process_cpu_seconds counter +# HELP process_cpu_seconds Total user and system CPU time spent in seconds. +process_cpu_seconds_total 16.267225 +# TYPE process_start_time_seconds gauge +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +process_start_time_seconds 1.725363614623E9 +# TYPE process_open_fds gauge +# HELP process_open_fds Number of open file descriptors. +process_open_fds 162.0 +# TYPE process_max_fds gauge +# HELP process_max_fds Maximum number of open file descriptors. +process_max_fds 10240.0 +# TYPE job_count gauge +# HELP job_count All job counts of seatunnel cluster +job_count{cluster="seatunnel",type="canceled"} 0.0 +job_count{cluster="seatunnel",type="cancelling"} 0.0 +job_count{cluster="seatunnel",type="created"} 0.0 +job_count{cluster="seatunnel",type="failed"} 0.0 +job_count{cluster="seatunnel",type="failing"} 0.0 +job_count{cluster="seatunnel",type="finished"} 0.0 +job_count{cluster="seatunnel",type="running"} 0.0 +job_count{cluster="seatunnel",type="scheduled"} 0.0 +# TYPE node_state gauge +# HELP node_state Whether is up of seatunnel node +node_state{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE hazelcast_executor_executedCount gauge +# HELP hazelcast_executor_executedCount The hazelcast executor executedCount of seatunnel cluster node +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 221.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 16133.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_isShutdown gauge +# HELP hazelcast_executor_isShutdown The hazelcast executor isShutdown of seatunnel cluster node +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_isTerminated gauge +# HELP hazelcast_executor_isTerminated The hazelcast executor isTerminated of seatunnel cluster node +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_maxPoolSize gauge +# HELP hazelcast_executor_maxPoolSize The hazelcast executor maxPoolSize of seatunnel cluster node +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 200.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 16.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 20.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 10.0 +# TYPE hazelcast_executor_poolSize gauge +# HELP hazelcast_executor_poolSize The hazelcast executor poolSize of seatunnel cluster node +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_queueRemainingCapacity gauge +# HELP hazelcast_executor_queueRemainingCapacity The hazelcast executor queueRemainingCapacity of seatunnel cluster +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 2.147483647E9 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 2.147483647E9 +# TYPE hazelcast_executor_queueSize gauge +# HELP hazelcast_executor_queueSize The hazelcast executor queueSize of seatunnel cluster node +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_partition_partitionCount gauge +# HELP hazelcast_partition_partitionCount The partitionCount of seatunnel cluster node +hazelcast_partition_partitionCount{cluster="seatunnel",address="127.0.0.1:5801"} 271.0 +# TYPE hazelcast_partition_activePartition gauge +# HELP hazelcast_partition_activePartition The activePartition of seatunnel cluster node +hazelcast_partition_activePartition{cluster="seatunnel",address="127.0.0.1:5801"} 271.0 +# TYPE hazelcast_partition_isClusterSafe gauge +# HELP hazelcast_partition_isClusterSafe Whether is cluster safe of partition +hazelcast_partition_isClusterSafe{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE hazelcast_partition_isLocalMemberSafe gauge +# HELP hazelcast_partition_isLocalMemberSafe Whether is local member safe of partition +hazelcast_partition_isLocalMemberSafe{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE jvm info +# HELP jvm VM version info +jvm_info{runtime="OpenJDK Runtime Environment",vendor="Azul Systems, Inc.",version="11.0.13+8-LTS"} 1.0 +# TYPE jvm_classes_currently_loaded gauge +# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM +jvm_classes_currently_loaded 9168.0 +# TYPE jvm_classes_loaded counter +# HELP jvm_classes_loaded The total number of classes that have been loaded since the JVM has started execution +jvm_classes_loaded_total 9168.0 +# TYPE jvm_classes_unloaded counter +# HELP jvm_classes_unloaded The total number of classes that have been unloaded since the JVM has started execution +jvm_classes_unloaded_total 0.0 +# EOF \ No newline at end of file diff --git a/docs/images/grafana.png b/docs/images/grafana.png new file mode 100644 index 00000000000..4aca529a05b Binary files /dev/null and b/docs/images/grafana.png differ diff --git a/docs/sidebars.js b/docs/sidebars.js index 9f717d28aa2..ed21dcc5629 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -202,7 +202,8 @@ const sidebars = { "seatunnel-engine/tcp", "seatunnel-engine/resource-isolation", "seatunnel-engine/rest-api", - "seatunnel-engine/user-command" + "seatunnel-engine/user-command", + "seatunnel-engine/telemetry" ] }, { diff --git a/docs/zh/seatunnel-engine/telemetry.md b/docs/zh/seatunnel-engine/telemetry.md new file mode 100644 index 00000000000..0726ff606ab --- /dev/null +++ b/docs/zh/seatunnel-engine/telemetry.md @@ -0,0 +1,151 @@ +--- +sidebar_position: 13 +--- + +# Telemetry + +通过 `Prometheus-exports` 集成 `Metrices` 可以更好地与相关的监控平台(如 Prometheus 和 Grafana)无缝衔接,提高对 SeaTunnel +集群的监控和告警能力。 + +您可以在 `seatunnel.yaml` 文件中配置监控的相关设置。 + +以下是一个声明式配置的示例。 + +```yaml +seatunnel: + engine: + telemetry: + metric: + enabled: true +``` + +## 指标 + +Prometheus 的[指标文本](./telemetry/metrics.txt),获取方式为 `http:{instanceHost}:5801/hazelcast/rest/instance/metrics`。 + +OpenMetrics 的[指标文本](./telemetry/openmetrics.txt) +,获取方式为 `http:{instanceHost}:5801/hazelcast/rest/instance/openmetrics`。 + +可用的指标包括以下类别。 + +注意:所有指标都有相同的标签名 `cluster`,其值为 `hazelcast.cluster-name` 的配置。 + +### 节点指标 + +| MetricName | Type | Labels | 描述 | +|-------------------------------------------|-------|------------------------------------------------------------------------------------------------------------|-------------------------------------| +| cluster_info | Gauge | **hazelcastVersion**,hazelcast 的版本。**master**,seatunnel 主地址。 | 集群信息 | +| cluster_time | Gauge | **hazelcastVersion**,hazelcast 的版本。 | 集群时间 | +| node_count | Gauge | - | 集群节点总数 | +| node_state | Gauge | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 节点是否正常 | +| hazelcast_executor_executedCount | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器执行次数 | +| hazelcast_executor_isShutdown | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器是否关闭 | +| hazelcast_executor_isTerminated | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器是否终止 | +| hazelcast_executor_maxPoolSize | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器最大池大小 | +| hazelcast_executor_poolSize | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器当前池大小 | +| hazelcast_executor_queueRemainingCapacity | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器剩余队列容量 | +| hazelcast_executor_queueSize | Gauge | **type**,执行器的类型,包括:"async" "client" "clientBlocking" "clientQuery" "io" "offloadable" "scheduled" "system" | seatunnel 集群节点的 hazelcast 执行器当前队列大小 | +| hazelcast_partition_partitionCount | Gauge | - | seatunnel 集群节点的分区数量 | +| hazelcast_partition_activePartition | Gauge | - | seatunnel 集群节点的活跃分区数量 | +| hazelcast_partition_isClusterSafe | Gauge | - | 分区是否安全 | +| hazelcast_partition_isLocalMemberSafe | Gauge | - | 本地成员是否安全 | + +### 线程池状态 + +| MetricName | Type | Labels | 描述 | +|-------------------------------------|---------|-----------------------------------------|--------------------------------| +| job_thread_pool_activeCount | Gauge | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的活动线程数 | +| job_thread_pool_corePoolSize | Gauge | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的核心池大小 | +| job_thread_pool_maximumPoolSize | Gauge | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的最大池大小 | +| job_thread_pool_poolSize | Gauge | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的当前池大小 | +| job_thread_pool_queueTaskCount | Gauge | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的队列任务数 | +| job_thread_pool_completedTask_total | Counter | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的完成任务数 | +| job_thread_pool_task_total | Counter | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的总任务数 | +| job_thread_pool_rejection_total | Counter | **address**,服务器实例地址,例如:"127.0.0.1:5801" | seatunnel 协调器作业执行器缓存线程池的拒绝任务总数 | + +### 作业信息详细 + +| MetricName | Type | Labels | 描述 | +|------------|-------|---------------------------------------------------------------------------------------------------------|---------------------| +| job_count | Gauge | **type**,作业的类型,包括:"canceled" "cancelling" "created" "failed" "failing" "finished" "running" "scheduled" | seatunnel 集群的所有作业计数 | + +### JVM 指标 + +| MetricName | Type | Labels | 描述 | +|--------------------------------------------|---------|---------------------------------------------------------------------------------------------------------------|----------------------------------------| +| jvm_threads_current | Gauge | - | JVM 的当前线程数 | +| jvm_threads_daemon | Gauge | - | JVM 的守护线程数 | +| jvm_threads_peak | Gauge | - | JVM 的峰值线程数 | +| jvm_threads_started_total | Counter | - | JVM 启动的线程总数 | +| jvm_threads_deadlocked | Gauge | - | JVM 线程在等待获取对象监视器或拥有的可拥有同步器时处于死锁状态的周期数 | +| jvm_threads_deadlocked_monitor | Gauge | - | JVM 线程在等待获取对象监视器时处于死锁状态的周期数 | +| jvm_threads_state | Gauge | **state**,JVM 线程的状态,包括:"NEW" "TERMINATED" "RUNNABLE" "BLOCKED" "WAITING" "TIMED_WAITING" "UNKNOWN" | 按状态分类的线程当前计数 | +| jvm_classes_currently_loaded | Gauge | - | JVM 中当前加载的类的数量 | +| jvm_classes_loaded_total | Counter | - | 自 JVM 开始执行以来加载的类的总数 | +| jvm_classes_unloaded_total | Counter | - | 自 JVM 开始执行以来卸载的类的总数 | +| jvm_memory_pool_allocated_bytes_total | Counter | **pool**,包括:"Code Cache" "PS Eden Space" "PS Old Gen" "PS Survivor Space" "Compressed Class Space" "Metaspace" | 在给定 JVM 内存池中分配的总字节数。仅在垃圾收集后更新,而不是持续更新。 | +| jvm_gc_collection_seconds_count | Summary | **gc**,包括:"PS Scavenge" "PS MarkSweep" | 在给定 JVM 垃圾收集器中花费的时间(以秒为单位) | +| jvm_gc_collection_seconds_sum | Summary | **gc**,包括:"PS Scavenge" "PS MarkSweep" | 在给定 JVM 垃圾收集器中花费的时间(以秒为单位) +| jvm_info | Gauge | **runtime**,例如:“Java(TM) SE Runtime Environment”。**供应商**,例如:“Oracle Corporation”。**版本**,例如:“1.8.0_212-b10” | VM 版本信息 | +| process_cpu_seconds_total | Counter | - | 用户和系统 CPU 时间总计,以秒为单位 | +| process_start_time_seconds | Gauge | - | 进程自 Unix 纪元以来的启动时间,以秒为单位 | +| process_open_fds | Gauge | - | 打开的文件描述符数量 | +| process_max_fds | Gauge | - | 最大打开的文件描述符数量 | +| jvm_memory_objects_pending_finalization | Gauge | - | 等待最终化队列中的对象数量 | +| jvm_memory_bytes_used | Gauge | **area**,包括: "heap" "noheap" | 给定 JVM 内存区域使用的字节数 | +| jvm_memory_bytes_committed | Gauge | **area**,包括: "heap" "noheap" | 给定 JVM 内存区域的提交字节数 | +| jvm_memory_bytes_max | Gauge | **area**,包括: "heap" "noheap" | 给定 JVM 内存区域的最大字节数 | +| jvm_memory_bytes_init | Gauge | **area**,包括: "heap" "noheap" | 给定 JVM 内存区域的初始字节数 | +| jvm_memory_pool_bytes_used | Gauge | **pool**,包括:"Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | 给定 JVM 内存池使用的字节数 | +| jvm_memory_pool_bytes_committed | Gauge | **pool**,包括:"Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | 给定 JVM 内存池的提交字节数 | +| jvm_memory_pool_bytes_max | Gauge | **pool**,包括:"Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | 给定 JVM 内存池的最大字节数 | +| jvm_memory_pool_bytes_init | Gauge | **pool**,包括:"Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | 给定 JVM 内存池的初始字节数 | +| jvm_memory_pool_allocated_bytes_created | Gauge | **pool**,包括:"Code Cache" "PS Eden Space" "PS Old Ge" "PS Survivor Space" "Compressed Class Space" "Metaspace" | 给定 JVM 内存池中创建的总字节数。仅在 GC 后更新,而不是持续更新 | +| jvm_memory_pool_collection_used_bytes | Gauge | **pool**,包括:"PS Eden Space" "PS Old Ge" "PS Survivor Space" | 给定 JVM 内存池在最后一次回收后的使用字节数 | +| jvm_memory_pool_collection_committed_bytes | Gauge | **pool**,包括:"PS Eden Space" "PS Old Ge" "PS Survivor Space" | 给定 JVM 内存池在最后一次回收后的提交字节数 | +| jvm_memory_pool_collection_max_bytes | Gauge | **pool**,包括:"PS Eden Space" "PS Old Ge" "PS Survivor Space" | 给定 JVM 内存池在最后一次回收后的最大字节数 | +| jvm_memory_pool_collection_init_bytes | Gauge | **pool**,包括:"PS Eden Space" "PS Old Ge" "PS Survivor Space" | 给定 JVM 内存池在最后一次回收后的初始字节数 | +| jvm_buffer_pool_used_bytes | Gauge | **pool**,包括:"direct" "mapped" | 给定 JVM 缓冲池使用的字节数 | +| jvm_buffer_pool_capacity_bytes | Gauge | **pool**,包括:"direct" "mapped" | 给定 JVM 缓冲池的字节容量 | +| jvm_buffer_pool_used_buffers | Gauge | **pool**,包括:"direct" "mapped" | 给定 JVM 缓冲池使用的缓冲区 | + +## 通过 Prometheus 和 Grafana 进行集群监控 + +### 安装 Prometheus + +有关如何设置 Prometheus 服务器的指南,请访问 +[安装](https://prometheus.io/docs/prometheus/latest/installation) + +### 配置 Prometheus + +将 SeaTunnel 实例指标导出添加到 `/etc/prometheus/prometheus.yaml` 中。例如: + +```yaml +global: + # 从此作业中抓取目标的频率。 + scrape_interval: 15s +scrape_configs: + # 默认分配给抓取指标的作业名称。 + - job_name: 'seatunnel' + scrape_interval: 5s + # 指标导出路径 + metrics_path: /hazelcast/rest/instance/metrics + # 此作业静态配置的目标列表。 + static_configs: + # 静态配置中指定的目标。 + - targets: [ 'localhost:5801' ] + # 为从目标抓取的所有指标分配的标签。 + # labels: [:] +``` + +### 安装 Grafana + +有关如何设置 Grafana 服务器的指南,请访问 +[安装](https://grafana.com/docs/grafana/latest/setup-grafana/installation) + +#### 监控仪表板 + +- 在 Grafana 中添加 Prometheus 数据源。 +- 将 `Seatunnel Cluster` 监控仪表板导入到 Grafana 中,使用 [仪表板 JSON](./telemetry/grafana-dashboard.json)。 + +监控[效果图](../../images/grafana.png) \ No newline at end of file diff --git a/docs/zh/seatunnel-engine/telemetry/grafana-dashboard.json b/docs/zh/seatunnel-engine/telemetry/grafana-dashboard.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/docs/zh/seatunnel-engine/telemetry/metrics.txt b/docs/zh/seatunnel-engine/telemetry/metrics.txt new file mode 100644 index 00000000000..25dc805602b --- /dev/null +++ b/docs/zh/seatunnel-engine/telemetry/metrics.txt @@ -0,0 +1,296 @@ +# HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool. +# TYPE jvm_buffer_pool_used_bytes gauge +jvm_buffer_pool_used_bytes{pool="mapped",} 0.0 +jvm_buffer_pool_used_bytes{pool="direct",} 414142.0 +# HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool. +# TYPE jvm_buffer_pool_capacity_bytes gauge +jvm_buffer_pool_capacity_bytes{pool="mapped",} 0.0 +jvm_buffer_pool_capacity_bytes{pool="direct",} 414139.0 +# HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool. +# TYPE jvm_buffer_pool_used_buffers gauge +jvm_buffer_pool_used_buffers{pool="mapped",} 0.0 +jvm_buffer_pool_used_buffers{pool="direct",} 7.0 +# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds. +# TYPE jvm_gc_collection_seconds summary +jvm_gc_collection_seconds_count{gc="G1 Young Generation",} 6.0 +jvm_gc_collection_seconds_sum{gc="G1 Young Generation",} 0.047 +jvm_gc_collection_seconds_count{gc="G1 Old Generation",} 0.0 +jvm_gc_collection_seconds_sum{gc="G1 Old Generation",} 0.0 +# HELP jvm_memory_objects_pending_finalization The number of objects waiting in the finalizer queue. +# TYPE jvm_memory_objects_pending_finalization gauge +jvm_memory_objects_pending_finalization 0.0 +# HELP jvm_memory_bytes_used Used bytes of a given JVM memory area. +# TYPE jvm_memory_bytes_used gauge +jvm_memory_bytes_used{area="heap",} 8.4778896E7 +jvm_memory_bytes_used{area="nonheap",} 7.2728624E7 +# HELP jvm_memory_bytes_committed Committed (bytes) of a given JVM memory area. +# TYPE jvm_memory_bytes_committed gauge +jvm_memory_bytes_committed{area="heap",} 5.36870912E8 +jvm_memory_bytes_committed{area="nonheap",} 7.7594624E7 +# HELP jvm_memory_bytes_max Max (bytes) of a given JVM memory area. +# TYPE jvm_memory_bytes_max gauge +jvm_memory_bytes_max{area="heap",} 8.589934592E9 +jvm_memory_bytes_max{area="nonheap",} -1.0 +# HELP jvm_memory_bytes_init Initial bytes of a given JVM memory area. +# TYPE jvm_memory_bytes_init gauge +jvm_memory_bytes_init{area="heap",} 5.36870912E8 +jvm_memory_bytes_init{area="nonheap",} 7667712.0 +# HELP jvm_memory_pool_bytes_used Used bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_used gauge +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-nmethods'",} 1307520.0 +jvm_memory_pool_bytes_used{pool="Metaspace",} 4.9585376E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'profiled nmethods'",} 1.2327296E7 +jvm_memory_pool_bytes_used{pool="Compressed Class Space",} 6124368.0 +jvm_memory_pool_bytes_used{pool="G1 Eden Space",} 5.4525952E7 +jvm_memory_pool_bytes_used{pool="G1 Old Gen",} 1.3475728E7 +jvm_memory_pool_bytes_used{pool="G1 Survivor Space",} 1.6777216E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-profiled nmethods'",} 3384064.0 +# HELP jvm_memory_pool_bytes_committed Committed bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_committed gauge +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-nmethods'",} 2555904.0 +jvm_memory_pool_bytes_committed{pool="Metaspace",} 5.2035584E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'profiled nmethods'",} 1.2386304E7 +jvm_memory_pool_bytes_committed{pool="Compressed Class Space",} 7208960.0 +jvm_memory_pool_bytes_committed{pool="G1 Eden Space",} 3.20864256E8 +jvm_memory_pool_bytes_committed{pool="G1 Old Gen",} 1.9922944E8 +jvm_memory_pool_bytes_committed{pool="G1 Survivor Space",} 1.6777216E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-profiled nmethods'",} 3407872.0 +# HELP jvm_memory_pool_bytes_max Max bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_max gauge +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-nmethods'",} 5849088.0 +jvm_memory_pool_bytes_max{pool="Metaspace",} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'profiled nmethods'",} 1.22896384E8 +jvm_memory_pool_bytes_max{pool="Compressed Class Space",} 1.073741824E9 +jvm_memory_pool_bytes_max{pool="G1 Eden Space",} -1.0 +jvm_memory_pool_bytes_max{pool="G1 Old Gen",} 8.589934592E9 +jvm_memory_pool_bytes_max{pool="G1 Survivor Space",} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-profiled nmethods'",} 1.22912768E8 +# HELP jvm_memory_pool_bytes_init Initial bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_bytes_init gauge +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-nmethods'",} 2555904.0 +jvm_memory_pool_bytes_init{pool="Metaspace",} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'profiled nmethods'",} 2555904.0 +jvm_memory_pool_bytes_init{pool="Compressed Class Space",} 0.0 +jvm_memory_pool_bytes_init{pool="G1 Eden Space",} 2.7262976E7 +jvm_memory_pool_bytes_init{pool="G1 Old Gen",} 5.09607936E8 +jvm_memory_pool_bytes_init{pool="G1 Survivor Space",} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-profiled nmethods'",} 2555904.0 +# HELP jvm_memory_pool_collection_used_bytes Used bytes after last collection of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_used_bytes gauge +jvm_memory_pool_collection_used_bytes{pool="G1 Eden Space",} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Old Gen",} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Survivor Space",} 1.6777216E7 +# HELP jvm_memory_pool_collection_committed_bytes Committed after last collection bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_committed_bytes gauge +jvm_memory_pool_collection_committed_bytes{pool="G1 Eden Space",} 3.20864256E8 +jvm_memory_pool_collection_committed_bytes{pool="G1 Old Gen",} 0.0 +jvm_memory_pool_collection_committed_bytes{pool="G1 Survivor Space",} 1.6777216E7 +# HELP jvm_memory_pool_collection_max_bytes Max bytes after last collection of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_max_bytes gauge +jvm_memory_pool_collection_max_bytes{pool="G1 Eden Space",} -1.0 +jvm_memory_pool_collection_max_bytes{pool="G1 Old Gen",} 8.589934592E9 +jvm_memory_pool_collection_max_bytes{pool="G1 Survivor Space",} -1.0 +# HELP jvm_memory_pool_collection_init_bytes Initial after last collection bytes of a given JVM memory pool. +# TYPE jvm_memory_pool_collection_init_bytes gauge +jvm_memory_pool_collection_init_bytes{pool="G1 Eden Space",} 2.7262976E7 +jvm_memory_pool_collection_init_bytes{pool="G1 Old Gen",} 5.09607936E8 +jvm_memory_pool_collection_init_bytes{pool="G1 Survivor Space",} 0.0 +# HELP job_thread_pool_activeCount The activeCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_activeCount gauge +job_thread_pool_activeCount{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_completedTask_total The completedTask of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_completedTask_total counter +job_thread_pool_completedTask_total{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP job_thread_pool_corePoolSize The corePoolSize of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_corePoolSize gauge +job_thread_pool_corePoolSize{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_maximumPoolSize The maximumPoolSize of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_maximumPoolSize gauge +job_thread_pool_maximumPoolSize{cluster="seatunnel",address="127.0.0.1:5801",} 2.147483647E9 +# HELP job_thread_pool_poolSize The poolSize of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_poolSize gauge +job_thread_pool_poolSize{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_task_total The taskCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_task_total counter +job_thread_pool_task_total{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP job_thread_pool_queueTaskCount The queueTaskCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_queueTaskCount gauge +job_thread_pool_queueTaskCount{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP job_thread_pool_rejection_total The rejectionCount of seatunnel coordinator job's executor cached thread pool +# TYPE job_thread_pool_rejection_total counter +job_thread_pool_rejection_total{cluster="seatunnel",address="127.0.0.1:5801",} 0.0 +# HELP jvm_memory_pool_allocated_bytes_total Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously. +# TYPE jvm_memory_pool_allocated_bytes_total counter +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'profiled nmethods'",} 1.1970688E7 +jvm_memory_pool_allocated_bytes_total{pool="G1 Old Gen",} 1.3475728E7 +jvm_memory_pool_allocated_bytes_total{pool="G1 Eden Space",} 1.61480704E8 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-profiled nmethods'",} 3166720.0 +jvm_memory_pool_allocated_bytes_total{pool="G1 Survivor Space",} 1.6777216E7 +jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space",} 6084208.0 +jvm_memory_pool_allocated_bytes_total{pool="Metaspace",} 4.927032E7 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-nmethods'",} 1303936.0 +# HELP jvm_threads_current Current thread count of a JVM +# TYPE jvm_threads_current gauge +jvm_threads_current 114.0 +# HELP jvm_threads_daemon Daemon thread count of a JVM +# TYPE jvm_threads_daemon gauge +jvm_threads_daemon 10.0 +# HELP jvm_threads_peak Peak thread count of a JVM +# TYPE jvm_threads_peak gauge +jvm_threads_peak 124.0 +# HELP jvm_threads_started_total Started thread count of a JVM +# TYPE jvm_threads_started_total counter +jvm_threads_started_total 140.0 +# HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers +# TYPE jvm_threads_deadlocked gauge +jvm_threads_deadlocked 0.0 +# HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors +# TYPE jvm_threads_deadlocked_monitor gauge +jvm_threads_deadlocked_monitor 0.0 +# HELP jvm_threads_state Current count of threads by state +# TYPE jvm_threads_state gauge +jvm_threads_state{state="NEW",} 0.0 +jvm_threads_state{state="TERMINATED",} 0.0 +jvm_threads_state{state="RUNNABLE",} 12.0 +jvm_threads_state{state="BLOCKED",} 0.0 +jvm_threads_state{state="WAITING",} 80.0 +jvm_threads_state{state="TIMED_WAITING",} 22.0 +jvm_threads_state{state="UNKNOWN",} 0.0 +# HELP cluster_info Cluster info +# TYPE cluster_info gauge +cluster_info{cluster="seatunnel",hazelcastVersion="5.1",master="127.0.0.1:5801",} 1.0 +# HELP cluster_time Cluster start time +# TYPE cluster_time gauge +cluster_time{cluster="seatunnel",hazelcastVersion="5.1",} 1.725364524614E12 +# HELP node_count Cluster node total count +# TYPE node_count gauge +node_count{cluster="seatunnel",} 1.0 +# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. +# TYPE process_cpu_seconds_total counter +process_cpu_seconds_total 16.511054 +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +# TYPE process_start_time_seconds gauge +process_start_time_seconds 1.725363614623E9 +# HELP process_open_fds Number of open file descriptors. +# TYPE process_open_fds gauge +process_open_fds 162.0 +# HELP process_max_fds Maximum number of open file descriptors. +# TYPE process_max_fds gauge +process_max_fds 10240.0 +# HELP job_count All job counts of seatunnel cluster +# TYPE job_count gauge +job_count{cluster="seatunnel",type="canceled",} 0.0 +job_count{cluster="seatunnel",type="cancelling",} 0.0 +job_count{cluster="seatunnel",type="created",} 0.0 +job_count{cluster="seatunnel",type="failed",} 0.0 +job_count{cluster="seatunnel",type="failing",} 0.0 +job_count{cluster="seatunnel",type="finished",} 0.0 +job_count{cluster="seatunnel",type="running",} 0.0 +job_count{cluster="seatunnel",type="scheduled",} 0.0 +# HELP node_state Whether is up of seatunnel node +# TYPE node_state gauge +node_state{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP hazelcast_executor_executedCount The hazelcast executor executedCount of seatunnel cluster node +# TYPE hazelcast_executor_executedCount gauge +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 224.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 16469.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_isShutdown The hazelcast executor isShutdown of seatunnel cluster node +# TYPE hazelcast_executor_isShutdown gauge +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_isTerminated The hazelcast executor isTerminated of seatunnel cluster node +# TYPE hazelcast_executor_isTerminated gauge +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_maxPoolSize The hazelcast executor maxPoolSize of seatunnel cluster node +# TYPE hazelcast_executor_maxPoolSize gauge +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 200.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 16.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 20.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 10.0 +# HELP hazelcast_executor_poolSize The hazelcast executor poolSize of seatunnel cluster node +# TYPE hazelcast_executor_poolSize gauge +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_executor_queueRemainingCapacity The hazelcast executor queueRemainingCapacity of seatunnel cluster +# TYPE hazelcast_executor_queueRemainingCapacity gauge +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 2.147483647E9 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 2.147483647E9 +# HELP hazelcast_executor_queueSize The hazelcast executor queueSize of seatunnel cluster node +# TYPE hazelcast_executor_queueSize gauge +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="async",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="client",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="io",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled",} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="system",} 0.0 +# HELP hazelcast_partition_partitionCount The partitionCount of seatunnel cluster node +# TYPE hazelcast_partition_partitionCount gauge +hazelcast_partition_partitionCount{cluster="seatunnel",address="127.0.0.1:5801",} 271.0 +# HELP hazelcast_partition_activePartition The activePartition of seatunnel cluster node +# TYPE hazelcast_partition_activePartition gauge +hazelcast_partition_activePartition{cluster="seatunnel",address="127.0.0.1:5801",} 271.0 +# HELP hazelcast_partition_isClusterSafe Whether is cluster safe of partition +# TYPE hazelcast_partition_isClusterSafe gauge +hazelcast_partition_isClusterSafe{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP hazelcast_partition_isLocalMemberSafe Whether is local member safe of partition +# TYPE hazelcast_partition_isLocalMemberSafe gauge +hazelcast_partition_isLocalMemberSafe{cluster="seatunnel",address="127.0.0.1:5801",} 1.0 +# HELP jvm_info VM version info +# TYPE jvm_info gauge +jvm_info{runtime="OpenJDK Runtime Environment",vendor="Azul Systems, Inc.",version="11.0.13+8-LTS",} 1.0 +# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM +# TYPE jvm_classes_currently_loaded gauge +jvm_classes_currently_loaded 9168.0 +# HELP jvm_classes_loaded_total The total number of classes that have been loaded since the JVM has started execution +# TYPE jvm_classes_loaded_total counter +jvm_classes_loaded_total 9168.0 +# HELP jvm_classes_unloaded_total The total number of classes that have been unloaded since the JVM has started execution +# TYPE jvm_classes_unloaded_total counter +jvm_classes_unloaded_total 0.0 +# HELP jvm_memory_pool_allocated_bytes_created Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously. +# TYPE jvm_memory_pool_allocated_bytes_created gauge +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'profiled nmethods'",} 1.725364266616E9 +jvm_memory_pool_allocated_bytes_created{pool="G1 Old Gen",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="G1 Eden Space",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-profiled nmethods'",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="G1 Survivor Space",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="Compressed Class Space",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="Metaspace",} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-nmethods'",} 1.725364266619E9 \ No newline at end of file diff --git a/docs/zh/seatunnel-engine/telemetry/openmetrics.txt b/docs/zh/seatunnel-engine/telemetry/openmetrics.txt new file mode 100644 index 00000000000..cf34553c51c --- /dev/null +++ b/docs/zh/seatunnel-engine/telemetry/openmetrics.txt @@ -0,0 +1,295 @@ +# TYPE jvm_buffer_pool_used_bytes gauge +# HELP jvm_buffer_pool_used_bytes Used bytes of a given JVM buffer pool. +jvm_buffer_pool_used_bytes{pool="mapped"} 0.0 +jvm_buffer_pool_used_bytes{pool="direct"} 414142.0 +# TYPE jvm_buffer_pool_capacity_bytes gauge +# HELP jvm_buffer_pool_capacity_bytes Bytes capacity of a given JVM buffer pool. +jvm_buffer_pool_capacity_bytes{pool="mapped"} 0.0 +jvm_buffer_pool_capacity_bytes{pool="direct"} 414139.0 +# TYPE jvm_buffer_pool_used_buffers gauge +# HELP jvm_buffer_pool_used_buffers Used buffers of a given JVM buffer pool. +jvm_buffer_pool_used_buffers{pool="mapped"} 0.0 +jvm_buffer_pool_used_buffers{pool="direct"} 7.0 +# TYPE jvm_gc_collection_seconds summary +# HELP jvm_gc_collection_seconds Time spent in a given JVM garbage collector in seconds. +jvm_gc_collection_seconds_count{gc="G1 Young Generation"} 6.0 +jvm_gc_collection_seconds_sum{gc="G1 Young Generation"} 0.047 +jvm_gc_collection_seconds_count{gc="G1 Old Generation"} 0.0 +jvm_gc_collection_seconds_sum{gc="G1 Old Generation"} 0.0 +# TYPE jvm_memory_objects_pending_finalization gauge +# HELP jvm_memory_objects_pending_finalization The number of objects waiting in the finalizer queue. +jvm_memory_objects_pending_finalization 0.0 +# TYPE jvm_memory_bytes_used gauge +# HELP jvm_memory_bytes_used Used bytes of a given JVM memory area. +jvm_memory_bytes_used{area="heap"} 8.0584592E7 +jvm_memory_bytes_used{area="nonheap"} 7.2669072E7 +# TYPE jvm_memory_bytes_committed gauge +# HELP jvm_memory_bytes_committed Committed (bytes) of a given JVM memory area. +jvm_memory_bytes_committed{area="heap"} 5.36870912E8 +jvm_memory_bytes_committed{area="nonheap"} 7.7529088E7 +# TYPE jvm_memory_bytes_max gauge +# HELP jvm_memory_bytes_max Max (bytes) of a given JVM memory area. +jvm_memory_bytes_max{area="heap"} 8.589934592E9 +jvm_memory_bytes_max{area="nonheap"} -1.0 +# TYPE jvm_memory_bytes_init gauge +# HELP jvm_memory_bytes_init Initial bytes of a given JVM memory area. +jvm_memory_bytes_init{area="heap"} 5.36870912E8 +jvm_memory_bytes_init{area="nonheap"} 7667712.0 +# TYPE jvm_memory_pool_bytes_used gauge +# HELP jvm_memory_pool_bytes_used Used bytes of a given JVM memory pool. +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-nmethods'"} 1307520.0 +jvm_memory_pool_bytes_used{pool="Metaspace"} 4.9582016E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'profiled nmethods'"} 1.2312704E7 +jvm_memory_pool_bytes_used{pool="Compressed Class Space"} 6124368.0 +jvm_memory_pool_bytes_used{pool="G1 Eden Space"} 5.0331648E7 +jvm_memory_pool_bytes_used{pool="G1 Old Gen"} 1.3475728E7 +jvm_memory_pool_bytes_used{pool="G1 Survivor Space"} 1.6777216E7 +jvm_memory_pool_bytes_used{pool="CodeHeap 'non-profiled nmethods'"} 3342464.0 +# TYPE jvm_memory_pool_bytes_committed gauge +# HELP jvm_memory_pool_bytes_committed Committed bytes of a given JVM memory pool. +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-nmethods'"} 2555904.0 +jvm_memory_pool_bytes_committed{pool="Metaspace"} 5.2035584E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'profiled nmethods'"} 1.2320768E7 +jvm_memory_pool_bytes_committed{pool="Compressed Class Space"} 7208960.0 +jvm_memory_pool_bytes_committed{pool="G1 Eden Space"} 3.20864256E8 +jvm_memory_pool_bytes_committed{pool="G1 Old Gen"} 1.9922944E8 +jvm_memory_pool_bytes_committed{pool="G1 Survivor Space"} 1.6777216E7 +jvm_memory_pool_bytes_committed{pool="CodeHeap 'non-profiled nmethods'"} 3407872.0 +# TYPE jvm_memory_pool_bytes_max gauge +# HELP jvm_memory_pool_bytes_max Max bytes of a given JVM memory pool. +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-nmethods'"} 5849088.0 +jvm_memory_pool_bytes_max{pool="Metaspace"} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'profiled nmethods'"} 1.22896384E8 +jvm_memory_pool_bytes_max{pool="Compressed Class Space"} 1.073741824E9 +jvm_memory_pool_bytes_max{pool="G1 Eden Space"} -1.0 +jvm_memory_pool_bytes_max{pool="G1 Old Gen"} 8.589934592E9 +jvm_memory_pool_bytes_max{pool="G1 Survivor Space"} -1.0 +jvm_memory_pool_bytes_max{pool="CodeHeap 'non-profiled nmethods'"} 1.22912768E8 +# TYPE jvm_memory_pool_bytes_init gauge +# HELP jvm_memory_pool_bytes_init Initial bytes of a given JVM memory pool. +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-nmethods'"} 2555904.0 +jvm_memory_pool_bytes_init{pool="Metaspace"} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'profiled nmethods'"} 2555904.0 +jvm_memory_pool_bytes_init{pool="Compressed Class Space"} 0.0 +jvm_memory_pool_bytes_init{pool="G1 Eden Space"} 2.7262976E7 +jvm_memory_pool_bytes_init{pool="G1 Old Gen"} 5.09607936E8 +jvm_memory_pool_bytes_init{pool="G1 Survivor Space"} 0.0 +jvm_memory_pool_bytes_init{pool="CodeHeap 'non-profiled nmethods'"} 2555904.0 +# TYPE jvm_memory_pool_collection_used_bytes gauge +# HELP jvm_memory_pool_collection_used_bytes Used bytes after last collection of a given JVM memory pool. +jvm_memory_pool_collection_used_bytes{pool="G1 Eden Space"} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Old Gen"} 0.0 +jvm_memory_pool_collection_used_bytes{pool="G1 Survivor Space"} 1.6777216E7 +# TYPE jvm_memory_pool_collection_committed_bytes gauge +# HELP jvm_memory_pool_collection_committed_bytes Committed after last collection bytes of a given JVM memory pool. +jvm_memory_pool_collection_committed_bytes{pool="G1 Eden Space"} 3.20864256E8 +jvm_memory_pool_collection_committed_bytes{pool="G1 Old Gen"} 0.0 +jvm_memory_pool_collection_committed_bytes{pool="G1 Survivor Space"} 1.6777216E7 +# TYPE jvm_memory_pool_collection_max_bytes gauge +# HELP jvm_memory_pool_collection_max_bytes Max bytes after last collection of a given JVM memory pool. +jvm_memory_pool_collection_max_bytes{pool="G1 Eden Space"} -1.0 +jvm_memory_pool_collection_max_bytes{pool="G1 Old Gen"} 8.589934592E9 +jvm_memory_pool_collection_max_bytes{pool="G1 Survivor Space"} -1.0 +# TYPE jvm_memory_pool_collection_init_bytes gauge +# HELP jvm_memory_pool_collection_init_bytes Initial after last collection bytes of a given JVM memory pool. +jvm_memory_pool_collection_init_bytes{pool="G1 Eden Space"} 2.7262976E7 +jvm_memory_pool_collection_init_bytes{pool="G1 Old Gen"} 5.09607936E8 +jvm_memory_pool_collection_init_bytes{pool="G1 Survivor Space"} 0.0 +# TYPE job_thread_pool_activeCount gauge +# HELP job_thread_pool_activeCount The activeCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_activeCount{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_completedTask counter +# HELP job_thread_pool_completedTask The completedTask of seatunnel coordinator job's executor cached thread pool +job_thread_pool_completedTask_total{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE job_thread_pool_corePoolSize gauge +# HELP job_thread_pool_corePoolSize The corePoolSize of seatunnel coordinator job's executor cached thread pool +job_thread_pool_corePoolSize{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_maximumPoolSize gauge +# HELP job_thread_pool_maximumPoolSize The maximumPoolSize of seatunnel coordinator job's executor cached thread pool +job_thread_pool_maximumPoolSize{cluster="seatunnel",address="127.0.0.1:5801"} 2.147483647E9 +# TYPE job_thread_pool_poolSize gauge +# HELP job_thread_pool_poolSize The poolSize of seatunnel coordinator job's executor cached thread pool +job_thread_pool_poolSize{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_task counter +# HELP job_thread_pool_task The taskCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_task_total{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE job_thread_pool_queueTaskCount gauge +# HELP job_thread_pool_queueTaskCount The queueTaskCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_queueTaskCount{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE job_thread_pool_rejection counter +# HELP job_thread_pool_rejection The rejectionCount of seatunnel coordinator job's executor cached thread pool +job_thread_pool_rejection_total{cluster="seatunnel",address="127.0.0.1:5801"} 0.0 +# TYPE jvm_memory_pool_allocated_bytes counter +# HELP jvm_memory_pool_allocated_bytes Total bytes allocated in a given JVM memory pool. Only updated after GC, not continuously. +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'profiled nmethods'"} 1.1970688E7 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'profiled nmethods'"} 1.725364266616E9 +jvm_memory_pool_allocated_bytes_total{pool="G1 Old Gen"} 1.3475728E7 +jvm_memory_pool_allocated_bytes_created{pool="G1 Old Gen"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="G1 Eden Space"} 1.61480704E8 +jvm_memory_pool_allocated_bytes_created{pool="G1 Eden Space"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-profiled nmethods'"} 3166720.0 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-profiled nmethods'"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="G1 Survivor Space"} 1.6777216E7 +jvm_memory_pool_allocated_bytes_created{pool="G1 Survivor Space"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space"} 6084208.0 +jvm_memory_pool_allocated_bytes_created{pool="Compressed Class Space"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="Metaspace"} 4.927032E7 +jvm_memory_pool_allocated_bytes_created{pool="Metaspace"} 1.725364266619E9 +jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-nmethods'"} 1303936.0 +jvm_memory_pool_allocated_bytes_created{pool="CodeHeap 'non-nmethods'"} 1.725364266619E9 +# TYPE jvm_threads_current gauge +# HELP jvm_threads_current Current thread count of a JVM +jvm_threads_current 114.0 +# TYPE jvm_threads_daemon gauge +# HELP jvm_threads_daemon Daemon thread count of a JVM +jvm_threads_daemon 10.0 +# TYPE jvm_threads_peak gauge +# HELP jvm_threads_peak Peak thread count of a JVM +jvm_threads_peak 124.0 +# TYPE jvm_threads_started counter +# HELP jvm_threads_started Started thread count of a JVM +jvm_threads_started_total 140.0 +# TYPE jvm_threads_deadlocked gauge +# HELP jvm_threads_deadlocked Cycles of JVM-threads that are in deadlock waiting to acquire object monitors or ownable synchronizers +jvm_threads_deadlocked 0.0 +# TYPE jvm_threads_deadlocked_monitor gauge +# HELP jvm_threads_deadlocked_monitor Cycles of JVM-threads that are in deadlock waiting to acquire object monitors +jvm_threads_deadlocked_monitor 0.0 +# TYPE jvm_threads_state gauge +# HELP jvm_threads_state Current count of threads by state +jvm_threads_state{state="NEW"} 0.0 +jvm_threads_state{state="TERMINATED"} 0.0 +jvm_threads_state{state="RUNNABLE"} 12.0 +jvm_threads_state{state="BLOCKED"} 0.0 +jvm_threads_state{state="WAITING"} 80.0 +jvm_threads_state{state="TIMED_WAITING"} 22.0 +jvm_threads_state{state="UNKNOWN"} 0.0 +# TYPE cluster_info gauge +# HELP cluster_info Cluster info +cluster_info{cluster="seatunnel",hazelcastVersion="5.1",master="127.0.0.1:5801"} 1.0 +# TYPE cluster_time gauge +# HELP cluster_time Cluster start time +cluster_time{cluster="seatunnel",hazelcastVersion="5.1"} 1.725364506292E12 +# TYPE node_count gauge +# HELP node_count Cluster node total count +node_count{cluster="seatunnel"} 1.0 +# TYPE process_cpu_seconds counter +# HELP process_cpu_seconds Total user and system CPU time spent in seconds. +process_cpu_seconds_total 16.267225 +# TYPE process_start_time_seconds gauge +# HELP process_start_time_seconds Start time of the process since unix epoch in seconds. +process_start_time_seconds 1.725363614623E9 +# TYPE process_open_fds gauge +# HELP process_open_fds Number of open file descriptors. +process_open_fds 162.0 +# TYPE process_max_fds gauge +# HELP process_max_fds Maximum number of open file descriptors. +process_max_fds 10240.0 +# TYPE job_count gauge +# HELP job_count All job counts of seatunnel cluster +job_count{cluster="seatunnel",type="canceled"} 0.0 +job_count{cluster="seatunnel",type="cancelling"} 0.0 +job_count{cluster="seatunnel",type="created"} 0.0 +job_count{cluster="seatunnel",type="failed"} 0.0 +job_count{cluster="seatunnel",type="failing"} 0.0 +job_count{cluster="seatunnel",type="finished"} 0.0 +job_count{cluster="seatunnel",type="running"} 0.0 +job_count{cluster="seatunnel",type="scheduled"} 0.0 +# TYPE node_state gauge +# HELP node_state Whether is up of seatunnel node +node_state{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE hazelcast_executor_executedCount gauge +# HELP hazelcast_executor_executedCount The hazelcast executor executedCount of seatunnel cluster node +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 221.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 16133.0 +hazelcast_executor_executedCount{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_isShutdown gauge +# HELP hazelcast_executor_isShutdown The hazelcast executor isShutdown of seatunnel cluster node +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_isShutdown{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_isTerminated gauge +# HELP hazelcast_executor_isTerminated The hazelcast executor isTerminated of seatunnel cluster node +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_isTerminated{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_maxPoolSize gauge +# HELP hazelcast_executor_maxPoolSize The hazelcast executor maxPoolSize of seatunnel cluster node +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 200.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 16.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 10.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 20.0 +hazelcast_executor_maxPoolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 10.0 +# TYPE hazelcast_executor_poolSize gauge +# HELP hazelcast_executor_poolSize The hazelcast executor poolSize of seatunnel cluster node +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_poolSize{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_executor_queueRemainingCapacity gauge +# HELP hazelcast_executor_queueRemainingCapacity The hazelcast executor queueRemainingCapacity of seatunnel cluster +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 2.147483647E9 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 100000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 1000000.0 +hazelcast_executor_queueRemainingCapacity{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 2.147483647E9 +# TYPE hazelcast_executor_queueSize gauge +# HELP hazelcast_executor_queueSize The hazelcast executor queueSize of seatunnel cluster node +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="async"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="client"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientBlocking"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="clientQuery"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="io"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="offloadable"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="scheduled"} 0.0 +hazelcast_executor_queueSize{cluster="seatunnel",address="127.0.0.1:5801",type="system"} 0.0 +# TYPE hazelcast_partition_partitionCount gauge +# HELP hazelcast_partition_partitionCount The partitionCount of seatunnel cluster node +hazelcast_partition_partitionCount{cluster="seatunnel",address="127.0.0.1:5801"} 271.0 +# TYPE hazelcast_partition_activePartition gauge +# HELP hazelcast_partition_activePartition The activePartition of seatunnel cluster node +hazelcast_partition_activePartition{cluster="seatunnel",address="127.0.0.1:5801"} 271.0 +# TYPE hazelcast_partition_isClusterSafe gauge +# HELP hazelcast_partition_isClusterSafe Whether is cluster safe of partition +hazelcast_partition_isClusterSafe{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE hazelcast_partition_isLocalMemberSafe gauge +# HELP hazelcast_partition_isLocalMemberSafe Whether is local member safe of partition +hazelcast_partition_isLocalMemberSafe{cluster="seatunnel",address="127.0.0.1:5801"} 1.0 +# TYPE jvm info +# HELP jvm VM version info +jvm_info{runtime="OpenJDK Runtime Environment",vendor="Azul Systems, Inc.",version="11.0.13+8-LTS"} 1.0 +# TYPE jvm_classes_currently_loaded gauge +# HELP jvm_classes_currently_loaded The number of classes that are currently loaded in the JVM +jvm_classes_currently_loaded 9168.0 +# TYPE jvm_classes_loaded counter +# HELP jvm_classes_loaded The total number of classes that have been loaded since the JVM has started execution +jvm_classes_loaded_total 9168.0 +# TYPE jvm_classes_unloaded counter +# HELP jvm_classes_unloaded The total number of classes that have been unloaded since the JVM has started execution +jvm_classes_unloaded_total 0.0 +# EOF \ No newline at end of file diff --git a/pom.xml b/pom.xml index 043f8fc0d86..ab8453af400 100644 --- a/pom.xml +++ b/pom.xml @@ -152,6 +152,9 @@ true false + + 0.16.0 + @@ -541,6 +544,25 @@ test + + + io.prometheus + simpleclient + ${prometheus.simpleclient.version} + + + + io.prometheus + simpleclient_hotspot + ${prometheus.simpleclient.version} + + + + io.prometheus + simpleclient_httpserver + ${prometheus.simpleclient.version} + + diff --git a/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java b/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java index b19a849c042..7c47617ce8d 100644 --- a/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java +++ b/seatunnel-core/seatunnel-starter/src/main/java/org/apache/seatunnel/core/starter/seatunnel/command/ServerExecuteCommand.java @@ -23,12 +23,10 @@ import org.apache.seatunnel.engine.common.config.EngineConfig; import org.apache.seatunnel.engine.common.config.SeaTunnelConfig; import org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException; -import org.apache.seatunnel.engine.server.SeaTunnelNodeContext; +import org.apache.seatunnel.engine.server.SeaTunnelServerStarter; import org.apache.commons.lang3.StringUtils; -import com.hazelcast.instance.impl.HazelcastInstanceFactory; - /** This command is used to execute the SeaTunnel engine job by SeaTunnel API. */ public class ServerExecuteCommand implements Command { @@ -59,9 +57,7 @@ public void execute() { .setClusterRole(EngineConfig.ClusterRole.MASTER_AND_WORKER); } - HazelcastInstanceFactory.newHazelcastInstance( - seaTunnelConfig.getHazelcastConfig(), - Thread.currentThread().getName(), - new SeaTunnelNodeContext(seaTunnelConfig)); + SeaTunnelServerStarter.createHazelcastInstance( + seaTunnelConfig, Thread.currentThread().getName()); } } diff --git a/seatunnel-dist/release-docs/LICENSE b/seatunnel-dist/release-docs/LICENSE index 5cc3074d417..40e85cfa6f2 100644 --- a/seatunnel-dist/release-docs/LICENSE +++ b/seatunnel-dist/release-docs/LICENSE @@ -327,6 +327,13 @@ The text of each license is the standard Apache 2.0 license. (Apache-2.0) accessors-smart (net.minidev:accessors-smart:2.4.7 - https://mvnrepository.com/artifact/net.minidev/accessors-smart) (Apache-2.0) json-smart (net.minidev:json-smart:2.4.7 - https://mvnrepository.com/artifact/net.minidev/json-smart) (Apache-2.0) json-path (com.jayway.jsonpath:json-path:2.7.0 - https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path) + (The Apache Software License, Version 2.0) Prometheus Java Simpleclient (io.prometheus:simpleclient:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient/0.16.0) + (The Apache Software License, Version 2.0) Prometheus Java Simpleclient Common (io.prometheus:simpleclient_common:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient_common/0.16.0) + (The Apache Software License, Version 2.0) Prometheus Java Simpleclient Hotspot (io.prometheus:simpleclient_hotspot:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient_hotspot/0.16.0) + (The Apache Software License, Version 2.0) Prometheus Java Simpleclient Httpserver (io.prometheus:simpleclient_httpserver:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient_httpserver/0.16.0) + (The Apache Software License, Version 2.0) Prometheus Java Span Context Supplier - Common (io.prometheus:simpleclient_tracer_common:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient_tracer_common/0.16.0) + (The Apache Software License, Version 2.0) Prometheus Java Span Context Supplier - OpenTelemetry (io.prometheus:simpleclient_tracer_otel:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient_tracer_otel/0.16.0) + (The Apache Software License, Version 2.0) Prometheus Java Span Context Supplier - OpenTelemetry Agent (io.prometheus:simpleclient_tracer_otel_agent:0.16.0 - https://mvnrepository.com/artifact/io.prometheus/simpleclient_tracer_otel_agent/0.16.0) ======================================================================== MOZILLA PUBLIC LICENSE License diff --git a/seatunnel-dist/release-docs/NOTICE b/seatunnel-dist/release-docs/NOTICE index 8c978844f24..a2c7980dcfc 100644 --- a/seatunnel-dist/release-docs/NOTICE +++ b/seatunnel-dist/release-docs/NOTICE @@ -806,4 +806,21 @@ LongAdder), which was released with the following comments: ========================================================================= +Prometheus NOTICE + +========================================================================= +Prometheus instrumentation library for JVM applications +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +Boxever Ltd. (http://www.boxever.com/). + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). + +This product includes software developed as part of the +Ocelli project by Netflix Inc. (https://github.com/Netflix/ocelli/). + +========================================================================= + diff --git a/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/TelemetryApiIT.java b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/TelemetryApiIT.java new file mode 100644 index 00000000000..3f85fbbe35f --- /dev/null +++ b/seatunnel-e2e/seatunnel-engine-e2e/connector-seatunnel-e2e-base/src/test/java/org/apache/seatunnel/engine/e2e/TelemetryApiIT.java @@ -0,0 +1,537 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.e2e; + +import org.apache.seatunnel.common.config.Common; +import org.apache.seatunnel.common.config.DeployMode; +import org.apache.seatunnel.engine.client.SeaTunnelClient; +import org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment; +import org.apache.seatunnel.engine.client.job.ClientJobProxy; +import org.apache.seatunnel.engine.common.config.ConfigProvider; +import org.apache.seatunnel.engine.common.config.JobConfig; +import org.apache.seatunnel.engine.common.config.SeaTunnelConfig; +import org.apache.seatunnel.engine.common.config.server.TelemetryConfig; +import org.apache.seatunnel.engine.common.config.server.TelemetryMetricConfig; +import org.apache.seatunnel.engine.core.job.JobStatus; +import org.apache.seatunnel.engine.server.SeaTunnelServerStarter; + +import org.awaitility.Awaitility; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + +import com.hazelcast.client.config.ClientConfig; +import com.hazelcast.instance.impl.HazelcastInstanceImpl; +import lombok.extern.slf4j.Slf4j; + +import java.util.concurrent.TimeUnit; + +import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.Matchers.matchesRegex; + +@Slf4j +public class TelemetryApiIT { + + private static final String HOST = "http://localhost:"; + + private static ClientJobProxy clientJobProxy; + + private static HazelcastInstanceImpl hazelcastInstance; + + private static String testClusterName; + + @BeforeAll + static void beforeClass() throws Exception { + testClusterName = TestUtils.getClusterName("TelemetryApiIT"); + SeaTunnelConfig seaTunnelConfig = ConfigProvider.locateAndGetSeaTunnelConfig(); + seaTunnelConfig.getHazelcastConfig().setClusterName(testClusterName); + TelemetryMetricConfig telemetryMetricConfig = new TelemetryMetricConfig(); + telemetryMetricConfig.setEnabled(true); + TelemetryConfig telemetryConfig = new TelemetryConfig(); + telemetryConfig.setMetric(telemetryMetricConfig); + seaTunnelConfig.getEngineConfig().setTelemetryConfig(telemetryConfig); + hazelcastInstance = SeaTunnelServerStarter.createHazelcastInstance(seaTunnelConfig); + Common.setDeployMode(DeployMode.CLIENT); + String filePath = TestUtils.getResource("stream_fakesource_to_file.conf"); + JobConfig jobConfig = new JobConfig(); + jobConfig.setName("fake_to_file"); + + ClientConfig clientConfig = ConfigProvider.locateAndGetClientConfig(); + clientConfig.setClusterName(testClusterName); + SeaTunnelClient engineClient = new SeaTunnelClient(clientConfig); + ClientJobExecutionEnvironment jobExecutionEnv = + engineClient.createExecutionContext(filePath, jobConfig, seaTunnelConfig); + + clientJobProxy = jobExecutionEnv.execute(); + + Awaitility.await() + .atMost(2, TimeUnit.MINUTES) + .untilAsserted( + () -> + Assertions.assertEquals( + JobStatus.RUNNING, clientJobProxy.getJobStatus())); + } + + @Test + public void testGetMetrics() throws InterruptedException { + given().get( + HOST + + hazelcastInstance + .getCluster() + .getLocalMember() + .getAddress() + .getPort() + + "/hazelcast/rest/instance/metrics") + .then() + .statusCode(200) + // Use regular expressions to verify whether the response body is the indicator data + // of Prometheus + // Metric data is usually multi-line, use newlines for validation + .body(matchesRegex("(?s)^.*# HELP.*# TYPE.*$")) + // Verify that the response body contains a specific metric + // JVM metrics + .body(containsString("jvm_threads")) + .body(containsString("jvm_memory_pool")) + .body(containsString("jvm_gc")) + .body(containsString("jvm_info")) + .body(containsString("jvm_memory_bytes")) + .body(containsString("jvm_classes")) + .body(containsString("jvm_buffer_pool")) + .body(containsString("process_start")) + // cluster_info + .body(containsString("cluster_info{cluster=\"" + testClusterName)) + // cluster_time + .body(containsString("cluster_time{cluster=\"" + testClusterName)) + // Job thread pool metrics + .body( + matchesRegex( + "(?s)^.*job_thread_pool_activeCount\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_completedTask_total\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_corePoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_maximumPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_task_total\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_queueTaskCount\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + .body( + matchesRegex( + "(?s)^.*job_thread_pool_rejection_total\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + // Job count metrics + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"canceled\",} 0.0")) + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"cancelling\",} 0.0")) + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"created\",} 0.0")) + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"failed\",} 0.0")) + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"failing\",} 0.0")) + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"finished\",} 0.0")) + // Running job count is 1 + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"running\",} 1.0")) + .body( + containsString( + "job_count{cluster=\"" + + testClusterName + + "\",type=\"scheduled\",} 0.0")) + // Node + .body( + matchesRegex( + "(?s)^.*node_state\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + // hazelcast_executor_executedCount + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_executedCount\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + // hazelcast_executor_isShutdown + + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isShutdown\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + + // hazelcast_executor_isTerminated + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_isTerminated\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + + // hazelcast_executor_maxPoolSize + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_maxPoolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + + // hazelcast_executor_poolSize + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_poolSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + + // hazelcast_executor_queueRemainingCapacity + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueRemainingCapacity\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + + // hazelcast_executor_queueSize + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"async\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"client\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientBlocking\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"clientQuery\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"io\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"offloadable\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"scheduled\".*$")) + .body( + matchesRegex( + "(?s)^.*hazelcast_executor_queueSize\\{cluster=\"" + + testClusterName + + "\",address=.*,type=\"system\".*$")) + + // hazelcast_partition_partitionCount + .body( + matchesRegex( + "(?s)^.*hazelcast_partition_partitionCount\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + // hazelcast_partition_activePartition + .body( + matchesRegex( + "(?s)^.*hazelcast_partition_activePartition\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + // hazelcast_partition_isClusterSafe + .body( + matchesRegex( + "(?s)^.*hazelcast_partition_isClusterSafe\\{cluster=\"" + + testClusterName + + "\",address=.*$")) + // hazelcast_partition_isLocalMemberSafe + .body( + matchesRegex( + "(?s)^.*hazelcast_partition_isLocalMemberSafe\\{cluster=\"" + + testClusterName + + "\",address=.*$")); + } + + @AfterAll + static void afterClass() { + if (hazelcastInstance != null) { + hazelcastInstance.shutdown(); + } + } +} diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/EngineConfig.java b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/EngineConfig.java index fb3a74c9932..9ee7ec03859 100644 --- a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/EngineConfig.java +++ b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/EngineConfig.java @@ -22,6 +22,7 @@ import org.apache.seatunnel.engine.common.config.server.QueueType; import org.apache.seatunnel.engine.common.config.server.ServerConfigOptions; import org.apache.seatunnel.engine.common.config.server.SlotServiceConfig; +import org.apache.seatunnel.engine.common.config.server.TelemetryConfig; import org.apache.seatunnel.engine.common.config.server.ThreadShareMode; import org.apache.seatunnel.engine.common.runtime.ExecutionMode; @@ -71,6 +72,8 @@ public class EngineConfig { private ExecutionMode mode = ExecutionMode.CLUSTER; + private TelemetryConfig telemetryConfig = ServerConfigOptions.TELEMETRY.defaultValue(); + public void setBackupCount(int newBackupCount) { checkBackupCount(newBackupCount, 0); this.backupCount = newBackupCount; diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java index 787f58ca90f..b65957011b9 100644 --- a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java +++ b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java @@ -25,6 +25,8 @@ import org.apache.seatunnel.engine.common.config.server.QueueType; import org.apache.seatunnel.engine.common.config.server.ServerConfigOptions; import org.apache.seatunnel.engine.common.config.server.SlotServiceConfig; +import org.apache.seatunnel.engine.common.config.server.TelemetryConfig; +import org.apache.seatunnel.engine.common.config.server.TelemetryMetricConfig; import org.apache.seatunnel.engine.common.config.server.ThreadShareMode; import org.apache.commons.lang3.StringUtils; @@ -165,6 +167,8 @@ private void parseEngineConfig(Node engineNode, SeaTunnelConfig config) { engineConfig.setEventReportHttpHeaders(headers); } } + } else if (ServerConfigOptions.TELEMETRY.key().equals(name)) { + engineConfig.setTelemetryConfig(parseTelemetryConfig(node)); } else { LOGGER.warning("Unrecognized element: " + name); } @@ -311,4 +315,32 @@ private Map parseConnectorJarHAStoragePluginConfig( } return connectorJarHAStoragePluginConfig; } + + private TelemetryConfig parseTelemetryConfig(Node telemetryNode) { + TelemetryConfig metricConfig = new TelemetryConfig(); + for (Node node : childElements(telemetryNode)) { + String name = cleanNodeName(node); + if (ServerConfigOptions.TELEMETRY_METRIC.key().equals(name)) { + metricConfig.setMetric(parseTelemetryMetricConfig(node)); + } else { + LOGGER.warning("Unrecognized element: " + name); + } + } + + return metricConfig; + } + + private TelemetryMetricConfig parseTelemetryMetricConfig(Node metricNode) { + TelemetryMetricConfig metricConfig = new TelemetryMetricConfig(); + for (Node node : childElements(metricNode)) { + String name = cleanNodeName(node); + if (ServerConfigOptions.TELEMETRY_METRIC_ENABLED.key().equals(name)) { + metricConfig.setEnabled(getBooleanValue(getTextContent(node))); + } else { + LOGGER.warning("Unrecognized element: " + name); + } + } + + return metricConfig; + } } diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/ServerConfigOptions.java b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/ServerConfigOptions.java index 1316d2fec7c..a94da2cc924 100644 --- a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/ServerConfigOptions.java +++ b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/ServerConfigOptions.java @@ -204,6 +204,24 @@ public class ServerConfigOptions { .withDescription( "Whether to use classloader cache mode. With cache mode, all jobs share the same classloader if the jars are the same"); + public static final Option TELEMETRY_METRIC_ENABLED = + Options.key("enabled") + .booleanType() + .defaultValue(false) + .withDescription("Whether open metrics export."); + + public static final Option TELEMETRY_METRIC = + Options.key("metric") + .type(new TypeReference() {}) + .defaultValue(new TelemetryMetricConfig()) + .withDescription("The telemetry metric configuration."); + + public static final Option TELEMETRY = + Options.key("telemetry") + .type(new TypeReference() {}) + .defaultValue(new TelemetryConfig()) + .withDescription("The telemetry configuration."); + public static final String EVENT_REPORT_HTTP = "event-report-http"; public static final String EVENT_REPORT_HTTP_URL = "url"; public static final String EVENT_REPORT_HTTP_HEADERS = "headers"; diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryConfig.java b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryConfig.java new file mode 100644 index 00000000000..c3e603eea4c --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryConfig.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.common.config.server; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class TelemetryConfig implements Serializable { + + private TelemetryMetricConfig metric = ServerConfigOptions.TELEMETRY_METRIC.defaultValue(); +} diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryMetricConfig.java b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryMetricConfig.java new file mode 100644 index 00000000000..a211514e353 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/server/TelemetryMetricConfig.java @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.common.config.server; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class TelemetryMetricConfig implements Serializable { + + private boolean enabled = ServerConfigOptions.TELEMETRY_METRIC_ENABLED.defaultValue(); +} diff --git a/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml b/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml index db8e4ae3c81..533c3d7c2b4 100644 --- a/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml +++ b/seatunnel-engine/seatunnel-engine-common/src/main/resources/seatunnel.yaml @@ -38,3 +38,7 @@ seatunnel: connector-jar-storage-path: "" connector-jar-cleanup-task-interval: 3600 connector-jar-expiry-time: 600 + telemetry: + metric: + enabled: false + diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java index 0e057907138..09a2a89b7ae 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/CoordinatorService.java @@ -57,6 +57,8 @@ import org.apache.seatunnel.engine.server.resourcemanager.resource.SlotProfile; import org.apache.seatunnel.engine.server.service.jar.ConnectorPackageService; import org.apache.seatunnel.engine.server.task.operation.GetMetricsOperation; +import org.apache.seatunnel.engine.server.telemetry.metrics.entity.JobCounter; +import org.apache.seatunnel.engine.server.telemetry.metrics.entity.ThreadPoolStatus; import org.apache.seatunnel.engine.server.utils.NodeEngineUtil; import com.google.common.util.concurrent.ThreadFactoryBuilder; @@ -83,6 +85,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.SynchronousQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; @@ -177,10 +180,16 @@ public CoordinatorService( this.nodeEngine = nodeEngine; this.logger = nodeEngine.getLogger(getClass()); this.executorService = - Executors.newCachedThreadPool( + new ThreadPoolExecutor( + 0, + Integer.MAX_VALUE, + 60L, + TimeUnit.SECONDS, + new SynchronousQueue<>(), new ThreadFactoryBuilder() .setNameFormat("seatunnel-coordinator-service-%d") - .build()); + .build(), + new ThreadPoolStatus.RejectionCountingHandler()); this.seaTunnelServer = seaTunnelServer; this.engineConfig = engineConfig; masterActiveListener = Executors.newSingleThreadScheduledExecutor(); @@ -770,31 +779,48 @@ public void memberRemoved(MembershipServiceEvent event) { } public void printExecutionInfo() { - ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executorService; - int activeCount = threadPoolExecutor.getActiveCount(); - int corePoolSize = threadPoolExecutor.getCorePoolSize(); - int maximumPoolSize = threadPoolExecutor.getMaximumPoolSize(); - int poolSize = threadPoolExecutor.getPoolSize(); - long completedTaskCount = threadPoolExecutor.getCompletedTaskCount(); - long taskCount = threadPoolExecutor.getTaskCount(); + ThreadPoolStatus threadPoolStatus = getThreadPoolStatusMetrics(); logger.info( StringFormatUtils.formatTable( "CoordinatorService Thread Pool Status", "activeCount", - activeCount, + threadPoolStatus.getActiveCount(), "corePoolSize", - corePoolSize, + threadPoolStatus.getCorePoolSize(), "maximumPoolSize", - maximumPoolSize, + threadPoolStatus.getMaximumPoolSize(), "poolSize", - poolSize, + threadPoolStatus.getPoolSize(), "completedTaskCount", - completedTaskCount, + threadPoolStatus.getCompletedTaskCount(), "taskCount", - taskCount)); + threadPoolStatus.getTaskCount())); } public void printJobDetailInfo() { + JobCounter jobCounter = getJobCountMetrics(); + logger.info( + StringFormatUtils.formatTable( + "Job info detail", + "createdJobCount", + jobCounter.getCreatedJobCount(), + "scheduledJobCount", + jobCounter.getScheduledJobCount(), + "runningJobCount", + jobCounter.getRunningJobCount(), + "failingJobCount", + jobCounter.getFailingJobCount(), + "failedJobCount", + jobCounter.getFailedJobCount(), + "cancellingJobCount", + jobCounter.getCancellingJobCount(), + "canceledJobCount", + jobCounter.getCanceledJobCount(), + "finishedJobCount", + jobCounter.getFinishedJobCount())); + } + + public JobCounter getJobCountMetrics() { AtomicLong createdJobCount = new AtomicLong(); AtomicLong scheduledJobCount = new AtomicLong(); AtomicLong runningJobCount = new AtomicLong(); @@ -804,64 +830,70 @@ public void printJobDetailInfo() { AtomicLong canceledJobCount = new AtomicLong(); AtomicLong finishedJobCount = new AtomicLong(); - if (runningJobInfoIMap != null) { - runningJobInfoIMap - .keySet() + if (jobHistoryService != null) { + jobHistoryService + .getJobStatusData() .forEach( - jobId -> { - if (runningJobStateIMap.get(jobId) != null) { - JobStatus jobStatus = - (JobStatus) runningJobStateIMap.get(jobId); - switch (jobStatus) { - case CREATED: - createdJobCount.addAndGet(1); - break; - case SCHEDULED: - scheduledJobCount.addAndGet(1); - break; - case RUNNING: - runningJobCount.addAndGet(1); - break; - case FAILING: - failingJobCount.addAndGet(1); - break; - case FAILED: - failedJobCount.addAndGet(1); - break; - case CANCELING: - cancellingJobCount.addAndGet(1); - break; - case CANCELED: - canceledJobCount.addAndGet(1); - break; - case FINISHED: - finishedJobCount.addAndGet(1); - break; - default: - } + jobStatusData -> { + JobStatus jobStatus = jobStatusData.getJobStatus(); + switch (jobStatus) { + case CREATED: + createdJobCount.addAndGet(1); + break; + case SCHEDULED: + scheduledJobCount.addAndGet(1); + break; + case RUNNING: + runningJobCount.addAndGet(1); + break; + case FAILING: + failingJobCount.addAndGet(1); + break; + case FAILED: + failedJobCount.addAndGet(1); + break; + case CANCELING: + cancellingJobCount.addAndGet(1); + break; + case CANCELED: + canceledJobCount.addAndGet(1); + break; + case FINISHED: + finishedJobCount.addAndGet(1); + break; + default: } }); } - logger.info( - StringFormatUtils.formatTable( - "Job info detail", - "createdJobCount", - createdJobCount, - "scheduledJobCount", - scheduledJobCount, - "runningJobCount", - runningJobCount, - "failingJobCount", - failingJobCount, - "failedJobCount", - failedJobCount, - "cancellingJobCount", - cancellingJobCount, - "canceledJobCount", - canceledJobCount, - "finishedJobCount", - finishedJobCount)); + return new JobCounter( + createdJobCount.longValue(), + scheduledJobCount.longValue(), + runningJobCount.longValue(), + failingJobCount.longValue(), + failedJobCount.longValue(), + cancellingJobCount.longValue(), + canceledJobCount.longValue(), + finishedJobCount.longValue()); + } + + public ThreadPoolStatus getThreadPoolStatusMetrics() { + ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executorService; + + long rejectionCount = + ((ThreadPoolStatus.RejectionCountingHandler) + threadPoolExecutor.getRejectedExecutionHandler()) + .getRejectionCount(); + long queueTaskSize = threadPoolExecutor.getQueue().size(); + return new ThreadPoolStatus( + threadPoolExecutor.getActiveCount(), + threadPoolExecutor.getCorePoolSize(), + threadPoolExecutor.getMaximumPoolSize(), + threadPoolExecutor.getPoolSize(), + threadPoolExecutor.getCompletedTaskCount(), + threadPoolExecutor.getTaskCount(), + queueTaskSize, + rejectionCount); } public ConnectorPackageService getConnectorPackageService() { diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/NodeExtension.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/NodeExtension.java index 37e00cffab2..945bfce6a96 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/NodeExtension.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/NodeExtension.java @@ -28,6 +28,8 @@ import com.hazelcast.instance.impl.Node; import com.hazelcast.internal.ascii.TextCommandService; import com.hazelcast.internal.ascii.TextCommandServiceImpl; +import io.prometheus.client.CollectorRegistry; +import lombok.Getter; import lombok.NonNull; import java.util.Map; @@ -37,10 +39,12 @@ public class NodeExtension extends DefaultNodeExtension { private final NodeExtensionCommon extCommon; + @Getter private final CollectorRegistry collectorRegistry; public NodeExtension(@NonNull Node node, @NonNull SeaTunnelConfig seaTunnelConfig) { super(node); extCommon = new NodeExtensionCommon(node, new SeaTunnelServer(seaTunnelConfig)); + collectorRegistry = CollectorRegistry.defaultRegistry; } @Override diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java index 99cd27d5642..73462c53c99 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServer.java @@ -29,6 +29,7 @@ import org.apache.seatunnel.engine.server.service.jar.ConnectorPackageService; import org.apache.seatunnel.engine.server.service.slot.DefaultSlotService; import org.apache.seatunnel.engine.server.service.slot.SlotService; +import org.apache.seatunnel.engine.server.telemetry.metrics.entity.ThreadPoolStatus; import org.apache.hadoop.fs.FileSystem; @@ -325,4 +326,8 @@ public NodeEngineImpl getNodeEngine() { public ConnectorPackageService getConnectorPackageService() { return getCoordinatorService().getConnectorPackageService(); } + + public ThreadPoolStatus getThreadPoolStatusMetrics() { + return coordinatorService.getThreadPoolStatusMetrics(); + } } diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServerStarter.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServerStarter.java index a0b1d89dc2c..fdeab761295 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServerStarter.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/SeaTunnelServerStarter.java @@ -20,10 +20,12 @@ import org.apache.seatunnel.engine.common.config.ConfigProvider; import org.apache.seatunnel.engine.common.config.EngineConfig; import org.apache.seatunnel.engine.common.config.SeaTunnelConfig; +import org.apache.seatunnel.engine.server.telemetry.metrics.ExportsInstanceInitializer; import com.hazelcast.instance.impl.HazelcastInstanceFactory; import com.hazelcast.instance.impl.HazelcastInstanceImpl; import com.hazelcast.instance.impl.HazelcastInstanceProxy; +import com.hazelcast.instance.impl.Node; import lombok.NonNull; public class SeaTunnelServerStarter { @@ -40,13 +42,35 @@ public static HazelcastInstanceImpl createHazelcastInstance(String clusterName) public static HazelcastInstanceImpl createHazelcastInstance( @NonNull SeaTunnelConfig seaTunnelConfig) { - return ((HazelcastInstanceProxy) - HazelcastInstanceFactory.newHazelcastInstance( - seaTunnelConfig.getHazelcastConfig(), - HazelcastInstanceFactory.createInstanceName( - seaTunnelConfig.getHazelcastConfig()), - new SeaTunnelNodeContext(seaTunnelConfig))) - .getOriginal(); + return createHazelcastInstance(seaTunnelConfig, null); + } + + public static HazelcastInstanceImpl createHazelcastInstance( + @NonNull SeaTunnelConfig seaTunnelConfig, String customInstanceName) { + return initializeHazelcastInstance(seaTunnelConfig, customInstanceName); + } + + private static HazelcastInstanceImpl initializeHazelcastInstance( + @NonNull SeaTunnelConfig seaTunnelConfig, String customInstanceName) { + boolean condition = checkTelemetryConfig(seaTunnelConfig); + String instanceName = + customInstanceName != null + ? customInstanceName + : HazelcastInstanceFactory.createInstanceName( + seaTunnelConfig.getHazelcastConfig()); + + HazelcastInstanceImpl original = + ((HazelcastInstanceProxy) + HazelcastInstanceFactory.newHazelcastInstance( + seaTunnelConfig.getHazelcastConfig(), + instanceName, + new SeaTunnelNodeContext(seaTunnelConfig))) + .getOriginal(); + // init telemetry instance + if (condition) { + initTelemetryInstance(original.node); + } + return original; } public static HazelcastInstanceImpl createMasterAndWorkerHazelcastInstance( @@ -93,4 +117,20 @@ public static HazelcastInstanceImpl createHazelcastInstance() { SeaTunnelConfig seaTunnelConfig = ConfigProvider.locateAndGetSeaTunnelConfig(); return createHazelcastInstance(seaTunnelConfig); } + + public static void initTelemetryInstance(@NonNull Node node) { + ExportsInstanceInitializer.init(node); + } + + private static boolean checkTelemetryConfig(SeaTunnelConfig seaTunnelConfig) { + // "hazelcast.jmx" need to set "true", for hazelcast metrics + if (seaTunnelConfig.getEngineConfig().getTelemetryConfig().getMetric().isEnabled()) { + seaTunnelConfig + .getHazelcastConfig() + .getProperties() + .setProperty("hazelcast.jmx", "true"); + return true; + } + return false; + } } diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobHistoryService.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobHistoryService.java index d8bea2cc1bf..0a1e6ebfccc 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobHistoryService.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/master/JobHistoryService.java @@ -106,6 +106,16 @@ public JobHistoryService( // Gets the status of a running and completed job. public String listAllJob() { + List status = getJobStatusData(); + try { + return objectMapper.writeValueAsString(status); + } catch (JsonProcessingException e) { + logger.severe("Failed to list all job", e); + throw new SeaTunnelEngineException(e); + } + } + + public List getJobStatusData() { List status = new ArrayList<>(); final List runningJobStateList = runningJobMasterMap.values().stream() @@ -128,12 +138,7 @@ public String listAllJob() { jobState.getFinishTime()); status.add(jobStatusData); }); - try { - return objectMapper.writeValueAsString(status); - } catch (JsonProcessingException e) { - logger.severe("Failed to list all job", e); - throw new SeaTunnelEngineException(e); - } + return status; } // Get detailed status of a single job diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestConstant.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestConstant.java index 6931db68b29..949e1744765 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestConstant.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestConstant.java @@ -63,4 +63,8 @@ public class RestConstant { public static final String STOP_JOB_URL = "/hazelcast/rest/maps/stop-job"; public static final String STOP_JOBS_URL = "/hazelcast/rest/maps/stop-jobs"; public static final String UPDATE_TAGS_URL = "/hazelcast/rest/maps/update-tags"; + + // metrics + public static final String TELEMETRY_METRICS_URL = "/hazelcast/rest/instance/metrics"; + public static final String TELEMETRY_OPEN_METRICS_URL = "/hazelcast/rest/instance/openmetrics"; } diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpGetCommandProcessor.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpGetCommandProcessor.java index 6827a2cfb03..baea0d06aa8 100644 --- a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpGetCommandProcessor.java +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/RestHttpGetCommandProcessor.java @@ -61,7 +61,10 @@ import com.hazelcast.map.IMap; import com.hazelcast.spi.impl.NodeEngine; import com.hazelcast.spi.impl.NodeEngineImpl; +import io.prometheus.client.exporter.common.TextFormat; +import java.io.IOException; +import java.io.StringWriter; import java.util.Arrays; import java.util.Comparator; import java.util.HashMap; @@ -88,6 +91,8 @@ import static org.apache.seatunnel.engine.server.rest.RestConstant.RUNNING_JOB_URL; import static org.apache.seatunnel.engine.server.rest.RestConstant.RUNNING_THREADS; import static org.apache.seatunnel.engine.server.rest.RestConstant.SYSTEM_MONITORING_INFORMATION; +import static org.apache.seatunnel.engine.server.rest.RestConstant.TELEMETRY_METRICS_URL; +import static org.apache.seatunnel.engine.server.rest.RestConstant.TELEMETRY_OPEN_METRICS_URL; public class RestHttpGetCommandProcessor extends HttpCommandProcessor { @@ -135,6 +140,10 @@ public void handle(HttpGetCommand httpGetCommand) { getRunningThread(httpGetCommand); } else if (uri.startsWith(OVERVIEW)) { overView(httpGetCommand, uri); + } else if (uri.equals(TELEMETRY_METRICS_URL)) { + handleMetrics(httpGetCommand, TextFormat.CONTENT_TYPE_004); + } else if (uri.equals(TELEMETRY_OPEN_METRICS_URL)) { + handleMetrics(httpGetCommand, TextFormat.CONTENT_TYPE_OPENMETRICS_100); } else { original.handle(httpGetCommand); } @@ -573,6 +582,29 @@ public static Map aggregateMap(Map inputMap, b .sum())); } + private void handleMetrics(HttpGetCommand httpGetCommand, String contentType) { + StringWriter stringWriter = new StringWriter(); + org.apache.seatunnel.engine.server.NodeExtension nodeExtension = + (org.apache.seatunnel.engine.server.NodeExtension) + textCommandService.getNode().getNodeExtension(); + try { + TextFormat.writeFormat( + contentType, + stringWriter, + nodeExtension.getCollectorRegistry().metricFamilySamples()); + this.prepareResponse(httpGetCommand, stringWriter.toString()); + } catch (IOException e) { + httpGetCommand.send400(); + } finally { + try { + stringWriter.close(); + } catch (IOException e) { + logger.warning("An error occurred while handling request " + httpGetCommand, e); + prepareResponse(SC_500, httpGetCommand, exceptionResponse(e)); + } + } + } + private SeaTunnelServer getSeaTunnelServer(boolean shouldBeMaster) { Map extensionServices = this.textCommandService.getNode().getNodeExtension().createExtensionServices(); diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/AbstractCollector.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/AbstractCollector.java new file mode 100644 index 00000000000..0439fc1d77e --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/AbstractCollector.java @@ -0,0 +1,121 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics; + +import org.apache.seatunnel.engine.server.CoordinatorService; +import org.apache.seatunnel.engine.server.SeaTunnelServer; + +import com.google.common.collect.Lists; +import com.hazelcast.cluster.impl.MemberImpl; +import com.hazelcast.instance.impl.Node; +import com.hazelcast.internal.cluster.ClusterService; +import com.hazelcast.internal.jmx.ManagementService; +import com.hazelcast.logging.ILogger; +import io.prometheus.client.Collector; +import io.prometheus.client.GaugeMetricFamily; + +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.List; + +public abstract class AbstractCollector extends Collector { + + protected static String CLUSTER = "cluster"; + protected static String ADDRESS = "address"; + + protected Node node; + + public AbstractCollector(final Node node) { + this.node = node; + } + + protected Node getNode() { + return node; + } + + protected ILogger getLogger(Class clazz) { + return getNode().getLogger(clazz); + } + + protected boolean isMaster() { + return getNode().isMaster(); + } + + protected MemberImpl getLocalMember() { + return getNode().nodeEngine.getLocalMember(); + } + + protected SeaTunnelServer getServer() { + return getNode().getNodeEngine().getService(SeaTunnelServer.SERVICE_NAME); + } + + protected CoordinatorService getCoordinatorService() { + return getServer().getCoordinatorService(); + } + + protected ManagementService getManagementService() { + return getNode().hazelcastInstance.getManagementService(); + } + + protected ClusterService getClusterService() { + return getNode().getClusterService(); + } + + protected String localAddress() { + return getLocalMember().getInetAddress().getHostAddress() + + ":" + + getLocalMember().getPort(); + } + + protected String masterAddress() throws UnknownHostException { + return getClusterService().getMasterAddress().getInetAddress().getHostAddress() + + ":" + + getClusterService().getMasterAddress().getPort(); + } + + protected String getClusterName() { + return getNode().getConfig().getClusterName(); + } + + protected List labelValues(String... values) { + List labelValues = new ArrayList<>(); + labelValues.add(getClusterName()); + if (values != null) { + labelValues.addAll(Lists.newArrayList(values)); + } + return labelValues; + } + + protected List clusterLabelNames(String... labels) { + List labelNames = new ArrayList<>(); + labelNames.add(CLUSTER); + if (labels != null) { + labelNames.addAll(Lists.newArrayList(labels)); + } + return labelNames; + } + + protected void longMetric( + GaugeMetricFamily metricFamily, long count, List labelValues) { + metricFamily.addMetric(labelValues, count); + } + + protected void intMetric(GaugeMetricFamily metricFamily, int count, List labelValues) { + metricFamily.addMetric(labelValues, count); + } +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/ExportsInstanceInitializer.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/ExportsInstanceInitializer.java new file mode 100644 index 00000000000..f737fbf6c24 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/ExportsInstanceInitializer.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics; + +import org.apache.seatunnel.engine.server.telemetry.metrics.exports.ClusterMetricExports; +import org.apache.seatunnel.engine.server.telemetry.metrics.exports.JobMetricExports; +import org.apache.seatunnel.engine.server.telemetry.metrics.exports.JobThreadPoolStatusExports; +import org.apache.seatunnel.engine.server.telemetry.metrics.exports.NodeMetricExports; + +import com.hazelcast.instance.impl.Node; +import io.prometheus.client.CollectorRegistry; +import io.prometheus.client.hotspot.DefaultExports; + +public final class ExportsInstanceInitializer { + + private static boolean initialized = false; + + private ExportsInstanceInitializer() {} + + public static synchronized void init(Node node) { + if (!initialized) { + // initialize jvm collector + DefaultExports.initialize(); + + // register collectors + CollectorRegistry collectorRegistry = CollectorRegistry.defaultRegistry; + // Job info detail + new JobMetricExports(node).register(collectorRegistry); + // Thread pool status + new JobThreadPoolStatusExports(node).register(collectorRegistry); + // Node metrics + new NodeMetricExports(node).register(collectorRegistry); + // Cluster metrics + new ClusterMetricExports(node).register(collectorRegistry); + initialized = true; + } + } +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/entity/JobCounter.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/entity/JobCounter.java new file mode 100644 index 00000000000..a965bed7c66 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/entity/JobCounter.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; + +@Data +@AllArgsConstructor +public class JobCounter { + private long createdJobCount; + private long scheduledJobCount; + private long runningJobCount; + private long failingJobCount; + private long failedJobCount; + private long cancellingJobCount; + private long canceledJobCount; + private long finishedJobCount; +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/entity/ThreadPoolStatus.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/entity/ThreadPoolStatus.java new file mode 100644 index 00000000000..ad64685603c --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/entity/ThreadPoolStatus.java @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; + +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.atomic.AtomicLong; + +@Data +@AllArgsConstructor +public class ThreadPoolStatus { + private int activeCount; + private int corePoolSize; + private int maximumPoolSize; + private int poolSize; + private long completedTaskCount; + private long taskCount; + private long queueTaskCount; + private long rejectionCount; + + public static class RejectionCountingHandler extends ThreadPoolExecutor.AbortPolicy { + + private final AtomicLong rejectionCount = new AtomicLong(0); + + @Override + public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { + rejectionCount.incrementAndGet(); + super.rejectedExecution(r, executor); + } + + public long getRejectionCount() { + return rejectionCount.get(); + } + } +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/ClusterMetricExports.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/ClusterMetricExports.java new file mode 100644 index 00000000000..19910e6a754 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/ClusterMetricExports.java @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics.exports; + +import org.apache.seatunnel.engine.server.telemetry.metrics.AbstractCollector; + +import com.hazelcast.cluster.impl.MemberImpl; +import com.hazelcast.instance.impl.Node; +import io.prometheus.client.GaugeMetricFamily; + +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +public class ClusterMetricExports extends AbstractCollector { + + public ClusterMetricExports(Node node) { + super(node); + } + + @Override + public List collect() { + List mfs = new ArrayList(); + + // cluster_info + clusterInfo(mfs); + // cluster_time + clusterTime(mfs); + // instance count + nodeCount(mfs); + + return mfs; + } + + private void clusterTime(final List mfs) { + GaugeMetricFamily metricFamily = + new GaugeMetricFamily( + "cluster_time", + "Cluster start time", + clusterLabelNames("hazelcastVersion")); + List labelValues = labelValues(getClusterService().getClusterVersion().toString()); + + metricFamily.addMetric(labelValues, getClusterService().getClusterTime()); + mfs.add(metricFamily); + } + + private void clusterInfo(final List mfs) { + GaugeMetricFamily metricFamily = + new GaugeMetricFamily( + "cluster_info", + "Cluster info", + clusterLabelNames("hazelcastVersion", "master")); + List labelValues = null; + try { + labelValues = + labelValues( + getClusterService().getClusterVersion().toString(), masterAddress()); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + + metricFamily.addMetric(labelValues, 1.0); + mfs.add(metricFamily); + } + + private void nodeCount(final List mfs) { + Collection memberImpls = getClusterService().getMemberImpls(); + + GaugeMetricFamily metricFamily = + new GaugeMetricFamily( + "node_count", "Cluster node total count ", clusterLabelNames()); + List labelValues = labelValues(); + + metricFamily.addMetric(labelValues, memberImpls.size()); + mfs.add(metricFamily); + } +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/JobMetricExports.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/JobMetricExports.java new file mode 100644 index 00000000000..7a7bf7f9003 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/JobMetricExports.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics.exports; + +import org.apache.seatunnel.engine.server.CoordinatorService; +import org.apache.seatunnel.engine.server.telemetry.metrics.AbstractCollector; +import org.apache.seatunnel.engine.server.telemetry.metrics.entity.JobCounter; + +import com.hazelcast.instance.impl.Node; +import io.prometheus.client.GaugeMetricFamily; + +import java.util.ArrayList; +import java.util.List; + +public class JobMetricExports extends AbstractCollector { + + public JobMetricExports(Node node) { + super(node); + } + + @Override + public List collect() { + List mfs = new ArrayList(); + // Only the master can get job metrics + if (isMaster()) { + CoordinatorService coordinatorService = getCoordinatorService(); + JobCounter jobCountMetrics = coordinatorService.getJobCountMetrics(); + + GaugeMetricFamily metricFamily = + new GaugeMetricFamily( + "job_count", + "All job counts of seatunnel cluster ", + clusterLabelNames("type")); + + metricFamily.addMetric(labelValues("canceled"), jobCountMetrics.getCanceledJobCount()); + metricFamily.addMetric( + labelValues("cancelling"), jobCountMetrics.getCancellingJobCount()); + metricFamily.addMetric(labelValues("created"), jobCountMetrics.getCreatedJobCount()); + metricFamily.addMetric(labelValues("failed"), jobCountMetrics.getFailedJobCount()); + metricFamily.addMetric(labelValues("failing"), jobCountMetrics.getFailingJobCount()); + metricFamily.addMetric(labelValues("finished"), jobCountMetrics.getFinishedJobCount()); + metricFamily.addMetric(labelValues("running"), jobCountMetrics.getRunningJobCount()); + metricFamily.addMetric( + labelValues("scheduled"), jobCountMetrics.getScheduledJobCount()); + + mfs.add(metricFamily); + } + return mfs; + } +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/JobThreadPoolStatusExports.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/JobThreadPoolStatusExports.java new file mode 100644 index 00000000000..e50bffd5471 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/JobThreadPoolStatusExports.java @@ -0,0 +1,122 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics.exports; + +import org.apache.seatunnel.engine.server.telemetry.metrics.AbstractCollector; +import org.apache.seatunnel.engine.server.telemetry.metrics.entity.ThreadPoolStatus; + +import com.hazelcast.instance.impl.Node; +import io.prometheus.client.CounterMetricFamily; +import io.prometheus.client.GaugeMetricFamily; + +import java.util.ArrayList; +import java.util.List; + +public class JobThreadPoolStatusExports extends AbstractCollector { + + private static String HELP = + "The %s of seatunnel coordinator job's executor cached thread pool"; + + public JobThreadPoolStatusExports(Node node) { + super(node); + } + + @Override + public List collect() { + List mfs = new ArrayList(); + + ThreadPoolStatus threadPoolStatusMetrics = getServer().getThreadPoolStatusMetrics(); + List labelNames = clusterLabelNames(ADDRESS, "type"); + + GaugeMetricFamily activeCount = + new GaugeMetricFamily( + "job_thread_pool_activeCount", + String.format(HELP, "activeCount"), + labelNames); + activeCount.addMetric( + labelValues(localAddress(), "activeCount"), + threadPoolStatusMetrics.getActiveCount()); + mfs.add(activeCount); + + CounterMetricFamily completedTask = + new CounterMetricFamily( + "job_thread_pool_completedTask", + String.format(HELP, "completedTask"), + labelNames); + completedTask.addMetric( + labelValues(localAddress(), "completedTask"), + threadPoolStatusMetrics.getCompletedTaskCount()); + mfs.add(completedTask); + + GaugeMetricFamily corePoolSize = + new GaugeMetricFamily( + "job_thread_pool_corePoolSize", + String.format(HELP, "corePoolSize"), + labelNames); + corePoolSize.addMetric( + labelValues(localAddress(), "corePoolSize"), + threadPoolStatusMetrics.getCorePoolSize()); + mfs.add(corePoolSize); + + GaugeMetricFamily maximumPoolSize = + new GaugeMetricFamily( + "job_thread_pool_maximumPoolSize", + String.format(HELP, "maximumPoolSize"), + labelNames); + maximumPoolSize.addMetric( + labelValues(localAddress(), "maximumPoolSize"), + threadPoolStatusMetrics.getMaximumPoolSize()); + mfs.add(maximumPoolSize); + + GaugeMetricFamily poolSize = + new GaugeMetricFamily( + "job_thread_pool_poolSize", String.format(HELP, "poolSize"), labelNames); + poolSize.addMetric( + labelValues(localAddress(), "poolSize"), threadPoolStatusMetrics.getPoolSize()); + mfs.add(poolSize); + + CounterMetricFamily taskCount = + new CounterMetricFamily( + "job_thread_pool_task", String.format(HELP, "taskCount"), labelNames); + taskCount.addMetric( + labelValues(localAddress(), "taskCount"), threadPoolStatusMetrics.getTaskCount()); + mfs.add(taskCount); + + GaugeMetricFamily queueTaskCount = + new GaugeMetricFamily( + "job_thread_pool_queueTaskCount", + String.format(HELP, "queueTaskCount"), + labelNames); + queueTaskCount.addMetric( + labelValues(localAddress(), "queueTaskCount"), + threadPoolStatusMetrics.getQueueTaskCount()); + mfs.add(queueTaskCount); + + CounterMetricFamily rejectedTaskCount = + new CounterMetricFamily( + "job_thread_pool_rejection", + String.format(HELP, "rejectionCount"), + labelNames); + rejectedTaskCount.addMetric( + labelValues(localAddress(), "rejectionCount"), + threadPoolStatusMetrics.getRejectionCount()); + mfs.add(rejectedTaskCount); + + return mfs; + } +} diff --git a/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/NodeMetricExports.java b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/NodeMetricExports.java new file mode 100644 index 00000000000..c092ffd51b9 --- /dev/null +++ b/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/telemetry/metrics/exports/NodeMetricExports.java @@ -0,0 +1,407 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.seatunnel.engine.server.telemetry.metrics.exports; + +import org.apache.seatunnel.engine.server.telemetry.metrics.AbstractCollector; + +import com.hazelcast.instance.impl.Node; +import com.hazelcast.internal.jmx.InstanceMBean; +import com.hazelcast.internal.jmx.PartitionServiceMBean; +import io.prometheus.client.GaugeMetricFamily; + +import java.util.ArrayList; +import java.util.List; + +public class NodeMetricExports extends AbstractCollector { + + public NodeMetricExports(Node node) { + super(node); + } + + @Override + public List collect() { + List mfs = new ArrayList(); + // instance state + nodeState(mfs); + + InstanceMBean instanceMBean = getManagementService().getInstanceMBean(); + if (instanceMBean == null) { + return mfs; + } + + // node hazelcast executor + String address = localAddress(); + List labelNames = clusterLabelNames(ADDRESS, "type"); + GaugeMetricFamily isShutdownMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_isShutdown", + "The hazelcast executor isShutdown of seatunnel cluster node", + labelNames); + GaugeMetricFamily isTerminatedMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_isTerminated", + "The hazelcast executor isTerminated of seatunnel cluster node", + labelNames); + + GaugeMetricFamily maxPoolSizeMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_maxPoolSize", + "The hazelcast executor maxPoolSize of seatunnel cluster node", + labelNames); + + GaugeMetricFamily poolSizeMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_poolSize", + "The hazelcast executor poolSize of seatunnel cluster node", + labelNames); + + GaugeMetricFamily queueRemainingCapacityMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_queueRemainingCapacity", + "The hazelcast executor queueRemainingCapacity of seatunnel cluster ", + labelNames); + + GaugeMetricFamily queueSizeMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_queueSize", + "The hazelcast executor queueSize of seatunnel cluster node", + labelNames); + + GaugeMetricFamily executedCountMetricFamily = + new GaugeMetricFamily( + "hazelcast_executor_executedCount", + "The hazelcast executor executedCount of seatunnel cluster node", + labelNames); + + List asyncValues = labelValues(address, "async"); + List clientBlockingValues = labelValues(address, "clientBlocking"); + List clientExecutorValues = labelValues(address, "client"); + List clientQueryValues = labelValues(address, "clientQuery"); + List ioValues = labelValues(address, "io"); + List offloadableValues = labelValues(address, "offloadable"); + List scheduledValues = labelValues(address, "scheduled"); + List systemValues = labelValues(address, "system"); + + // Executor executedCount + longMetric( + executedCountMetricFamily, + instanceMBean.getAsyncExecutorMBean().getExecutedCount(), + asyncValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getClientExecutorMBean().getExecutedCount(), + clientExecutorValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().getExecutedCount(), + clientBlockingValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getClientQueryExecutorMBean().getExecutedCount(), + clientQueryValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getIoExecutorMBean().getExecutedCount(), + ioValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getOffloadableExecutorMBean().getExecutedCount(), + offloadableValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getScheduledExecutorMBean().getExecutedCount(), + scheduledValues); + longMetric( + executedCountMetricFamily, + instanceMBean.getSystemExecutorMBean().getExecutedCount(), + systemValues); + mfs.add(executedCountMetricFamily); + + // Executor isShutdown + intMetric( + isShutdownMetricFamily, + instanceMBean.getAsyncExecutorMBean().isShutdown() ? 1 : 0, + asyncValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getClientExecutorMBean().isShutdown() ? 1 : 0, + clientExecutorValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().isShutdown() ? 1 : 0, + clientBlockingValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getClientQueryExecutorMBean().isShutdown() ? 1 : 0, + clientQueryValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getIoExecutorMBean().isShutdown() ? 1 : 0, + ioValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getOffloadableExecutorMBean().isShutdown() ? 1 : 0, + offloadableValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getScheduledExecutorMBean().isShutdown() ? 1 : 0, + scheduledValues); + intMetric( + isShutdownMetricFamily, + instanceMBean.getSystemExecutorMBean().isShutdown() ? 1 : 0, + systemValues); + mfs.add(isShutdownMetricFamily); + + // Executor isTerminated + intMetric( + isTerminatedMetricFamily, + instanceMBean.getAsyncExecutorMBean().isTerminated() ? 1 : 0, + asyncValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getClientExecutorMBean().isTerminated() ? 1 : 0, + clientExecutorValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().isTerminated() ? 1 : 0, + clientBlockingValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getClientQueryExecutorMBean().isTerminated() ? 1 : 0, + clientQueryValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getIoExecutorMBean().isTerminated() ? 1 : 0, + ioValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getOffloadableExecutorMBean().isTerminated() ? 1 : 0, + offloadableValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getScheduledExecutorMBean().isTerminated() ? 1 : 0, + scheduledValues); + intMetric( + isTerminatedMetricFamily, + instanceMBean.getSystemExecutorMBean().isTerminated() ? 1 : 0, + systemValues); + mfs.add(isTerminatedMetricFamily); + + // Executor maxPoolSize + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getAsyncExecutorMBean().maxPoolSize(), + asyncValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getClientExecutorMBean().maxPoolSize(), + clientExecutorValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().maxPoolSize(), + clientBlockingValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getClientQueryExecutorMBean().maxPoolSize(), + clientQueryValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getIoExecutorMBean().maxPoolSize(), + ioValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getOffloadableExecutorMBean().maxPoolSize(), + offloadableValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getScheduledExecutorMBean().maxPoolSize(), + scheduledValues); + intMetric( + maxPoolSizeMetricFamily, + instanceMBean.getSystemExecutorMBean().maxPoolSize(), + systemValues); + mfs.add(maxPoolSizeMetricFamily); + + // Executor poolSize + intMetric( + poolSizeMetricFamily, + instanceMBean.getAsyncExecutorMBean().poolSize(), + asyncValues); + intMetric( + poolSizeMetricFamily, + instanceMBean.getClientExecutorMBean().poolSize(), + clientExecutorValues); + intMetric( + poolSizeMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().poolSize(), + clientBlockingValues); + intMetric( + poolSizeMetricFamily, + instanceMBean.getClientQueryExecutorMBean().poolSize(), + clientQueryValues); + intMetric(poolSizeMetricFamily, instanceMBean.getIoExecutorMBean().poolSize(), ioValues); + intMetric( + poolSizeMetricFamily, + instanceMBean.getOffloadableExecutorMBean().poolSize(), + offloadableValues); + intMetric( + poolSizeMetricFamily, + instanceMBean.getScheduledExecutorMBean().poolSize(), + scheduledValues); + intMetric( + poolSizeMetricFamily, + instanceMBean.getSystemExecutorMBean().poolSize(), + systemValues); + mfs.add(poolSizeMetricFamily); + + // Executor queueRemainingCapacity + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getAsyncExecutorMBean().queueRemainingCapacity(), + asyncValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getClientExecutorMBean().queueRemainingCapacity(), + clientExecutorValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().queueRemainingCapacity(), + clientBlockingValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getClientQueryExecutorMBean().queueRemainingCapacity(), + clientQueryValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getIoExecutorMBean().queueRemainingCapacity(), + ioValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getOffloadableExecutorMBean().queueRemainingCapacity(), + offloadableValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getScheduledExecutorMBean().queueRemainingCapacity(), + scheduledValues); + intMetric( + queueRemainingCapacityMetricFamily, + instanceMBean.getSystemExecutorMBean().queueRemainingCapacity(), + systemValues); + mfs.add(queueRemainingCapacityMetricFamily); + + // Executor queueSize + intMetric( + queueSizeMetricFamily, + instanceMBean.getAsyncExecutorMBean().queueSize(), + asyncValues); + intMetric( + queueSizeMetricFamily, + instanceMBean.getClientExecutorMBean().queueSize(), + clientExecutorValues); + intMetric( + queueSizeMetricFamily, + instanceMBean.getClientBlockingExecutorMBean().queueSize(), + clientBlockingValues); + intMetric( + queueSizeMetricFamily, + instanceMBean.getClientQueryExecutorMBean().queueSize(), + clientQueryValues); + intMetric(queueSizeMetricFamily, instanceMBean.getIoExecutorMBean().queueSize(), ioValues); + intMetric( + queueSizeMetricFamily, + instanceMBean.getOffloadableExecutorMBean().queueSize(), + offloadableValues); + intMetric( + queueSizeMetricFamily, + instanceMBean.getScheduledExecutorMBean().queueSize(), + scheduledValues); + intMetric( + queueSizeMetricFamily, + instanceMBean.getSystemExecutorMBean().queueSize(), + systemValues); + mfs.add(queueSizeMetricFamily); + + // partition metric + partitionMetric(instanceMBean.getPartitionServiceMBean(), mfs, address); + + return mfs; + } + + private void partitionMetric( + PartitionServiceMBean partitionServiceMBean, + List mfs, + String address) { + List labelNames = clusterLabelNames(ADDRESS); + + GaugeMetricFamily partitionPartitionCount = + new GaugeMetricFamily( + "hazelcast_partition_partitionCount", + "The partitionCount of seatunnel cluster node", + labelNames); + intMetric( + partitionPartitionCount, + partitionServiceMBean.getPartitionCount(), + labelValues(address)); + mfs.add(partitionPartitionCount); + + GaugeMetricFamily partitionActivePartition = + new GaugeMetricFamily( + "hazelcast_partition_activePartition", + "The activePartition of seatunnel cluster node", + labelNames); + intMetric( + partitionActivePartition, + partitionServiceMBean.getActivePartitionCount(), + labelValues(address)); + mfs.add(partitionActivePartition); + + GaugeMetricFamily partitionIsClusterSafe = + new GaugeMetricFamily( + "hazelcast_partition_isClusterSafe", + "Whether is cluster safe of partition", + labelNames); + intMetric( + partitionIsClusterSafe, + partitionServiceMBean.isClusterSafe() ? 1 : 0, + labelValues(address)); + mfs.add(partitionIsClusterSafe); + + GaugeMetricFamily partitionIsLocalMemberSafe = + new GaugeMetricFamily( + "hazelcast_partition_isLocalMemberSafe", + "Whether is local member safe of partition", + labelNames); + intMetric( + partitionIsLocalMemberSafe, + partitionServiceMBean.isLocalMemberSafe() ? 1 : 0, + labelValues(address)); + mfs.add(partitionIsLocalMemberSafe); + } + + private void nodeState(List mfs) { + GaugeMetricFamily metricFamily = + new GaugeMetricFamily( + "node_state", + "Whether is up of seatunnel node ", + clusterLabelNames(ADDRESS)); + String address = localAddress(); + List labelValues = labelValues(address); + metricFamily.addMetric(labelValues, 1); + mfs.add(metricFamily); + } +} diff --git a/tools/dependencies/known-dependencies.txt b/tools/dependencies/known-dependencies.txt index c2f431836b6..f9649431328 100755 --- a/tools/dependencies/known-dependencies.txt +++ b/tools/dependencies/known-dependencies.txt @@ -53,3 +53,10 @@ protoc-jar-3.11.4.jar error_prone_annotations-2.18.0.jar gson-2.8.9.jar j2objc-annotations-2.8.jar +simpleclient-0.16.0.jar +simpleclient_common-0.16.0.jar +simpleclient_hotspot-0.16.0.jar +simpleclient_httpserver-0.16.0.jar +simpleclient_tracer_common-0.16.0.jar +simpleclient_tracer_otel-0.16.0.jar +simpleclient_tracer_otel_agent-0.16.0.jar