Push Gateway
Publish TenXSummary instance values as metric counters to a Prometheus Push Gateway.
This output utilizes the Prometheus Micrometer registry.
Configuration
To configure the Prometheus Push gateway metrics output module, Edit these settings.
Below is the default configuration from: push-gateway/config.yaml (* Required Fields).
ewogICJ0eXBlIiA6ICJvYmplY3QiLAogICJwcm9wZXJ0aWVzIiA6IHsKICAgICJpbmNsdWRlIiA6IHsKICAgICAgInR5cGUiIDogInN0cmluZyIKICAgIH0sCiAgICAidGVueCIgOiB7CiAgICAgICJ0eXBlIiA6ICJzdHJpbmciCiAgICB9LAogICAgInByb21ldGhldXNQRyIgOiB7CiAgICAgICJ0eXBlIiA6ICJhcnJheSIsCiAgICAgICJpdGVtcyIgOiB7CiAgICAgICAgInR5cGUiIDogIm9iamVjdCIsCiAgICAgICAgImFkZGl0aW9uYWxQcm9wZXJ0aWVzIiA6IGZhbHNlLAogICAgICAgICJwcm9wZXJ0aWVzIiA6IHsKICAgICAgICAgICJlbmFibGVkIiA6IHsKICAgICAgICAgICAgInR5cGUiIDogWwogICAgICAgICAgICAgICJib29sZWFuIiwKICAgICAgICAgICAgICAic3RyaW5nIgogICAgICAgICAgICBdLAogICAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiRW5hYmxlIHRoaXMgb3V0cHV0XG5cbkVuYWJsZSBvciBkaXNhYmxlIHRoaXMgb3V0cHV0LiAoQWNjZXB0cyBib29sZWFuIG9yIHN0cmluZyB3aXRoICQ9IHByZWZpeCBmb3IgcnVudGltZSBldmFsdWF0aW9uKSAoRGVmYXVsdDogdHJ1ZSkiLAogICAgICAgICAgICAiZGVmYXVsdCIgOiB0cnVlCiAgICAgICAgICB9LAogICAgICAgICAgImhvc3QiIDogewogICAgICAgICAgICAidHlwZSIgOiBbCiAgICAgICAgICAgICAgInN0cmluZyIsCiAgICAgICAgICAgICAgIm51bGwiCiAgICAgICAgICAgIF0sCiAgICAgICAgICAgICJtYXJrZG93bkRlc2NyaXB0aW9uIiA6ICJIb3N0IGF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A6IFsKICAgICAgICAgICAgICAiYXJyYXkiLAogICAgICAgICAgICAgICJudWxsIgogICAgICAgICAgICBdLAogICAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiTmFtZXMgb2YgdGhlIFRlblhTdW1tYXJ5IGZpZWxkcyB1c2VkIHRvIGluY3JlbWVudCB0aGUgbWV0cmljIGNvdW50ZXIgdmFsdWVcblxuRGVmaW5lcyB0aGUgbmFtZSBvZiB0aGUgVGVuWFN1bW1hcnkgZmllbGQgYnkgd2hvc2UgdmFsdWUgdG8gaW5jcmVtZW50IHRoZSBjb3VudGVyLiIsCiAgICAgICAgICAgICJpdGVtcyIgOiB7CiAgICAgICAgICAgICAgInR5cGUiIDogInN0cmluZyIKICAgICAgICAgICAgfQogICAgICAgICAgfSwKICAgICAgICAgICJ0YWdGaWVsZHMiIDogewogICAgICAgICAgICAidHlwZSIgOiBbCiAgICAgICAgICAgICAgImFycmF5IiwKICAgICAgICAgICAgICAibnVsbCIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIm1hcmtkb3duRGVzY3JpcHRpb24iIDogIkxpc3Qgb2YgVGVuWFN1bW1hcnkgZmllbGRzIHRvIHVzZSBhcyBtZXRyaWMgdGFnIHZhbHVlc1xuXG5EZWZpbmVzIHRoZSBUZW5YU3VtbWFyeSBmaWVsZCBuYW1lcyB0byB1c2UgYXMgYHRhZ2AgdmFsdWVzLiBUYWdzIGFyZSBkaW1lbnNpb25zIHRoYXQgZW5hYmxlIHNsaWNpbmcgYSBwYXJ0aWN1bGFyIG5hbWVkIG1ldHJpYyB0byBkcmlsbCBkb3duIHRvIHJlYXNvbiBhYm91dCBpdHMgdmFsdWUuIFRvIGxlYXJuIG1vcmUgc2VlIFttaWNyb21ldGVyIHRhZ3NdKGh0dHBzOi8vd3d3LmJhZWxkdW5nLmNvbS9taWNyb21ldGVyIzEtdGFncykiLAogICAgICAgICAgICAiaXRlbXMiIDogewogICAgICAgICAgICAgICJ0eXBlIiA6ICJzdHJpbmciCiAgICAgICAgICAgIH0KICAgICAgICAgIH0sCiAgICAgICAgICAidGFnRmllbGROYW1lcyIgOiB7CiAgICAgICAgICAgICJ0eXBlIiA6IFsKICAgICAgICAgICAgICAiYXJyYXkiLAogICAgICAgICAgICAgICJudWxsIgogICAgICAgICAgICBdLAogICAgICAgICAgICAibWFya2Rvd25EZXNjcmlwdGlvbiIgOiAiTGlzdCBvZiBjdXN0b20gbmFtZXMgdG8gdXNlIGZvciBUZW5YU3VtbWFyeSBmaWVsZHMuXG5cbkRlZmluZXMgdGhlIGEgbGlzdCBvZiBjdXN0b20gbmFtZXMgdG8gZ2l2ZSBmaWVsZHMgd2hlbiByZXBvcnRpbmcgdGhlbS4gRm9ybWF0IGFzIGEgbGlzdCBvZiBuYW1lMSwgY3VzdG9tMSwgbmFtZTIsIGN1c3RvbTIuICBGb3IgZXhhbXBsZSwgdG8gc2V0IGEgY3VzdG9tIG5hbWUgb2YgJ015LUN1c3RvbS1GaWVsZCcgdG8gYW4gZXhpc3RpbmcgJ2ludHJpbnNpYy1maWVsZCc6IGBgYCB5YW1sIHByb21ldGhldXNQRzogICB0YWdGaWVsZE5hbWVzOiAgICAgLSBpbnRyaW5zaWMtZmllbGQgICAgIC0gTXktQ3VzdG9tLUZpZWxkIiwKICAgICAgICAgICAgIml0ZW1zIiA6IHsKICAgICAgICAgICAgICAidHlwZSIgOiAic3RyaW5nIgogICAgICAgICAgICB9CiAgICAgICAgICB9LAogICAgICAgICAgImZpbHRlciIgOiB7CiAgICAgICAgICAgICJ0eXBlIiA6IFsKICAgICAgICAgICAgICAic3RyaW5nIiwKICAgICAgICAgICAgICAibnVsbCIKICAgICAgICAgICAgXSwKICAgICAgICAgICAgIm1hcmtkb3duRGVzY3JpcHRpb24iIDogIkEgSmF2YVNjcmlwdCBleHByZXNzaW9uIGFuIFRlblhTdW1tYXJ5IG11c3QgZXZhbHVhdGUgYXMgJ3RydXRoeScgYWdhaW5zdCB0byBiZSB3cml0dGVuIH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bnVtYmVyIG9yIHN0cmluZyB3aXRoICQ9IHByZWZpeCBmb3IgcnVudGltZSBldmFsdWF0aW9uKSAoRGVmYXVsdDogNTAwKSIsCiAgICAgICAgICAgICJkZWZhdWx0IiA6IDUwMAogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgInJlcXVpcmVkIiA6IFsKICAgICAgICAgICJob3N0IiwKICAgICAgICAgICJqb2IiCiAgICAgICAgXQogICAgICB9CiAgICB9CiAgfSwKICAiYWRkaXRpb25hbFByb3BlcnRpZXMiIDogZmFsc2UKfQ==
# 🔟❎ 'run' Prometheus push gateway metric output configuration
# Configures Prometheus push gateway metric counter outputs.
# To learn more see https://doc.log10x.com/run/output/metric/prometheus/push-gateway/
# For the Prometheus push gateway see: https://prometheus.io/docs/practices/pushing/
# Set the 10x pipeline to 'run'
tenx: run
# =============================== Dependencies ================================
include: run/modules/output/metric/prometheus/push-gateway
# ========================== Prometheus PG Options ============================
# Define multiple Prometheus push gateway metric outputs below
prometheusPG:
# --------------------------- Connection Options --------------------------
# 'host' sets the address and port number of the push gateway
- host: localhost:9091 # (❗ REQUIRED)
# 'job' sets the logical job name reported to the push gateway
job: my-10x-job
# ---------------------------- Counter Options ----------------------------
# 'nameField' sets the TenXSummary field whose value identifies the micrometer counter to increment.
# The 'inputName' field returns the name of the aggregator that produced the target TenXSummary instance.
# To learn more see https://doc.log10x.com/run/aggregate
nameField: inputName
# 'counterFields' specifies the TenXSummary fields whose values are used to increment the counter.
# To learn more see https://doc.log10x.com/run/aggregate/#summary-fields
counterFields:
- summaryVolume
- summaryBytes
- summaryTotals
# 'tagFields' sets the TenXSummary fields used as the counter tag dimension values.
# Defaults to https://doc.log10x.com/run/initialize/#enrichmentFields
tagFields:
- $=yield TenXEnv.get("enrichmentFields")
# 'tagFieldNames' allows setting custom names to aggregated fields for metrics reporting.
# Defaults to https://doc.log10x.com/run/initialize/#metricFieldNames
tagFieldNames:
- $=yield TenXEnv.get("metricFieldNames")
# 'filter' sets a JavaScript expression that TenXSummaries must evaluate as truthy to write to the output.
# To learn more see https://doc.log10x.com/run/output/regulate/#filter-expressions
filter: isSummary
# ---------------------------- Publish Options ----------------------------
# 'step' sets the interval to send metrics Prometheus PG (e.g., '1m').
# To learn more see https://micrometer.io/docs/concepts#rate-aggregation
step: 5s
Options
Specify the options below to configure multiple Prometheus Push gateway metrics output:
| Name | Description | Category |
|---|---|---|
| prometheusPGEnabled | Enable this output | General |
| prometheusPGHost | Host address of Prometheus push gateway instance to push data to | Connection |
| prometheusPGJob | Name of job assigned to pushed metrics | Connection |
| prometheusPGStep | The interval at which to publish metrics to output | Counter |
| prometheusPGNameField | Name of the TenXSummary field identifying the metric | Counter |
| prometheusPGCounterFields | Names of the TenXSummary fields used to increment the metric counter value | Counter |
| prometheusPGTagFields | List of TenXSummary fields to use as metric tag values | Counter |
| prometheusPGTagFieldNames | List of custom names to use for TenXSummary fields. | Counter |
| prometheusPGFilter | A JavaScript expression an TenXSummary must evaluate as 'truthy' against to be written to this output | Counter |
| prometheusPGMaxCardinality | Maximum number of unique metric combinations allowed | Counter |
General
prometheusPGEnabled
Enable this output.
| Type | Default | Category |
|---|---|---|
| Boolean | true | General |
Enable or disable this output.
Connection
prometheusPGHost
Host address of Prometheus push gateway instance to push data to.
| Type | Required | Category |
|---|---|---|
| String | ✔ | Connection |
Defines the host address of the push gateway used for pushing the metrics.
prometheusPGJob
Name of job assigned to pushed metrics.
| Type | Required | Category |
|---|---|---|
| String | ✔ | Connection |
Defines the name of the job that to assign to output metrics.
Counter
prometheusPGStep
The interval at which to publish metrics to output.
| Type | Default | Category |
|---|---|---|
| String | 1min | Counter |
Sets the interval at which to publish metrics to the time-series destination (e.g., '1m'). To learn more see rate-aggregation.
prometheusPGNameField
Name of the TenXSummary field identifying the metric.
| Type | Default | Category |
|---|---|---|
| String | summaryValues | Counter |
Defines the name of the TenXSummary field whose value identifies a metric counter. Defaults to the summaryValues field which holds the value(s) by which TenXObjects are grouped into the current TenXSummary instance. To learn more see micrometer counters.
prometheusPGCounterFields
Names of the TenXSummary fields used to increment the metric counter value.
| Type | Default | Category |
|---|---|---|
| List | summaryVolume | Counter |
Defines the name of the TenXSummary field by whose value to increment the counter.
prometheusPGTagFields
List of TenXSummary fields to use as metric tag values.
| Type | Default | Category |
|---|---|---|
| List | [] | Counter |
Defines the TenXSummary field names to use as tag values.
Tags are dimensions that enable slicing a particular named metric to drill down to reason about its value.
To learn more see micrometer tags.
prometheusPGTagFieldNames
List of custom names to use for TenXSummary fields.
| Type | Default | Category |
|---|---|---|
| List | [] | Counter |
Defines the a list of custom names to give fields when reporting them. Format as a list of name1, custom1, name2, custom2.
For example, to set a custom name of 'My-Custom-Field' to an existing 'intrinsic-field':
prometheusPGFilter
A JavaScript expression an TenXSummary must evaluate as 'truthy' against to be written to this output.
| Type | Default | Category |
|---|---|---|
| String | "" | Counter |
Specifies a JavaScript expression that an TenXSummary must evaluate as truthy to write its instance/template field values to the target counter.
For example, to only emit TenXSummaries produced by the 'myMetric' aggregator, specify:
To learn more see inputName.
prometheusPGMaxCardinality
Maximum number of unique metric combinations allowed.
| Type | Default | Category |
|---|---|---|
| Number | 500 | Counter |
Sets the maximum number of unique metric combinations (cardinality) allowed for this output. When exceeded, metrics will be dropped to prevent excessive cardinality.
This module is defined in push-gateway/module.yaml.