From 95ada858bc6a827f23cb5c03ae53bb40d4575cb6 Mon Sep 17 00:00:00 2001 From: outductor Date: Sun, 24 Dec 2023 15:57:30 +0900 Subject: [PATCH] add prometheus metriocs --- .../common-configs/plugin-configs.yaml | 21 +++++++++++++++++++ .../templates/debug-s1/seichiassist.yaml | 5 +++++ .../templates/debug-s1/service-monitor.yaml | 2 ++ .../templates/debug-s1/service.yaml | 4 ++++ 4 files changed, 32 insertions(+) diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/common-configs/plugin-configs.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/common-configs/plugin-configs.yaml index a2d0e6fbc..a90e14bbe 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/common-configs/plugin-configs.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/common-configs/plugin-configs.yaml @@ -1158,3 +1158,24 @@ data: ender-dragon: is-enabled: true ignored-worlds: [] + + PrometheusExporter-config.yml: | + host: 0.0.0.0 + port: 9225 + enable_metrics: + entities_total: true + villagers_total: true + loaded_chunks_total: true + jvm_memory: true + players_online_total: true + players_total: true + tps: true + world_size: true + jvm_threads: true + jvm_gc: true + tick_duration_median: true + tick_duration_average: true + tick_duration_min: false + tick_duration_max: true + player_online: true + player_statistic: true diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml index 066509587..7f3cb9c61 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml @@ -297,6 +297,11 @@ spec: mountPath: /plugins/ByeByeWither/config.yml subPath: ByeByeWither-config.yml + # PrometheusExporter プラグインの設定ファイル + - name: common-mcserver-plugin-configs + mountPath: /plugins/PrometheusExporter/config.yml + subPath: PrometheusExporter-config.yml + # SeichiAssist プラグインの設定ファイル - name: seichiassist-config mountPath: /plugins/SeichiAssist/config.yml diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service-monitor.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service-monitor.yaml index 1917f20ff..137f77460 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service-monitor.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service-monitor.yaml @@ -10,6 +10,8 @@ spec: endpoints: - interval: 30s port: jmx-metrics + - interval: 30s + port: prometheus selector: matchLabels: app: mcserver diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service.yaml index 291fa93e3..842231bcb 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/service.yaml @@ -17,5 +17,9 @@ spec: port: 18321 protocol: TCP targetPort: jmx-metrics + - name: prometheus + port: 9225 + protocol: TCP + targetPort: prometheus selector: mcserver: debug-s1