diff --git a/jsonnet/main.jsonnet b/jsonnet/main.jsonnet index 56535116ea..abfb549f46 100644 --- a/jsonnet/main.jsonnet +++ b/jsonnet/main.jsonnet @@ -138,8 +138,15 @@ local inCluster = 'pod-total.json', 'prometheus.json', ], + // This step is to delete row with titles 'Storage IO - Distribution(Containers)' + // and 'Storage IO - Distribution' from 'k8s-resources-pod.json' dashboard since + // Prometheus doesn't collect the per-container fs metrics + local filteredDashboards = { + 'k8s-resources-pod.json': ['Storage IO - Distribution(Containers)', 'Storage IO - Distribution'], + }, + local filterDashboard(dashboard, excludedRowTitles) = dashboard { rows: std.filter(function(row) !std.member(excludedRowTitles, row.title), dashboard.rows) }, dashboards: { - [k]: allDashboards[k] + [k]: filterDashboard(allDashboards[k], if std.setMember(k, std.objectFields(filteredDashboards)) then filteredDashboards[k] else []) for k in std.objectFields(allDashboards) if std.setMember(k, includeDashboards) }, @@ -335,13 +342,16 @@ local inCluster = mixin+: { ruleLabels: $.values.common.ruleLabels, _config+: { - diskDeviceSelector: $.values.nodeExporter.mixin._config.diskDeviceSelector, + // Temporarily commented since upstream change https://github.com/kubernetes-monitoring/kubernetes-mixin/pull/767 not merged yet + // diskDeviceSelector: $.values.nodeExporter.mixin._config.diskDeviceSelector, + diskDeviceSelector: 'device=~"(/dev.+)|%s"' % std.join('|', ['mmcblk.p.+', 'nvme.+', 'rbd.+', 'sd.+', 'vd.+', 'xvd.+', 'dm-.+', 'dasd.+']), hostNetworkInterfaceSelector: 'device!~"veth.+"', kubeSchedulerSelector: 'job="scheduler"', namespaceSelector: $.values.common.mixinNamespaceSelector, cpuThrottlingSelector: $.values.common.mixinNamespaceSelector, kubeletPodLimit: 250, pvExcludedSelector: 'label_alerts_k8s_io_kube_persistent_volume_filling_up="disabled"', + containerfsSelector: 'id!=""', }, }, prometheusAdapterMetricPrefix: $.values.common.prometheusAdapterMetricPrefix,