diff --git a/.gitignore b/.gitignore index 850de9f..605c514 100644 --- a/.gitignore +++ b/.gitignore @@ -159,6 +159,8 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ -*.yaml +# Ignore YAML files in the top folder +/*.yaml + *.csv .vscode/ diff --git a/README.md b/README.md index 986e8d4..8c124d6 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,15 @@ Below is an illustrative example of the config and metadata that Orion can handl ``` tests : - name : aws-small-scale-cluster-density-v2 - platform: AWS - masterNodesType: m6a.xlarge - masterNodesCount: 3 - workerNodesType: m6a.xlarge - workerNodesCount: 24 - benchmark: cluster-density-v2 - ocpVersion: 4.15 - networkType: OVNKubernetes + metadata: + platform: AWS + masterNodesType: m6a.xlarge + masterNodesCount: 3 + workerNodesType: m6a.xlarge + workerNodesCount: 24 + benchmark.keyword: cluster-density-v2 + ocpVersion: 4.15 + networkType: OVNKubernetes # encrypted: true # fips: false # ipsec: false @@ -24,11 +25,11 @@ tests : quantileName: Ready metric_of_interest: P99 not: - - jobConfig.name: "garbage-collection" + jobConfig.name: "garbage-collection" - name: apiserverCPU metricName : containerCPU - labels.namespace: openshift-kube-apiserver + labels.namespace.keyword: openshift-kube-apiserver metric_of_interest: value agg: value: cpu @@ -36,7 +37,7 @@ tests : - name: ovnCPU metricName : containerCPU - labels.namespace: openshift-ovn-kubernetes + labels.namespace.keyword: openshift-ovn-kubernetes metric_of_interest: value agg: value: cpu @@ -44,7 +45,7 @@ tests : - name: etcdCPU metricName : containerCPU - labels.namespace: openshift-etcd + labels.namespace.keyword: openshift-etcd metric_of_interest: value agg: value: cpu @@ -56,8 +57,7 @@ tests : agg: value: duration agg_type: avg - - + ``` ## Build Orion diff --git a/examples/small-scale-cluster-density.yaml b/examples/small-scale-cluster-density.yaml new file mode 100644 index 0000000..703f1b5 --- /dev/null +++ b/examples/small-scale-cluster-density.yaml @@ -0,0 +1,54 @@ +tests : + - name : aws-small-scale-cluster-density-v2 + metadata: + platform: AWS + masterNodesType: m6a.xlarge + masterNodesCount: 3 + workerNodesType: m6a.xlarge + workerNodesCount: 24 + benchmark.keyword: cluster-density-v2 + ocpVersion: 4.15 + networkType: OVNKubernetes + # encrypted: true + # fips: false + # ipsec: false + + metrics : + - name: podReadyLatency + metricName: podLatencyQuantilesMeasurement + quantileName: Ready + metric_of_interest: P99 + not: + jobConfig.name: "garbage-collection" + + - name: apiserverCPU + metricName : containerCPU + labels.namespace.keyword: openshift-kube-apiserver + metric_of_interest: value + agg: + value: cpu + agg_type: avg + + - name: ovnCPU + metricName : containerCPU + labels.namespace.keyword: openshift-ovn-kubernetes + metric_of_interest: value + agg: + value: cpu + agg_type: avg + + - name: etcdCPU + metricName : containerCPU + labels.namespace.keyword: openshift-etcd + metric_of_interest: value + agg: + value: cpu + agg_type: avg + + - name: etcdDisk + metricName : 99thEtcdDiskBackendCommitDurationSeconds + metric_of_interest: value + agg: + value: duration + agg_type: avg + diff --git a/examples/small-scale-node-density-cni.yaml b/examples/small-scale-node-density-cni.yaml new file mode 100644 index 0000000..1821f1a --- /dev/null +++ b/examples/small-scale-node-density-cni.yaml @@ -0,0 +1,56 @@ +tests : + - name : aws-small-scale-node-density-cni + metadata: + platform: AWS + masterNodesType: m6a.xlarge + masterNodesCount: 3 + workerNodesType: m6a.xlarge + workerNodesCount: 6 + infraNodesCount: 3 + benchmark.keyword: node-density-cni + ocpVersion: 4.15 + networkType: OVNKubernetes + infraNodesType: r5.2xlarge + # encrypted: true + # fips: false + # ipsec: false + + metrics : + - name: podReadyLatency + metricName: podLatencyQuantilesMeasurement + quantileName: Ready + metric_of_interest: P99 + not: + jobConfig.name: "garbage-collection" + + - name: apiserverCPU + metricName : containerCPU + labels.namespace.keyword: openshift-kube-apiserver + metric_of_interest: value + agg: + value: cpu + agg_type: avg + + - name: ovnCPU + metricName : containerCPU + labels.namespace.keyword: openshift-ovn-kubernetes + metric_of_interest: value + agg: + value: cpu + agg_type: avg + + - name: etcdCPU + metricName : containerCPU + labels.namespace.keyword: openshift-etcd + metric_of_interest: value + agg: + value: cpu + agg_type: avg + + - name: etcdDisk + metricName : 99thEtcdDiskBackendCommitDurationSeconds + metric_of_interest: value + agg: + value: duration + agg_type: avg + diff --git a/orion.py b/orion.py index b0e24c3..de52114 100644 --- a/orion.py +++ b/orion.py @@ -59,10 +59,10 @@ def orion(config, debug, output,hunter_analyze): print("No UUID present for given metadata") sys.exit() - if metadata["benchmark"] == "k8s-netperf" : + if metadata["benchmark.keyword"] == "k8s-netperf" : index = "k8s-netperf" ids = uuids - elif metadata["benchmark"] == "ingress-perf" : + elif metadata["benchmark.keyword"] == "ingress-perf" : index = "ingress-performance" ids = uuids else: diff --git a/requirements.txt b/requirements.txt index 2736514..e298835 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,9 +2,8 @@ hunter @ git+https://github.com/datastax-labs/hunter.git@v0.5.0 certifi==2023.11.17 click==8.1.7 elastic-transport==8.11.0 -elasticsearch==8.11.1 -elasticsearch7==7.13.0 -fmatch==0.0.4 +elasticsearch==7.13.0 +fmatch==0.0.5 python-dateutil==2.8.2 pytz==2023.3.post1 PyYAML==6.0.1 diff --git a/utils/orion_funcs.py b/utils/orion_funcs.py index f0fdd4b..08ec813 100644 --- a/utils/orion_funcs.py +++ b/utils/orion_funcs.py @@ -110,11 +110,7 @@ def get_metadata(test,logger): Returns: dict: dictionary of the metadata """ - metadata = {} - for k,v in test.items(): - if k in ["metrics","name"]: - continue - metadata[k] = v + metadata=test['metadata'] metadata["ocpVersion"] = str(metadata["ocpVersion"]) logger.debug('metadata' + str(metadata)) return metadata