فهرست منبع

HPCC-26093 Move metrics config from values.yml into example files

Removed metrics config from values.yml. Created new examples
directory for metrics and added README and example yml files
for existing sinks.

Signed-off-by: Ken Rowland kenneth.rowland@lexisnexisrisk.com
Ken Rowland 4 سال پیش
والد
کامیت
59caf6d95e

+ 22 - 0
helm/examples/metrics/README.md

@@ -0,0 +1,22 @@
+# HPCC Metrics
+HPCC components collect metrics describing overall component health and state. In order to use component metrics for
+activities such as scaling and alerting, the collected metrics must be reported to a collection system such as
+Prometheus or Elasticsearch.
+
+## Enabling Metric Reporting
+To enable reporting of metrics to a collection system, add metric configuration settings to the helm chart. The
+configuration includes the collection system in use and the settings necessary to report metrics.
+
+The provided HPCC helm chart provides all global settings from its values.yml file to all components. To enable
+metrics reporting, either include the metrics configuration as a permanent part of your HPCC helm chart values.yml
+file, or add it as command line settings at chart installation. Since the configuration consists of multiple settings,
+if enabling metrics via the command line, use the _-f filename_ option for convenience.
+
+This directory contains examples of configuration settings for HPCC provided collection systems. See each file for
+a description of its available settings. Use the file as is, or customize for your installation.
+
+For example, the following adds the Prometheus configuration as the collection system.
+
+```code
+helm install mycluster ./hpcc -f <path>/prometheus_metrics.yml
+```

+ 19 - 0
helm/examples/metrics/filesink.yaml

@@ -0,0 +1,19 @@
+#
+# Defines a file sink for accepting metric reports.
+# Settings:
+#   type              - type of sink (must be file for the file sink)
+#   name              - name for the sink instance
+#   settings.filename - name of the file where metrics are to be written
+#   settings.clear    - true to clear the file when metric reporting begins
+#                       false to append to an existing file
+#   settings.period   - period in seconds between collections
+
+global:
+  metrics:
+    sinks:
+    - type: file
+      name: filesink
+      settings:
+        filename: testout.txt
+        clear: true
+        period: 5

+ 13 - 0
helm/examples/metrics/loggingsink.yaml

@@ -0,0 +1,13 @@
+#
+# Defines a logging sink that writes metric reports to the component defined log
+# Settings:
+#   type             - sink type (must be log for the logging sink)
+#   name             - name for the sink instance
+#   settings.period  - period in seconds between collections
+global:
+  metrics:
+    sinks:
+    - type: log
+      name: loggingsink
+      settings:
+        period: 60

+ 17 - 0
helm/examples/metrics/prometheus_metrics.yaml

@@ -0,0 +1,17 @@
+#
+# Defines a prometheus sink that responds to scraping requests
+# Settings:
+#   type                  - sink type (must be prometheus for prometheus support)
+#   name                  - name for the sink instance
+#   settings.port         - port number on which to listen for scrape requests
+#   settings.serviceName  - local service name for the prometheus HTTP service
+#   settings.verbose      - enables verbose reports
+global:
+  metrics:
+    sinks:
+    - type: prometheus
+      name: prometheussink
+      settings:
+        port: 8767
+        serviceName: metrics
+        verbose: true

+ 0 - 9
helm/hpcc/values.yaml

@@ -48,15 +48,6 @@ global:
   # Set postJobCommandViaSidecar to true, if the command needs to run with privilege, this will enable the command
   # to run as root in a sidecar in same process space as other containers, allowing it to for example send signals
   # to processes in sidecars
-
-  # Define global default metrics configuration for all components
-  metrics:
-    sinks:
-      - type: log
-        name: logging
-        settings:
-          period: 60
-
   # misc:
   #   postJobCommand: "curl -sf -XPOST http://127.0.0.1:15020/quitquitquit"
   # Or example for linkerd