From ebf5897158aa724a5430dd4b4a4d5bef38c73633 Mon Sep 17 00:00:00 2001 From: Joel Takvorian Date: Tue, 16 Apr 2024 16:58:30 +0200 Subject: [PATCH] More examples --- .../flowmetrics/cluster_egress_traffic.yaml | 30 ------------- .../cluster_external_egress_rtt_seconds.yaml | 43 +++++++++++++++++++ .../cluster_external_egress_traffic.yaml | 16 +++++++ .../cluster_external_ingress_rtt_seconds.yaml | 43 +++++++++++++++++++ .../cluster_external_ingress_traffic.yaml | 16 +++++++ .../flowmetrics/cluster_ingress_traffic.yaml | 30 ------------- 6 files changed, 118 insertions(+), 60 deletions(-) delete mode 100644 config/samples/flowmetrics/cluster_egress_traffic.yaml create mode 100644 config/samples/flowmetrics/cluster_external_egress_rtt_seconds.yaml create mode 100644 config/samples/flowmetrics/cluster_external_ingress_rtt_seconds.yaml delete mode 100644 config/samples/flowmetrics/cluster_ingress_traffic.yaml diff --git a/config/samples/flowmetrics/cluster_egress_traffic.yaml b/config/samples/flowmetrics/cluster_egress_traffic.yaml deleted file mode 100644 index cc4ced4ad..000000000 --- a/config/samples/flowmetrics/cluster_egress_traffic.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# More examples in https://github.com/netobserv/network-observability-operator/tree/main/config/samples/flowmetrics -apiVersion: flows.netobserv.io/v1alpha1 -kind: FlowMetric -metadata: - name: flowmetric-cluster-egress-traffic -spec: - metricName: cluster_egress_bytes_total - type: Counter - valueField: Bytes - direction: Egress - labels: [SrcK8S_HostName,SrcK8S_Namespace,SrcK8S_OwnerName,SrcK8S_OwnerType] - filters: - - field: DstSubnetLabel - matchType: Absence - charts: - - dashboardName: Main - title: Cluster egress traffic - unit: Bps - type: SingleStat - queries: - - promQL: "sum(rate($METRIC[2m]))" - legend: "" - - dashboardName: Main - sectionName: Cluster - title: Top cluster egress traffic per workload - unit: Bps - type: StackArea - queries: - - promQL: "sum(rate($METRIC{SrcK8S_Namespace!=\"\"}[2m])) by (SrcK8S_Namespace, SrcK8S_OwnerName)" - legend: "{{SrcK8S_Namespace}} / {{SrcK8S_OwnerName}}" diff --git a/config/samples/flowmetrics/cluster_external_egress_rtt_seconds.yaml b/config/samples/flowmetrics/cluster_external_egress_rtt_seconds.yaml new file mode 100644 index 000000000..c2d929028 --- /dev/null +++ b/config/samples/flowmetrics/cluster_external_egress_rtt_seconds.yaml @@ -0,0 +1,43 @@ +# More examples in https://github.com/netobserv/network-observability-operator/tree/main/config/samples/flowmetrics +apiVersion: flows.netobserv.io/v1alpha1 +kind: FlowMetric +metadata: + name: flowmetric-cluster-external-egress-rtt-seconds +spec: + metricName: cluster_external_egress_rtt_seconds + type: Histogram + valueField: TimeFlowRttNs + direction: Egress + includeDuplicates: true + labels: [SrcK8S_HostName,SrcK8S_Namespace,SrcK8S_OwnerName,SrcK8S_OwnerType] + filters: + - field: DstSubnetLabel + matchType: Absence + - field: TimeFlowRttNs + matchType: Presence + divider: "1000000000" + buckets: [".001", ".005", ".01", ".02", ".03", ".04", ".05", ".075", ".1", ".25", "1"] + charts: + - dashboardName: Main + title: External egress TCP latency + unit: seconds + type: SingleStat + queries: + - promQL: "histogram_quantile(0.99, sum(rate($METRIC_bucket[2m])) by (le)) > 0" + legend: "p99" + - dashboardName: Main + sectionName: Cluster + title: "Top external egress sRTT per workload, p50 (ms)" + unit: seconds + type: Line + queries: + - promQL: "histogram_quantile(0.5, sum(rate($METRIC_bucket{SrcK8S_Namespace!=\"\"}[2m])) by (le,SrcK8S_Namespace,SrcK8S_OwnerName))*1000 > 0" + legend: "{{SrcK8S_Namespace}} / {{SrcK8S_OwnerName}}" + - dashboardName: Main + sectionName: Cluster + title: "Top external egress sRTT per workload, p99 (ms)" + unit: seconds + type: Line + queries: + - promQL: "histogram_quantile(0.99, sum(rate($METRIC_bucket{SrcK8S_Namespace!=\"\"}[2m])) by (le,SrcK8S_Namespace,SrcK8S_OwnerName))*1000 > 0" + legend: "{{SrcK8S_Namespace}} / {{SrcK8S_OwnerName}}" diff --git a/config/samples/flowmetrics/cluster_external_egress_traffic.yaml b/config/samples/flowmetrics/cluster_external_egress_traffic.yaml index 3fbc933cf..076d6f007 100644 --- a/config/samples/flowmetrics/cluster_external_egress_traffic.yaml +++ b/config/samples/flowmetrics/cluster_external_egress_traffic.yaml @@ -12,3 +12,19 @@ spec: filters: - field: DstSubnetLabel matchType: Absence + charts: + - dashboardName: Main + title: Cluster egress traffic + unit: Bps + type: SingleStat + queries: + - promQL: "sum(rate($METRIC[2m]))" + legend: "" + - dashboardName: Main + sectionName: Cluster + title: Top cluster egress traffic per workload + unit: Bps + type: StackArea + queries: + - promQL: "sum(rate($METRIC{SrcK8S_Namespace!=\"\"}[2m])) by (SrcK8S_Namespace, SrcK8S_OwnerName)" + legend: "{{SrcK8S_Namespace}} / {{SrcK8S_OwnerName}}" diff --git a/config/samples/flowmetrics/cluster_external_ingress_rtt_seconds.yaml b/config/samples/flowmetrics/cluster_external_ingress_rtt_seconds.yaml new file mode 100644 index 000000000..8d8192bab --- /dev/null +++ b/config/samples/flowmetrics/cluster_external_ingress_rtt_seconds.yaml @@ -0,0 +1,43 @@ +# More examples in https://github.com/netobserv/network-observability-operator/tree/main/config/samples/flowmetrics +apiVersion: flows.netobserv.io/v1alpha1 +kind: FlowMetric +metadata: + name: flowmetric-cluster-external-ingress-rtt-seconds +spec: + metricName: cluster_external_ingress_rtt_seconds + type: Histogram + valueField: TimeFlowRttNs + direction: Ingress + includeDuplicates: true + labels: [DstK8S_HostName,DstK8S_Namespace,DstK8S_OwnerName,DstK8S_OwnerType] + filters: + - field: SrcSubnetLabel + matchType: Absence + - field: TimeFlowRttNs + matchType: Presence + divider: "1000000000" + buckets: [".001", ".005", ".01", ".02", ".03", ".04", ".05", ".075", ".1", ".25", "1"] + charts: + - dashboardName: Main + title: External ingress TCP latency + unit: seconds + type: SingleStat + queries: + - promQL: "histogram_quantile(0.99, sum(rate($METRIC_bucket[2m])) by (le)) > 0" + legend: "p99" + - dashboardName: Main + sectionName: Cluster + title: "Top external ingress sRTT per workload, p50 (ms)" + unit: seconds + type: Line + queries: + - promQL: "histogram_quantile(0.5, sum(rate($METRIC_bucket{DstK8S_Namespace!=\"\"}[2m])) by (le,DstK8S_Namespace,DstK8S_OwnerName))*1000 > 0" + legend: "{{DstK8S_Namespace}} / {{DstK8S_OwnerName}}" + - dashboardName: Main + sectionName: Cluster + title: "Top external ingress sRTT per workload, p99 (ms)" + unit: seconds + type: Line + queries: + - promQL: "histogram_quantile(0.99, sum(rate($METRIC_bucket{DstK8S_Namespace!=\"\"}[2m])) by (le,DstK8S_Namespace,DstK8S_OwnerName))*1000 > 0" + legend: "{{DstK8S_Namespace}} / {{DstK8S_OwnerName}}" diff --git a/config/samples/flowmetrics/cluster_external_ingress_traffic.yaml b/config/samples/flowmetrics/cluster_external_ingress_traffic.yaml index 7c6dfb322..bb75ff2fc 100644 --- a/config/samples/flowmetrics/cluster_external_ingress_traffic.yaml +++ b/config/samples/flowmetrics/cluster_external_ingress_traffic.yaml @@ -12,3 +12,19 @@ spec: filters: - field: SrcSubnetLabel matchType: Absence + charts: + - dashboardName: Main + title: Cluster ingress traffic + unit: Bps + type: SingleStat + queries: + - promQL: "sum(rate($METRIC[2m]))" + legend: "" + - dashboardName: Main + sectionName: Cluster + title: Top cluster ingress traffic per workload + unit: Bps + type: StackArea + queries: + - promQL: "sum(rate($METRIC{DstK8S_Namespace!=\"\"}[2m])) by (DstK8S_Namespace, DstK8S_OwnerName)" + legend: "{{DstK8S_Namespace}} / {{DstK8S_OwnerName}}" diff --git a/config/samples/flowmetrics/cluster_ingress_traffic.yaml b/config/samples/flowmetrics/cluster_ingress_traffic.yaml deleted file mode 100644 index ae8287b0f..000000000 --- a/config/samples/flowmetrics/cluster_ingress_traffic.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# More examples in https://github.com/netobserv/network-observability-operator/tree/main/config/samples/flowmetrics -apiVersion: flows.netobserv.io/v1alpha1 -kind: FlowMetric -metadata: - name: flowmetric-cluster-ingress-traffic -spec: - metricName: cluster_ingress_bytes_total - type: Counter - valueField: Bytes - direction: Ingress - labels: [DstK8S_HostName,DstK8S_Namespace,DstK8S_OwnerName,DstK8S_OwnerType] - filters: - - field: SrcSubnetLabel - matchType: Absence - charts: - - dashboardName: Main - title: Cluster ingress traffic - unit: Bps - type: SingleStat - queries: - - promQL: "sum(rate($METRIC[2m]))" - legend: "" - - dashboardName: Main - sectionName: Cluster - title: Top cluster ingress traffic per workload - unit: Bps - type: StackArea - queries: - - promQL: "sum(rate($METRIC{DstK8S_Namespace!=\"\"}[2m])) by (DstK8S_Namespace, DstK8S_OwnerName)" - legend: "{{DstK8S_Namespace}} / {{DstK8S_OwnerName}}"