From fb221d9fdc8dfb21e02a85680e2e88e3285fee1f Mon Sep 17 00:00:00 2001 From: Joe Talerico Date: Tue, 19 Dec 2023 10:07:15 -0500 Subject: [PATCH] Adding ovs metrics Adding the ovs panels to dittybopper Signed-off-by: Joe Talerico --- assets/ocp-performance/queries.libsonnet | 10 ++++++++++ templates/General/ocp-performance-v2.jsonnet | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/assets/ocp-performance/queries.libsonnet b/assets/ocp-performance/queries.libsonnet index fee6ca6..da7f666 100644 --- a/assets/ocp-performance/queries.libsonnet +++ b/assets/ocp-performance/queries.libsonnet @@ -75,6 +75,16 @@ local generateTimeSeriesQuery(query, legend) = [ query(): generateTimeSeriesQuery('topk(25, container_memory_rss{container!="POD",name!="",namespace!="",namespace=~"stackrox"})', '{{ pod }}: {{ container }}') }, + OVSCPU: { + query(nodeName): + generateTimeSeriesQuery('irate(container_cpu_usage_seconds_total{id=~"/system.slice/ovs-vswitchd.service", node=~"' + nodeName + '"}[$interval])*100', 'OVS CPU - {{ node }}') + + generateTimeSeriesQuery('irate(container_cpu_usage_seconds_total{id=~"/system.slice/ovsdb-server.service", node=~"' + nodeName + '"}[$interval])*100', 'OVS DB CPU - {{ node }}') + }, + OVSMemory: { + query(nodeName): + generateTimeSeriesQuery('container_memory_rss{id=~"/system.slice/ovs-vswitchd.service", node=~"' + nodeName + '"}', 'OVS Memory - {{ node }}') + + generateTimeSeriesQuery('container_memory_rss{id=~"/system.slice/ovsdb-server.service", node=~"' + nodeName + '"}', 'OVS DB Memory - {{ node }}') + }, ovnAnnotationLatency: { query(): generateTimeSeriesQuery('histogram_quantile(0.99, sum(rate(ovnkube_master_pod_creation_latency_seconds_bucket[$interval])) by (pod,le)) > 0', '{{ pod }}') diff --git a/templates/General/ocp-performance-v2.jsonnet b/templates/General/ocp-performance-v2.jsonnet index dbe421c..66f21d3 100644 --- a/templates/General/ocp-performance-v2.jsonnet +++ b/templates/General/ocp-performance-v2.jsonnet @@ -30,6 +30,10 @@ g.dashboard.new('Openshift Performance') + g.panel.row.withGridPos({ x: 0, y: 0, w: 24, h: 1 }) + g.panel.row.withCollapsed(true) + g.panel.row.withPanels([ + panels.timeSeries.genericLegend('ovs-master CPU Usage', 'percent', queries.OVSCPU.query('$_master_node'), { x: 0, y: 21, w: 12, h: 8 }), + panels.timeSeries.genericLegend('ovs-master Memory Usage', 'bytes', queries.OVSMemory.query('$_master_node'), { x: 12, y: 21, w: 12, h: 8 }), + panels.timeSeries.genericLegend('ovs-worker CPU Usage', 'percent', queries.OVSCPU.query('$_worker_node'), { x: 0, y: 21, w: 12, h: 8 }), + panels.timeSeries.genericLegend('ovs-worker Memory Usage', 'bytes', queries.OVSMemory.query('$_worker_node'), { x: 12, y: 21, w: 12, h: 8 }), panels.timeSeries.generic('99% Pod Annotation Latency', 's', queries.ovnAnnotationLatency.query(), { x: 0, y: 1, w: 24, h: 12 }), panels.timeSeries.generic('99% CNI Request ADD Latency', 's', queries.ovnCNIAdd.query(), { x: 0, y: 13, w: 12, h: 8 }), panels.timeSeries.generic('99% CNI Request DEL Latency', 's', queries.ovnCNIDel.query(), { x: 12, y: 13, w: 12, h: 8 }),