Skip to content

Commit c8db500

Browse files
committed
MON-4558: enable zoneinfo node-exporter collector via config
Add optional nodeExporter.collectors.zoneinfo toggle (disabled by default). Wire --collector.zoneinfo/--no-collector.zoneinfo in updateNodeExporterArgs, extend unit/e2e tests, and add zoneinfo to telemeter collector success matcher. Update jsonnet/versions.yaml to match upstream component versions. CRD merge (config_merge.go) will be added once openshift/api#2948 merges and the vendor is updated with the NodeExporterCollectorZoneinfoConfig type.
1 parent de0f2b9 commit c8db500

13 files changed

Lines changed: 93 additions & 8 deletions

Documentation/api.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Configuring Cluster Monitoring is optional. If the config does not exist or is e
3838
* [NodeExporterCollectorSoftirqsConfig](#nodeexportercollectorsoftirqsconfig)
3939
* [NodeExporterCollectorSystemdConfig](#nodeexportercollectorsystemdconfig)
4040
* [NodeExporterCollectorTcpStatConfig](#nodeexportercollectortcpstatconfig)
41+
* [NodeExporterCollectorZoneinfoConfig](#nodeexportercollectorzoneinfoconfig)
4142
* [NodeExporterConfig](#nodeexporterconfig)
4243
* [OpenShiftStateMetricsConfig](#openshiftstatemetricsconfig)
4344
* [PrometheusK8sConfig](#prometheusk8sconfig)
@@ -256,6 +257,7 @@ The `NodeExporterCollectorConfig` resource defines settings for individual colle
256257
| processes | [NodeExporterCollectorProcessesConfig](#nodeexportercollectorprocessesconfig) | Defines the configuration of the `processes` collector, which collects statistics from processes and threads running in the system. Disabled by default. |
257258
| systemd | [NodeExporterCollectorSystemdConfig](#nodeexportercollectorsystemdconfig) | Defines the configuration of the `systemd` collector, which collects statistics on the systemd daemon and its managed services. Disabled by default. |
258259
| softirqs | [NodeExporterCollectorSoftirqsConfig](#nodeexportercollectorsoftirqsconfig) | Defines the configuration of the `softirqs` collector, which exposes detailed softirq metrics from `/proc/softirqs`. Disabled by default. |
260+
| zoneinfo | [NodeExporterCollectorZoneinfoConfig](#nodeexportercollectorzoneinfoconfig) | Defines the configuration of the `zoneinfo` collector, which exposes detailed memory zone statistics from `/proc/zoneinfo`. Disabled by default. |
259261

260262
[Back to TOC](#table-of-contents)
261263

@@ -411,6 +413,21 @@ The `NodeExporterCollectorTcpStatConfig` resource works as an on/off switch for
411413

412414
[Back to TOC](#table-of-contents)
413415

416+
## NodeExporterCollectorZoneinfoConfig
417+
418+
#### Description
419+
420+
The `NodeExporterCollectorZoneinfoConfig` resource works as an on/off switch for the `zoneinfo` collector of the `node-exporter` agent. The `zoneinfo` collector exposes per-zone memory page counts, watermarks, and protection thresholds from `/proc/zoneinfo`. By default, the `zoneinfo` collector is disabled.
421+
422+
423+
<em>appears in: [NodeExporterCollectorConfig](#nodeexportercollectorconfig)</em>
424+
425+
| Property | Type | Description |
426+
| -------- | ---- | ----------- |
427+
| enabled | bool | A Boolean flag that enables or disables the `zoneinfo` collector. |
428+
429+
[Back to TOC](#table-of-contents)
430+
414431
## NodeExporterConfig
415432

416433
#### Description

Documentation/data-collection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ data:
670670
# owners: (@openshift/openshift-team-monitoring)
671671
#
672672
# collector:node_scrape_collector_success:avg reports the average success of optional node_exporter's collectors running in the cluster.
673-
- '{__name__="collector:node_scrape_collector_success:avg",collector=~"ethtool|cpufreq|tcpstat|netdev|netclass|buddyinfo|mountstats|ksmd|processes|systemd|softirqs"}'
673+
- '{__name__="collector:node_scrape_collector_success:avg",collector=~"ethtool|cpufreq|tcpstat|netdev|netclass|buddyinfo|mountstats|ksmd|processes|systemd|softirqs|zoneinfo"}'
674674
#
675675
# owners: (@openshift/openshift-team-monitoring)
676676
#

Documentation/openshiftdocs/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The configuration file itself is always defined under the `config.yaml` key in t
5858
* link:modules/nodeexportercollectorsoftirqsconfig.adoc[NodeExporterCollectorSoftirqsConfig]
5959
* link:modules/nodeexportercollectorsystemdconfig.adoc[NodeExporterCollectorSystemdConfig]
6060
* link:modules/nodeexportercollectortcpstatconfig.adoc[NodeExporterCollectorTcpStatConfig]
61+
* link:modules/nodeexportercollectorzoneinfoconfig.adoc[NodeExporterCollectorZoneinfoConfig]
6162
* link:modules/nodeexporterconfig.adoc[NodeExporterConfig]
6263
* link:modules/openshiftstatemetricsconfig.adoc[OpenShiftStateMetricsConfig]
6364
* link:modules/prometheusk8sconfig.adoc[PrometheusK8sConfig]

Documentation/openshiftdocs/modules/nodeexportercollectorconfig.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Appears in: link:nodeexporterconfig.adoc[NodeExporterConfig]
4040

4141
|softirqs|link:nodeexportercollectorsoftirqsconfig.adoc[NodeExporterCollectorSoftirqsConfig]|Defines the configuration of the `softirqs` collector, which exposes detailed softirq metrics from `/proc/softirqs`. Disabled by default.
4242

43+
|zoneinfo|link:nodeexportercollectorzoneinfoconfig.adoc[NodeExporterCollectorZoneinfoConfig]|Defines the configuration of the `zoneinfo` collector, which exposes detailed memory zone statistics from `/proc/zoneinfo`. Disabled by default.
44+
4345
|===
4446

4547
link:../index.adoc[Back to TOC]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// DO NOT EDIT THE CONTENT IN THIS FILE. It is automatically generated from the
2+
// source code for the Cluster Monitoring Operator. Any changes made to this
3+
// file will be overwritten when the content is re-generated. If you wish to
4+
// make edits, read the docgen utility instructions in the source code for the
5+
// CMO.
6+
:_content-type: ASSEMBLY
7+
8+
== NodeExporterCollectorZoneinfoConfig
9+
10+
=== Description
11+
12+
The `NodeExporterCollectorZoneinfoConfig` resource works as an on/off switch for the `zoneinfo` collector of the `node-exporter` agent. The `zoneinfo` collector exposes per-zone memory page counts, watermarks, and protection thresholds from `/proc/zoneinfo`. By default, the `zoneinfo` collector is disabled.
13+
14+
15+
16+
Appears in: link:nodeexportercollectorconfig.adoc[NodeExporterCollectorConfig]
17+
18+
[options="header"]
19+
|===
20+
| Property | Type | Description
21+
|enabled|bool|A Boolean flag that enables or disables the `zoneinfo` collector.
22+
23+
|===
24+
25+
link:../index.adoc[Back to TOC]

Documentation/sample-metrics.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

Documentation/telemetry/telemeter_query

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

jsonnet/versions.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ repos:
1414
prometheusOperator: openshift/prometheus-operator
1515
thanos: openshift/thanos
1616
versions:
17-
alertmanager: 0.33.0
17+
alertmanager: 0.33.1
1818
kubeRbacProxy: 0.21.1
1919
kubeStateMetrics: 2.19.1
2020
kubernetesMetricsServer: 0.8.1
2121
monitoringPlugin: 1.0.0
22-
nodeExporter: 1.11.1
22+
nodeExporter: 1.12.1
2323
promLabelProxy: 0.14.0
24-
prometheus: 3.12.0
24+
prometheus: 3.13.1
2525
prometheusOperator: 0.91.0
26-
thanos: 0.41.0
26+
thanos: 0.42.2

manifests/0000_50_cluster-monitoring-operator_04-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ data:
662662
# owners: (@openshift/openshift-team-monitoring)
663663
#
664664
# collector:node_scrape_collector_success:avg reports the average success of optional node_exporter's collectors running in the cluster.
665-
- '{__name__="collector:node_scrape_collector_success:avg",collector=~"ethtool|cpufreq|tcpstat|netdev|netclass|buddyinfo|mountstats|ksmd|processes|systemd|softirqs"}'
665+
- '{__name__="collector:node_scrape_collector_success:avg",collector=~"ethtool|cpufreq|tcpstat|netdev|netclass|buddyinfo|mountstats|ksmd|processes|systemd|softirqs|zoneinfo"}'
666666
#
667667
# owners: (@openshift/openshift-team-monitoring)
668668
#

pkg/manifests/manifests.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,12 @@ func (f *Factory) updateNodeExporterArgs(args []string) ([]string, error) {
976976
args = setArg(args, "--no-collector.softirqs", "")
977977
}
978978

979+
if f.config.ClusterMonitoringConfiguration.NodeExporterConfig.Collectors.Zoneinfo.Enabled {
980+
args = setArg(args, "--collector.zoneinfo", "")
981+
} else {
982+
args = setArg(args, "--no-collector.zoneinfo", "")
983+
}
984+
979985
if f.config.ClusterMonitoringConfiguration.NodeExporterConfig.Collectors.BuddyInfo.Enabled {
980986
args = setArg(args, "--collector.buddyinfo", "")
981987
} else {

0 commit comments

Comments
 (0)