From fb221d9fdc8dfb21e02a85680e2e88e3285fee1f Mon Sep 17 00:00:00 2001 From: Joe Talerico Date: Tue, 19 Dec 2023 10:07:15 -0500 Subject: [PATCH 1/2] 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 }), From f477bbf557a3f9cbe602116a2970c40c537acddf Mon Sep 17 00:00:00 2001 From: Raul Sevilla Date: Mon, 29 Jul 2024 16:56:29 +0200 Subject: [PATCH 2/2] Include assets in build requirements Signed-off-by: Raul Sevilla --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3303400..98661f1 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ JSONNET := https://github.com/google/go-jsonnet/releases/download/v0.20.0/go-jso JB := https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-$(JB_OS_TYPE)-$(subst x86_64,amd64,$(ARCH)) BINDIR = bin TEMPLATESDIR = templates +ASSETS := $(wildcard assets/**/*.libsonnet) OUTPUTDIR = rendered ALLDIRS = $(BINDIR) $(OUTPUTDIR) SYNCER_IMG_TAG ?= quay.io/cloud-bulldozer/dittybopper-syncer:latest @@ -54,7 +55,7 @@ $(TEMPLATESDIR)/vendor: cd $(TEMPLATESDIR) && ../$(BINDIR)/jb install && cd ../ # Build each template and output to $(OUTPUTDIR) -$(OUTPUTDIR)/%.json: $(TEMPLATESDIR)/%.jsonnet +$(OUTPUTDIR)/%.json: $(TEMPLATESDIR)/%.jsonnet $(ASSETS) @echo "Building template $<" mkdir -p $(dir $@) $(BINDIR)/jsonnet -J ./$(LIBRARY_PATH) $< > $@ @@ -66,4 +67,4 @@ build-syncer-image: v2 podman build --platform=${PLATFORM} -f Dockerfile --manifest=${SYNCER_IMG_TAG} . push-syncer-image: - podman manifest push ${SYNCER_IMG_TAG} ${SYNCER_IMG_TAG} \ No newline at end of file + podman manifest push ${SYNCER_IMG_TAG} ${SYNCER_IMG_TAG}