├── .gitignore ├── openshift ├── tenant_export ├── Dockerfile-master ├── LTaaS With SSL Enabled.pdf ├── plugins │ ├── bzm-parallel-0.4.zip │ └── JMeterPlugins-Standard-1.4.0.zip ├── jmeter_grafana_svc.yaml ├── Dockerfile-slave ├── jmeter_slaves_svc.yaml ├── ingress │ ├── traefik.toml │ ├── ingress.yaml │ ├── create_ingress.sh │ ├── traefik-rbac.yaml │ ├── tls.crt │ ├── traefik.yaml │ └── tls.key ├── jmeter_influxdb_svc.yaml ├── jmeter_stop.sh ├── README.md ├── jmeter_master_configmap.yaml ├── jmeter_influxdb_configmap.yaml ├── jmeter_grafana_reporter.yaml ├── jmeter_influxdb_deploy.yaml ├── Dockerfile-reporter ├── jmeter_master_deploymentconfig.yaml ├── jmeter_grafana_deploy.yaml ├── start_test.sh ├── jmeter_slaves_deploymentconfig.yaml ├── Dockerfile-base ├── jmeter_influxdb_openshift_deploymentconfig_ephemeral.yaml ├── dashboard.sh ├── jmeter_influxdb_deploymentconfig.yaml ├── jmeter_influxdb_openshift_deploymentconfig_persistent.yaml ├── Docker files ├── jmeter_cluster_create.sh ├── LICENSE ├── cloudssky.jmx └── GrafanaJMeterTemplate.json ├── Dockerfile-master ├── LTaaS With SSL Enabled.pdf ├── Dockerfile-slave ├── jmeter_grafana_svc.yaml ├── dockerimages.sh ├── jmeter_slaves_svc.yaml ├── ingress ├── traefik.toml ├── ingress.yaml ├── create_ingress.sh ├── traefik-rbac.yaml ├── tls.crt ├── traefik.yaml └── tls.key ├── jmeter_influxdb_svc.yaml ├── README.md ├── jmeter_stop.sh ├── jmeter_master_configmap.yaml ├── jmeter_slaves_deploy.yaml ├── jmeter_influxdb_configmap.yaml ├── jmeter_grafana_reporter.yaml ├── jmeter_influxdb_deploy.yaml ├── jmeter_master_deploy.yaml ├── start_test.sh ├── Dockerfile-reporter ├── jmeter_grafana_deploy.yaml ├── Dockerfile-base ├── dashboard.sh ├── Docker files ├── start_test_csv.sh ├── jmeter_cluster_create.sh ├── LICENSE ├── cloudssky.jmx └── GrafanaJMeterTemplate.json /.gitignore: -------------------------------------------------------------------------------- 1 | tenant_export 2 | -------------------------------------------------------------------------------- /openshift/tenant_export: -------------------------------------------------------------------------------- 1 | project= loadtesting 2 | -------------------------------------------------------------------------------- /Dockerfile-master: -------------------------------------------------------------------------------- 1 | FROM kubernautslabs/jmeter-base:latest 2 | MAINTAINER Kubernauts-lab 3 | 4 | EXPOSE 60000 5 | -------------------------------------------------------------------------------- /LTaaS With SSL Enabled.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernauts/jmeter-kubernetes/HEAD/LTaaS With SSL Enabled.pdf -------------------------------------------------------------------------------- /openshift/Dockerfile-master: -------------------------------------------------------------------------------- 1 | FROM cloudssky/jmeter-base:latest 2 | MAINTAINER Kubernauts-lab 3 | 4 | EXPOSE 60000 5 | -------------------------------------------------------------------------------- /openshift/LTaaS With SSL Enabled.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernauts/jmeter-kubernetes/HEAD/openshift/LTaaS With SSL Enabled.pdf -------------------------------------------------------------------------------- /openshift/plugins/bzm-parallel-0.4.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernauts/jmeter-kubernetes/HEAD/openshift/plugins/bzm-parallel-0.4.zip -------------------------------------------------------------------------------- /openshift/plugins/JMeterPlugins-Standard-1.4.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernauts/jmeter-kubernetes/HEAD/openshift/plugins/JMeterPlugins-Standard-1.4.0.zip -------------------------------------------------------------------------------- /Dockerfile-slave: -------------------------------------------------------------------------------- 1 | FROM kubernautslabs/jmeter-base:latest 2 | MAINTAINER Kubernauts-lab 3 | 4 | EXPOSE 1099 50000 5 | 6 | ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ 7 | -Dserver.rmi.localport=50000 \ 8 | -Dserver_port=1099 \ 9 | -Jserver.rmi.ssl.disable=true 10 | -------------------------------------------------------------------------------- /jmeter_grafana_svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: jmeter-grafana 5 | labels: 6 | app: jmeter-grafana 7 | spec: 8 | ports: 9 | - port: 3000 10 | targetPort: 3000 11 | selector: 12 | app: jmeter-grafana 13 | type: NodePort -------------------------------------------------------------------------------- /openshift/jmeter_grafana_svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: jmeter-grafana 5 | labels: 6 | app: jmeter-grafana 7 | spec: 8 | ports: 9 | - port: 3000 10 | targetPort: 3000 11 | selector: 12 | app: jmeter-grafana 13 | type: NodePort -------------------------------------------------------------------------------- /dockerimages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | docker build --tag="kubernautslabs/jmeter-base:latest" -f Dockerfile-base . 4 | docker build --tag="kubernautslabs/jmeter-master:latest" -f Dockerfile-master . 5 | docker build --tag="kubernautslabs/jmeter-slave:latest" -f Dockerfile-slave . 6 | docker build --tag="kubernautslabs/jmeter-reporter" -f Dockerfile-reporter . 7 | -------------------------------------------------------------------------------- /openshift/Dockerfile-slave: -------------------------------------------------------------------------------- 1 | FROM cloudssky/jmeter-base:latest 2 | MAINTAINER Kubernauts-lab 3 | 4 | EXPOSE 1099 50000 5 | 6 | ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ 7 | -Dserver.rmi.ssl.disable=true \ 8 | -Dserver.rmi.localport=50000 \ 9 | -Dserver_port=1099 10 | 11 | # -Jserver.rmi.ssl.truststore.file=$JMETER_HOME/bin/rmi_keystore.jks \ 12 | -------------------------------------------------------------------------------- /jmeter_slaves_svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: jmeter-slaves-svc 5 | labels: 6 | jmeter_mode: slave 7 | spec: 8 | clusterIP: None 9 | ports: 10 | - port: 1099 11 | name: first 12 | targetPort: 1099 13 | - port: 50000 14 | name: second 15 | targetPort: 50000 16 | selector: 17 | jmeter_mode: slave -------------------------------------------------------------------------------- /openshift/jmeter_slaves_svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: jmeter-slaves-svc 5 | labels: 6 | jmeter_mode: slaves 7 | spec: 8 | clusterIP: None 9 | ports: 10 | - port: 1099 11 | name: first 12 | targetPort: 1099 13 | - port: 50000 14 | name: second 15 | targetPort: 50000 16 | selector: 17 | jmeter_mode: slaves -------------------------------------------------------------------------------- /ingress/traefik.toml: -------------------------------------------------------------------------------- 1 | # traefik.toml 2 | defaultEntryPoints = ["http","https"] 3 | [entryPoints] 4 | [entryPoints.http] 5 | address = ":80" 6 | [entryPoints.http.redirect] 7 | entryPoint = "https" 8 | [entryPoints.https] 9 | address = ":443" 10 | [entryPoints.https.tls] 11 | [[entryPoints.https.tls.certificates]] 12 | CertFile = "/ssl/tls.crt" 13 | KeyFile = "/ssl/tls.key" 14 | -------------------------------------------------------------------------------- /jmeter_influxdb_svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: jmeter-influxdb 5 | labels: 6 | app: influxdb-jmeter 7 | spec: 8 | ports: 9 | - port: 8083 10 | name: http 11 | targetPort: 8083 12 | - port: 8086 13 | name: api 14 | targetPort: 8086 15 | - port: 2003 16 | name: graphite 17 | targetPort: 2003 18 | selector: 19 | app: influxdb-jmeter -------------------------------------------------------------------------------- /openshift/ingress/traefik.toml: -------------------------------------------------------------------------------- 1 | # traefik.toml 2 | defaultEntryPoints = ["http","https"] 3 | [entryPoints] 4 | [entryPoints.http] 5 | address = ":80" 6 | [entryPoints.http.redirect] 7 | entryPoint = "https" 8 | [entryPoints.https] 9 | address = ":443" 10 | [entryPoints.https.tls] 11 | [[entryPoints.https.tls.certificates]] 12 | CertFile = "/ssl/tls.crt" 13 | KeyFile = "/ssl/tls.key" 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jmeter Cluster Support for Kubernetes and OpenShift 2 | 3 | ## Prerequisits 4 | 5 | Kubernetes > 1.16 6 | 7 | OpenShift version > 3.5 8 | 9 | ## TL;DR 10 | 11 | ```bash 12 | ./dockerimages.sh 13 | ./jmeter_cluster_create.sh 14 | ./dashboard.sh 15 | ./start_test.sh 16 | ``` 17 | 18 | Please follow the guide "Load Testing Jmeter On Kubernetes" on our medium blog post: 19 | 20 | https://goo.gl/mkoX9E 21 | 22 | -------------------------------------------------------------------------------- /openshift/jmeter_influxdb_svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: jmeter-influxdb 5 | labels: 6 | app: influxdb-jmeter 7 | spec: 8 | ports: 9 | - port: 8083 10 | name: http 11 | targetPort: 8083 12 | - port: 8086 13 | name: api 14 | targetPort: 8086 15 | - port: 2003 16 | name: graphite 17 | targetPort: 2003 18 | selector: 19 | app: influxdb-jmeter -------------------------------------------------------------------------------- /openshift/jmeter_stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Script writtent to stop a running jmeter master test 3 | #Kindly ensure you have the necessary kubeconfig 4 | 5 | working_dir=`pwd` 6 | 7 | #Get namesapce variable 8 | tenant=`awk '{print $NF}' $working_dir/tenant_export` 9 | 10 | master_pod=`kubectl get pod | grep jmeter-master | awk '{print $1}'` 11 | 12 | oc exec -ti $master_pod -- /bin/bash /jmeter/apache-jmeter-4.0/bin/stoptest.sh 13 | -------------------------------------------------------------------------------- /jmeter_stop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Script writtent to stop a running jmeter master test 3 | #Kindly ensure you have the necessary kubeconfig 4 | 5 | working_dir=`pwd` 6 | 7 | #Get namesapce variable 8 | tenant=`awk '{print $NF}' $working_dir/tenant_export` 9 | 10 | master_pod=`kubectl get po -n $tenant | grep jmeter-master | awk '{print $1}'` 11 | 12 | kubectl -n $tenant exec -ti $master_pod bash /jmeter/apache-jmeter-5.0/bin/stoptest.sh 13 | -------------------------------------------------------------------------------- /openshift/README.md: -------------------------------------------------------------------------------- 1 | # Jmeter Cluster Support for Kubernetes and OpenShift 2 | 3 | ## Prerequisits 4 | 5 | Kubernetes > 1.8 6 | 7 | OpenShift version > 3.5 8 | 9 | N.B.: this implementation was tested on Kubernetes 1.9, 1.10, and 1.11 and OpenShift 3.5 and 3.10 (minishift) 10 | 11 | ## TL;DR 12 | 13 | ```bash 14 | ./jmeter_cluster_create.sh 15 | ./dashboard.sh 16 | ./start_test.sh 17 | ``` 18 | 19 | Please follow the guide "Load Testing Jmeter On Kubernetes" on our medium blog post: 20 | 21 | https://goo.gl/mkoX9E 22 | 23 | -------------------------------------------------------------------------------- /jmeter_master_configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: jmeter-load-test 5 | labels: 6 | app: influxdb-jmeter 7 | data: 8 | load_test: | 9 | #!/bin/bash 10 | #Script created to invoke jmeter test script with the slave POD IP addresses 11 | #Script should be run like: ./load_test "path to the test script in jmx format" 12 | /jmeter/apache-jmeter-*/bin/jmeter -n -t $1 -Dserver.rmi.ssl.disable=true -R `getent ahostsv4 jmeter-slaves-svc | cut -d' ' -f1 | sort -u | awk -v ORS=, '{print $1}' | sed 's/,$//'` 13 | -------------------------------------------------------------------------------- /openshift/jmeter_master_configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: jmeter-load-test 5 | labels: 6 | app: influxdb-jmeter 7 | data: 8 | load_test: | 9 | #!/bin/bash 10 | #Script created to invoke jmeter test script with the slave POD IP addresses 11 | #Script should be run like: ./load_test "path to the test script in jmx format" 12 | /jmeter/apache-jmeter-4.0/bin/jmeter -n -t $1 -Dserver.rmi.ssl.disable=true -R `getent ahostsv4 jmeter-slaves-svc | cut -d' ' -f1 | sort -u | awk -v ORS=, '{print $1}' | sed 's/,$//'` 13 | -------------------------------------------------------------------------------- /jmeter_slaves_deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: jmeter-slaves 5 | labels: 6 | jmeter_mode: slave 7 | spec: 8 | replicas: 2 9 | selector: 10 | matchLabels: 11 | jmeter_mode: slave 12 | template: 13 | metadata: 14 | labels: 15 | jmeter_mode: slave 16 | spec: 17 | containers: 18 | - name: jmslave 19 | image: kubernautslabs/jmeter_slave:latest 20 | imagePullPolicy: IfNotPresent 21 | ports: 22 | - containerPort: 1099 23 | - containerPort: 50000 24 | -------------------------------------------------------------------------------- /jmeter_influxdb_configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: influxdb-config 5 | labels: 6 | app: influxdb-jmeter 7 | data: 8 | influxdb.conf: | 9 | [meta] 10 | dir = "/var/lib/influxdb/meta" 11 | 12 | [data] 13 | dir = "/var/lib/influxdb/data" 14 | engine = "tsm1" 15 | wal-dir = "/var/lib/influxdb/wal" 16 | 17 | # Configure the graphite api 18 | [[graphite]] 19 | enabled = true 20 | bind-address = ":2003" # If not set, is actually set to bind-address. 21 | database = "jmeter" # store graphite data in this database -------------------------------------------------------------------------------- /openshift/jmeter_influxdb_configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: influxdb-config 5 | labels: 6 | app: influxdb-jmeter 7 | data: 8 | influxdb.conf: | 9 | [meta] 10 | dir = "/var/lib/influxdb/meta" 11 | 12 | [data] 13 | dir = "/var/lib/influxdb/data" 14 | engine = "tsm1" 15 | wal-dir = "/var/lib/influxdb/wal" 16 | 17 | # Configure the graphite api 18 | [[graphite]] 19 | enabled = true 20 | bind-address = ":2003" # If not set, is actually set to bind-address. 21 | database = "jmeter" # store graphite data in this database -------------------------------------------------------------------------------- /ingress/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: jmeter-ingress 5 | annotations: 6 | traefik.frontend.rule.type: PathPrefixStrip 7 | kubernetes.io/ingress.class: "traefik" 8 | spec: 9 | tls: 10 | - secretName: traefik-cert 11 | rules: 12 | - host: ingress.kubernauts 13 | http: 14 | paths: 15 | - path: /grafana 16 | backend: 17 | serviceName: jmeter-grafana 18 | servicePort: 3000 19 | - path: /reporter 20 | backend: 21 | serviceName: jmeter-reporter 22 | servicePort: 8686 23 | -------------------------------------------------------------------------------- /openshift/ingress/ingress.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: jmeter-ingress 5 | annotations: 6 | traefik.frontend.rule.type: PathPrefixStrip 7 | kubernetes.io/ingress.class: "traefik" 8 | spec: 9 | tls: 10 | - secretName: traefik-cert 11 | rules: 12 | - host: ingress.kubernauts 13 | http: 14 | paths: 15 | - path: /grafana 16 | backend: 17 | serviceName: jmeter-grafana 18 | servicePort: 3000 19 | - path: /reporter 20 | backend: 21 | serviceName: jmeter-reporter 22 | servicePort: 8686 23 | -------------------------------------------------------------------------------- /ingress/create_ingress.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Create multiple Jmeter ingress on an existing kubernetes deployment 3 | #Started On January 23, 2018 4 | 5 | echo 6 | 7 | echo "Enter the name of the namespace that will be used to create the ingress" 8 | read tenant 9 | echo 10 | 11 | openssl req -newkey rsa:2048 -nodes -keyout tls.key -x509 -days 365 -out tls.crt 12 | 13 | kubectl -n $tenant create secret generic traefik-cert --from-file=tls.crt --from-file=tls.key 14 | 15 | kubectl -n $tenant create configmap traefik-conf --from-file=traefik.toml 16 | 17 | kubectl -n $tenant create -f traefik-rbac.yaml 18 | 19 | kubectl -n $tenant create -f traefik.yaml 20 | 21 | kubectl -n $tenant create -f ingress.yaml 22 | -------------------------------------------------------------------------------- /openshift/ingress/create_ingress.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Create multiple Jmeter ingress on an existing kubernetes deployment 3 | #Started On January 23, 2018 4 | 5 | echo 6 | 7 | echo "Enter the name of the namespace that will be used to create the ingress" 8 | read tenant 9 | echo 10 | 11 | openssl req -newkey rsa:2048 -nodes -keyout tls.key -x509 -days 365 -out tls.crt 12 | 13 | kubectl -n $tenant create secret generic traefik-cert --from-file=tls.crt --from-file=tls.key 14 | 15 | kubectl -n $tenant create configmap traefik-conf --from-file=traefik.toml 16 | 17 | kubectl -n $tenant create -f traefik-rbac.yaml 18 | 19 | kubectl -n $tenant create -f traefik.yaml 20 | 21 | kubectl -n $tenant create -f ingress.yaml 22 | -------------------------------------------------------------------------------- /openshift/jmeter_grafana_reporter.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1beta2 # for versions before 1.9.0 use apps/v1beta2 2 | kind: Deployment 3 | metadata: 4 | name: jmeter-reporter 5 | labels: 6 | jmeter_mode: reporter 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | jmeter_mode: reporter 12 | template: 13 | metadata: 14 | labels: 15 | jmeter_mode: reporter 16 | spec: 17 | containers: 18 | - name: jmreporter 19 | image: kubernautslabs/jmeter-reporter 20 | ports: 21 | - containerPort: 8686 22 | 23 | --- 24 | apiVersion: v1 25 | kind: Service 26 | metadata: 27 | name: jmeter-reporter 28 | labels: 29 | jmeter_mode: reporter 30 | spec: 31 | ports: 32 | - port: 8686 33 | targetPort: 8686 34 | selector: 35 | jmeter_mode: reporter 36 | type: NodePort 37 | -------------------------------------------------------------------------------- /ingress/traefik-rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: ClusterRole 3 | apiVersion: rbac.authorization.k8s.io/v1beta1 4 | metadata: 5 | name: traefik-ingress-controller 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - services 11 | - endpoints 12 | - secrets 13 | verbs: 14 | - get 15 | - list 16 | - watch 17 | - apiGroups: 18 | - extensions 19 | resources: 20 | - ingresses 21 | verbs: 22 | - get 23 | - list 24 | - watch 25 | --- 26 | kind: ClusterRoleBinding 27 | apiVersion: rbac.authorization.k8s.io/v1beta1 28 | metadata: 29 | name: traefik-ingress-controller 30 | roleRef: 31 | apiGroup: rbac.authorization.k8s.io 32 | kind: ClusterRole 33 | name: traefik-ingress-controller 34 | subjects: 35 | - kind: ServiceAccount 36 | name: traefik-ingress-controller 37 | namespace: ltaas 38 | -------------------------------------------------------------------------------- /openshift/ingress/traefik-rbac.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: ClusterRole 3 | apiVersion: rbac.authorization.k8s.io/v1beta1 4 | metadata: 5 | name: traefik-ingress-controller 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - services 11 | - endpoints 12 | - secrets 13 | verbs: 14 | - get 15 | - list 16 | - watch 17 | - apiGroups: 18 | - extensions 19 | resources: 20 | - ingresses 21 | verbs: 22 | - get 23 | - list 24 | - watch 25 | --- 26 | kind: ClusterRoleBinding 27 | apiVersion: rbac.authorization.k8s.io/v1beta1 28 | metadata: 29 | name: traefik-ingress-controller 30 | roleRef: 31 | apiGroup: rbac.authorization.k8s.io 32 | kind: ClusterRole 33 | name: traefik-ingress-controller 34 | subjects: 35 | - kind: ServiceAccount 36 | name: traefik-ingress-controller 37 | namespace: ltaas 38 | -------------------------------------------------------------------------------- /openshift/jmeter_influxdb_deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: DeploymentConfig 3 | metadata: 4 | name: influxdb-jmeter 5 | labels: 6 | app: influxdb-jmeter 7 | spec: 8 | replicas: "1" 9 | selector: 10 | matchLabels: 11 | app: influxdb-jmeter 12 | template: 13 | metadata: 14 | labels: 15 | app: influxdb-jmeter 16 | spec: 17 | containers: 18 | - image: influxdb 19 | name: influxdb 20 | volumeMounts: 21 | - name: config-volume 22 | mountPath: /etc/influxdb 23 | ports: 24 | - containerPort: 8083 25 | name: influx 26 | - containerPort: 8086 27 | name: api 28 | - containerPort: 2003 29 | name: graphite 30 | volumes: 31 | - name: config-volume 32 | configMap: 33 | name: influxdb-config -------------------------------------------------------------------------------- /jmeter_grafana_reporter.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1beta2 # for versions before 1.9.0 use apps/v1beta2 2 | kind: Deployment 3 | metadata: 4 | name: jmeter-reporter 5 | labels: 6 | jmeter_mode: reporter 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | jmeter_mode: reporter 12 | template: 13 | metadata: 14 | labels: 15 | jmeter_mode: reporter 16 | spec: 17 | containers: 18 | - name: jmreporter 19 | image: kubernautslabs/jmeter-reporter:latest 20 | imagePullPolicy: IfNotPresent 21 | ports: 22 | - containerPort: 8686 23 | 24 | --- 25 | apiVersion: v1 26 | kind: Service 27 | metadata: 28 | name: jmeter-reporter 29 | labels: 30 | jmeter_mode: reporter 31 | spec: 32 | ports: 33 | - port: 8686 34 | targetPort: 8686 35 | selector: 36 | jmeter_mode: reporter 37 | type: NodePort 38 | -------------------------------------------------------------------------------- /jmeter_influxdb_deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: influxdb-jmeter 5 | labels: 6 | app: influxdb-jmeter 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: influxdb-jmeter 12 | template: 13 | metadata: 14 | labels: 15 | app: influxdb-jmeter 16 | spec: 17 | containers: 18 | - image: influxdb 19 | imagePullPolicy: IfNotPresent 20 | name: influxdb 21 | volumeMounts: 22 | - name: config-volume 23 | mountPath: /etc/influxdb 24 | ports: 25 | - containerPort: 8083 26 | name: influx 27 | - containerPort: 8086 28 | name: api 29 | - containerPort: 2003 30 | name: graphite 31 | volumes: 32 | - name: config-volume 33 | configMap: 34 | name: influxdb-config -------------------------------------------------------------------------------- /jmeter_master_deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 2 | kind: Deployment 3 | metadata: 4 | name: jmeter-master 5 | labels: 6 | jmeter_mode: master 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | jmeter_mode: master 12 | template: 13 | metadata: 14 | labels: 15 | jmeter_mode: master 16 | spec: 17 | containers: 18 | - name: jmmaster 19 | image: kubernautslabs/jmeter_master:latest 20 | imagePullPolicy: IfNotPresent 21 | command: [ "/bin/bash", "-c", "--" ] 22 | args: [ "while true; do sleep 30; done;" ] 23 | volumeMounts: 24 | - name: loadtest 25 | mountPath: /load_test 26 | subPath: "load_test" 27 | ports: 28 | - containerPort: 60000 29 | volumes: 30 | - name: loadtest 31 | configMap: 32 | name: jmeter-load-test 33 | -------------------------------------------------------------------------------- /openshift/Dockerfile-reporter: -------------------------------------------------------------------------------- 1 | # build 2 | FROM golang:1.8-stretch AS build 3 | WORKDIR /go/src/${owner:-github.com/IzakMarais}/reporter 4 | RUN apt-get update && apt-get install make git 5 | ADD . . 6 | RUN make build 7 | 8 | # create image 9 | FROM debian:stretch 10 | COPY util/texlive.profile / 11 | RUN PACKAGES="wget libswitch-perl" \ 12 | && apt-get update \ 13 | && apt-get install -qq $PACKAGES --no-install-recommends \ 14 | && wget -qO- http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz |tar xz \ 15 | && cd install-tl-* \ 16 | && ./install-tl -profile /texlive.profile \ 17 | # Cleanup 18 | && rm -rf install-tl-* \ 19 | && apt-get remove --purge -qq $PACKAGES \ 20 | && apt-get autoremove --purge -qq \ 21 | && rm -rf /var/lib/apt/lists/* \ 22 | && mkdir /var/tex 23 | 24 | COPY --from=build /go/bin/grafana-reporter /usr/local/bin 25 | ENTRYPOINT [ "/usr/local/bin/grafana-reporter","-ip","jmeter-grafana:3000" ] 26 | -------------------------------------------------------------------------------- /start_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Script created to launch Jmeter tests directly from the current terminal without accessing the jmeter master pod. 3 | #It requires that you supply the path to the jmx file 4 | #After execution, test script jmx file may be deleted from the pod itself but not locally. 5 | 6 | working_dir="`pwd`" 7 | 8 | #Get namesapce variable 9 | tenant=`awk '{print $NF}' "$working_dir/tenant_export"` 10 | 11 | jmx="$1" 12 | [ -n "$jmx" ] || read -p 'Enter path to the jmx file ' jmx 13 | 14 | if [ ! -f "$jmx" ]; 15 | then 16 | echo "Test script file was not found in PATH" 17 | echo "Kindly check and input the correct file path" 18 | exit 19 | fi 20 | 21 | test_name="$(basename "$jmx")" 22 | 23 | #Get Master pod details 24 | 25 | master_pod=`kubectl get po -n $tenant | grep jmeter-master | awk '{print $1}'` 26 | 27 | kubectl cp "$jmx" -n $tenant "$master_pod:/$test_name" 28 | 29 | ## Echo Starting Jmeter load test 30 | 31 | kubectl exec -ti -n $tenant $master_pod -- /bin/bash /load_test "$test_name" 32 | -------------------------------------------------------------------------------- /openshift/jmeter_master_deploymentconfig.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: DeploymentConfig 3 | metadata: 4 | creationTimestamp: null 5 | generation: 1 6 | labels: 7 | run: jmeter-master 8 | jmeter_mode: master 9 | name: jmeter-master 10 | spec: 11 | replicas: 1 12 | selector: 13 | run: jmeter-master 14 | template: 15 | metadata: 16 | creationTimestamp: null 17 | labels: 18 | run: jmeter-master 19 | spec: 20 | containers: 21 | - image: cloudssky/jmeter-master 22 | command: [ "/bin/bash", "-c", "--" ] 23 | args: [ "while true; do sleep 30; done;" ] 24 | imagePullPolicy: Always 25 | name: jmeter-master 26 | ports: 27 | - containerPort: 60000 28 | protocol: TCP 29 | volumeMounts: 30 | - name: loadtest 31 | mountPath: /jmeter/load_test 32 | subPath: "load_test" 33 | volumes: 34 | - name: loadtest 35 | configMap: 36 | name: jmeter-load-test 37 | resources: {} 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /openshift/jmeter_grafana_deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: jmeter-grafana 5 | labels: 6 | app: jmeter-grafana 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: jmeter-grafana 12 | template: 13 | metadata: 14 | labels: 15 | app: jmeter-grafana 16 | spec: 17 | containers: 18 | - name: grafana 19 | image: grafana/grafana 20 | ports: 21 | - containerPort: 3000 22 | protocol: TCP 23 | env: 24 | - name: GF_AUTH_BASIC_ENABLED 25 | value: "true" 26 | - name: GF_USERS_ALLOW_ORG_CREATE 27 | value: "true" 28 | - name: GF_AUTH_ANONYMOUS_ENABLED 29 | value: "true" 30 | - name: GF_AUTH_ANONYMOUS_ORG_ROLE 31 | value: Admin 32 | - name: GF_SERVER_ROOT_URL 33 | # If you're only using the API Server proxy, set this value instead: 34 | # value: /api/v1/namespaces/kube-system/services/monitoring-grafana/proxy 35 | value: / 36 | -------------------------------------------------------------------------------- /Dockerfile-reporter: -------------------------------------------------------------------------------- 1 | # build 2 | FROM golang:1.8-stretch AS build 3 | WORKDIR /go/src/${owner:-github.com/IzakMarais}/reporter 4 | RUN apt-get update && apt-get install -y make git 5 | RUN git clone https://${owner:-github.com/IzakMarais}/reporter . 6 | RUN make build 7 | 8 | # create image 9 | FROM debian:stretch 10 | RUN PACKAGES="wget libswitch-perl texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra ca-certificates" \ 11 | && apt-get update \ 12 | && apt-get install -y -qq $PACKAGES --no-install-recommends \ 13 | && wget -qO- http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz |tar xz \ 14 | && cd install-tl-* \ 15 | && ./install-tl -profile /texlive.profile \ 16 | # Cleanup 17 | && rm -rf install-tl-* \ 18 | && apt-get remove --purge -y -qq $PACKAGES \ 19 | && apt-get autoremove --purge -y -qq \ 20 | && rm -rf /var/lib/apt/lists/* \ 21 | && mkdir /var/tex 22 | 23 | COPY --from=build /go/bin/grafana-reporter /usr/local/bin 24 | ENTRYPOINT [ "/usr/local/bin/grafana-reporter","-ip","jmeter-grafana:3000" ] 25 | -------------------------------------------------------------------------------- /jmeter_grafana_deploy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: jmeter-grafana 5 | labels: 6 | app: jmeter-grafana 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: jmeter-grafana 12 | template: 13 | metadata: 14 | labels: 15 | app: jmeter-grafana 16 | spec: 17 | containers: 18 | - name: grafana 19 | image: grafana/grafana:5.2.0 20 | imagePullPolicy: IfNotPresent 21 | ports: 22 | - containerPort: 3000 23 | protocol: TCP 24 | env: 25 | - name: GF_AUTH_BASIC_ENABLED 26 | value: "true" 27 | - name: GF_USERS_ALLOW_ORG_CREATE 28 | value: "true" 29 | - name: GF_AUTH_ANONYMOUS_ENABLED 30 | value: "true" 31 | - name: GF_AUTH_ANONYMOUS_ORG_ROLE 32 | value: Admin 33 | - name: GF_SERVER_ROOT_URL 34 | # If you're only using the API Server proxy, set this value instead: 35 | # value: /api/v1/namespaces/kube-system/services/monitoring-grafana/proxy 36 | value: / 37 | -------------------------------------------------------------------------------- /openshift/start_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Script created to launch Jmeter tests directly from the current terminal without accessing the jmeter master pod. 3 | #It requires that you supply the path to the jmx file 4 | #After execution, test script jmx file may be deleted from the pod itself but not locally. 5 | 6 | working_dir=`pwd` 7 | 8 | #Get namesapce variable 9 | # tenant=`awk '{print $NF}' $working_dir/tenant_export` 10 | 11 | read -p 'Enter path to the jmx file ' jmx 12 | 13 | if [ ! -f "$jmx" ]; 14 | then 15 | echo "Test script file was not found in PATH" 16 | echo "Kindly check and input the correct file path" 17 | exit 18 | fi 19 | 20 | #Get Master pod details 21 | 22 | #master_pod=`kubectl get pod -n loadtesting | grep jmeter-master | awk '{print $1}'` 23 | 24 | master_pod=`oc get pod | grep jmeter-master | awk '{print $1}'` 25 | 26 | # kubectl cp $jmx -n $tenant $master_pod:/$jmx 27 | 28 | #oc cp $jmx $master_pod:/$jmx 29 | 30 | oc cp cloudssky.jmx $master_pod:/jmeter/cloudssky.jmx 31 | 32 | ## Echo Starting Jmeter load test 33 | 34 | oc exec -ti $master_pod -- /bin/bash /jmeter/load_test cloudssky.jmx 35 | -------------------------------------------------------------------------------- /openshift/jmeter_slaves_deploymentconfig.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: DeploymentConfig 3 | metadata: 4 | labels: 5 | jmeter_mode: slaves 6 | name: jmeter-slaves 7 | spec: 8 | replicas: 3 9 | selector: 10 | jmeter_mode: slaves 11 | strategy: 12 | activeDeadlineSeconds: 21600 13 | resources: {} 14 | rollingParams: 15 | intervalSeconds: 1 16 | maxSurge: 25% 17 | maxUnavailable: 25% 18 | timeoutSeconds: 600 19 | updatePeriodSeconds: 1 20 | type: Rolling 21 | template: 22 | metadata: 23 | creationTimestamp: null 24 | labels: 25 | jmeter_mode: slaves 26 | spec: 27 | containers: 28 | - image: cloudssky/jmeter-slave 29 | imagePullPolicy: Always 30 | name: jmeter-slave 31 | ports: 32 | - containerPort: 50000 33 | protocol: TCP 34 | - containerPort: 1099 35 | protocol: TCP 36 | resources: {} 37 | terminationMessagePath: /dev/termination-log 38 | dnsPolicy: ClusterFirst 39 | restartPolicy: Always 40 | securityContext: {} 41 | terminationGracePeriodSeconds: 30 42 | test: false -------------------------------------------------------------------------------- /Dockerfile-base: -------------------------------------------------------------------------------- 1 | FROM openjdk:8-jdk-slim 2 | MAINTAINER Kubernauts-lab 3 | 4 | ARG JMETER_VERSION=5.0 5 | 6 | RUN apt-get clean && \ 7 | apt-get update && \ 8 | apt-get -qy install \ 9 | wget \ 10 | telnet \ 11 | iputils-ping \ 12 | unzip 13 | RUN mkdir /jmeter \ 14 | && cd /jmeter/ \ 15 | && wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz \ 16 | && tar -xzf apache-jmeter-$JMETER_VERSION.tgz \ 17 | && rm apache-jmeter-$JMETER_VERSION.tgz 18 | 19 | RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/JMeterPlugins-Standard-1.4.0.zip https://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.4.0.zip && unzip -n /tmp/JMeterPlugins-Standard-1.4.0.zip && rm /tmp/JMeterPlugins-Standard-1.4.0.zip 20 | 21 | RUN wget -q -O /jmeter/apache-jmeter-$JMETER_VERSION/lib/ext/pepper-box-1.0.jar https://github.com/raladev/load/blob/master/JARs/pepper-box-1.0.jar?raw=true 22 | 23 | RUN cd /jmeter/apache-jmeter-$JMETER_VERSION/ && wget -q -O /tmp/bzm-parallel-0.7.zip https://jmeter-plugins.org/files/packages/bzm-parallel-0.7.zip && unzip -n /tmp/bzm-parallel-0.7.zip && rm /tmp/bzm-parallel-0.7.zip 24 | 25 | ENV JMETER_HOME /jmeter/apache-jmeter-$JMETER_VERSION/ 26 | 27 | ENV PATH $JMETER_HOME/bin:$PATH 28 | -------------------------------------------------------------------------------- /openshift/Dockerfile-base: -------------------------------------------------------------------------------- 1 | FROM fabric8/s2i-java 2 | MAINTAINER kubernautslabs 3 | 4 | # ARG JMETER_VERSION=3.3 5 | ARG JMETER_VERSION=4.0 6 | 7 | USER root 8 | 9 | # RUN addgroup --group jmeter 10 | # RUN adduser --disabled-password --gecos '' jmeter 11 | # RUN adduser jmeter -g jmeter 12 | 13 | # https://stackoverflow.com/questions/27701930/add-user-to-docker-container 14 | 15 | # RUN useradd -d /jmeter/apache-jmeter-$JMETER_VERSION/ -ms /bin/bash -g root -p jboss jboss 16 | # USER jboss 17 | 18 | 19 | RUN yum -y update && \ 20 | yum -y install \ 21 | wget \ 22 | telnet \ 23 | iputils-ping \ 24 | unzip 25 | 26 | RUN mkdir /jmeter \ 27 | && cd /jmeter/ \ 28 | && wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz \ 29 | && tar -xzf apache-jmeter-$JMETER_VERSION.tgz \ 30 | && rm apache-jmeter-$JMETER_VERSION.tgz 31 | 32 | WORKDIR /jmeter 33 | 34 | # Set directory and file permissions (not sure if that's fine) 35 | RUN chown -R jboss:root /jmeter \ 36 | && chmod -R "g+rwx,o+x" /jmeter 37 | 38 | 39 | USER jboss 40 | 41 | # ADD jmeter-plugins/lib /jmeter/apache-jmeter-$JMETER_VERSION/lib 42 | 43 | ENV JMETER_HOME /jmeter/apache-jmeter-$JMETER_VERSION/ 44 | 45 | ENV PATH $JMETER_HOME/bin:$PATH 46 | -------------------------------------------------------------------------------- /ingress/tls.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDajCCAlKgAwIBAgIJAOxq9VXbwytwMA0GCSqGSIb3DQEBCwUAMEoxCzAJBgNV 3 | BAYTAkRFMQswCQYDVQQIDAJDTzEQMA4GA1UEBwwHQ29sb2duZTEcMBoGA1UECgwT 4 | RGVmYXVsdCBDb21wYW55IEx0ZDAeFw0xODA0MDMxMDIwMzJaFw0xOTA0MDMxMDIw 5 | MzJaMEoxCzAJBgNVBAYTAkRFMQswCQYDVQQIDAJDTzEQMA4GA1UEBwwHQ29sb2du 6 | ZTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEB 7 | BQADggEPADCCAQoCggEBAOP9deybkMh0INax8wTlABYNLsOy13WHvug7GF+vVcAt 8 | qbcNNd/cWjvMjW5gQXfvJQ2OhCdODQ+dsuDTSEyog499JHP9xzlg3dPZvEid9V/U 9 | rDl9FpZUtq2/LSmE3PZD/51wxPAOA3gTpOXuVZq/viMLhtPDUkY9r5p3vRfCrofc 10 | BAEI2H8n4P6NHS0ZciFF1n4GC7j2bDNiVPWvubiZqmd1bxrCdXFonfCZ6LK9apn3 11 | gHkve4g6+HPWtRYBH6roorAKUqSdYLTgO0kdUkqbUE9CppZAcjAKQSy5jdezpGPp 12 | HzN0ZcZqqLtKovPqhUmQWdPT6kVk0jjGXgoeZfjGQo0CAwEAAaNTMFEwHQYDVR0O 13 | BBYEFLmk61zcbr8a3LxgIOfjVMnxXr6pMB8GA1UdIwQYMBaAFLmk61zcbr8a3Lxg 14 | IOfjVMnxXr6pMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJqX 15 | sXT+3OierrANLvuTKfA24DWYqY3Ztzmh76sqYeqtBOyHurF0TWyovbzeDZuJ0RWw 16 | 2u9mzLBd5eOtQtNQWrNfNS2O9D+6oyAbPQoxPB1TZ59swDAvEBWJ1lgoaemefVG5 17 | 3zAMe+ibPFy5E7dQp+W9teY1N/twg6qfJKnOPk4GXWlpX0rjv2Cp6Vu3sF/4TG+9 18 | bNlDqqj/fiiyJCQ6bVTd3FpWwdCODDHTrlm+78U3lpIi5Fwh/DXSlDJeqb/qZGmr 19 | AP9HFzXCLpxQqwvHuyG/L5UYProVTdrCue+6+MiiVLFGOqImxVFvgvI3EbLL5mNp 20 | PA8lEmgAGcHig4vKHH4= 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /openshift/ingress/tls.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDajCCAlKgAwIBAgIJAOxq9VXbwytwMA0GCSqGSIb3DQEBCwUAMEoxCzAJBgNV 3 | BAYTAkRFMQswCQYDVQQIDAJDTzEQMA4GA1UEBwwHQ29sb2duZTEcMBoGA1UECgwT 4 | RGVmYXVsdCBDb21wYW55IEx0ZDAeFw0xODA0MDMxMDIwMzJaFw0xOTA0MDMxMDIw 5 | MzJaMEoxCzAJBgNVBAYTAkRFMQswCQYDVQQIDAJDTzEQMA4GA1UEBwwHQ29sb2du 6 | ZTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEB 7 | BQADggEPADCCAQoCggEBAOP9deybkMh0INax8wTlABYNLsOy13WHvug7GF+vVcAt 8 | qbcNNd/cWjvMjW5gQXfvJQ2OhCdODQ+dsuDTSEyog499JHP9xzlg3dPZvEid9V/U 9 | rDl9FpZUtq2/LSmE3PZD/51wxPAOA3gTpOXuVZq/viMLhtPDUkY9r5p3vRfCrofc 10 | BAEI2H8n4P6NHS0ZciFF1n4GC7j2bDNiVPWvubiZqmd1bxrCdXFonfCZ6LK9apn3 11 | gHkve4g6+HPWtRYBH6roorAKUqSdYLTgO0kdUkqbUE9CppZAcjAKQSy5jdezpGPp 12 | HzN0ZcZqqLtKovPqhUmQWdPT6kVk0jjGXgoeZfjGQo0CAwEAAaNTMFEwHQYDVR0O 13 | BBYEFLmk61zcbr8a3LxgIOfjVMnxXr6pMB8GA1UdIwQYMBaAFLmk61zcbr8a3Lxg 14 | IOfjVMnxXr6pMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJqX 15 | sXT+3OierrANLvuTKfA24DWYqY3Ztzmh76sqYeqtBOyHurF0TWyovbzeDZuJ0RWw 16 | 2u9mzLBd5eOtQtNQWrNfNS2O9D+6oyAbPQoxPB1TZ59swDAvEBWJ1lgoaemefVG5 17 | 3zAMe+ibPFy5E7dQp+W9teY1N/twg6qfJKnOPk4GXWlpX0rjv2Cp6Vu3sF/4TG+9 18 | bNlDqqj/fiiyJCQ6bVTd3FpWwdCODDHTrlm+78U3lpIi5Fwh/DXSlDJeqb/qZGmr 19 | AP9HFzXCLpxQqwvHuyG/L5UYProVTdrCue+6+MiiVLFGOqImxVFvgvI3EbLL5mNp 20 | PA8lEmgAGcHig4vKHH4= 21 | -----END CERTIFICATE----- 22 | -------------------------------------------------------------------------------- /openshift/jmeter_influxdb_openshift_deploymentconfig_ephemeral.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: DeploymentConfig 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app: influxdb-jmeter 7 | name: influxdb 8 | spec: 9 | replicas: 1 10 | selector: 11 | app: influxdb-jmeter 12 | template: 13 | metadata: 14 | creationTimestamp: null 15 | labels: 16 | app: influxdb-jmeter 17 | spec: 18 | containers: 19 | - env: 20 | - name: INFLUXDB_UDP_ENABLED 21 | value: "true" 22 | - name: INFLUXDB_UDP_BIND_ADDRESS 23 | value: :8087 24 | - name: INFLUXDB_UDP_DATABASE 25 | value: udp 26 | image: influxdb 27 | imagePullPolicy: Always 28 | name: influxdb 29 | ports: 30 | - containerPort: 8083 31 | name: influx 32 | - containerPort: 8086 33 | name: api 34 | - containerPort: 2003 35 | name: graphite 36 | volumeMounts: 37 | - mountPath: /var/lib/influxdb 38 | name: influxdb-data 39 | dnsPolicy: ClusterFirst 40 | restartPolicy: Always 41 | volumes: 42 | - name: influxdb-data 43 | emptyDir: {} 44 | - name: config-volume 45 | configMap: 46 | name: influxdb-config 47 | -------------------------------------------------------------------------------- /ingress/traefik.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: traefik-ingress-controller 6 | 7 | --- 8 | 9 | apiVersion: apps/v1beta2 10 | kind: Deployment 11 | metadata: 12 | name: traefik-ingress-controller 13 | labels: 14 | app: jmeter-ingress-lb 15 | spec: 16 | replicas: 2 17 | selector: 18 | matchLabels: 19 | app: jmeter-ingress-lb 20 | template: 21 | metadata: 22 | labels: 23 | app: jmeter-ingress-lb 24 | name: jmeter-ingress-lb 25 | spec: 26 | serviceAccountName: traefik-ingress-controller 27 | terminationGracePeriodSeconds: 60 28 | volumes: 29 | - name: ssl 30 | secret: 31 | secretName: traefik-cert 32 | - name: config 33 | configMap: 34 | name: traefik-conf 35 | containers: 36 | - image: traefik 37 | name: traefik-ingress-lb 38 | imagePullPolicy: Always 39 | volumeMounts: 40 | - mountPath: "/ssl" 41 | name: "ssl" 42 | - mountPath: "/config" 43 | name: "config" 44 | ports: 45 | - containerPort: 80 46 | - containerPort: 443 47 | args: 48 | - --configfile=/config/traefik.toml 49 | - --kubernetes 50 | - --logLevel=DEBUG 51 | --- 52 | kind: Service 53 | apiVersion: v1 54 | metadata: 55 | name: traefik 56 | spec: 57 | type: LoadBalancer 58 | ports: 59 | - port: 80 60 | name: http 61 | - port: 443 62 | name: https 63 | selector: 64 | app: jmeter-ingress-lb 65 | -------------------------------------------------------------------------------- /openshift/ingress/traefik.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: traefik-ingress-controller 6 | 7 | --- 8 | 9 | apiVersion: apps/v1beta2 10 | kind: Deployment 11 | metadata: 12 | name: traefik-ingress-controller 13 | labels: 14 | app: jmeter-ingress-lb 15 | spec: 16 | replicas: 2 17 | selector: 18 | matchLabels: 19 | app: jmeter-ingress-lb 20 | template: 21 | metadata: 22 | labels: 23 | app: jmeter-ingress-lb 24 | name: jmeter-ingress-lb 25 | spec: 26 | serviceAccountName: traefik-ingress-controller 27 | terminationGracePeriodSeconds: 60 28 | volumes: 29 | - name: ssl 30 | secret: 31 | secretName: traefik-cert 32 | - name: config 33 | configMap: 34 | name: traefik-conf 35 | containers: 36 | - image: traefik 37 | name: traefik-ingress-lb 38 | imagePullPolicy: Always 39 | volumeMounts: 40 | - mountPath: "/ssl" 41 | name: "ssl" 42 | - mountPath: "/config" 43 | name: "config" 44 | ports: 45 | - containerPort: 80 46 | - containerPort: 443 47 | args: 48 | - --configfile=/config/traefik.toml 49 | - --kubernetes 50 | - --logLevel=DEBUG 51 | --- 52 | kind: Service 53 | apiVersion: v1 54 | metadata: 55 | name: traefik 56 | spec: 57 | type: LoadBalancer 58 | ports: 59 | - port: 80 60 | name: http 61 | - port: 443 62 | name: https 63 | selector: 64 | app: jmeter-ingress-lb 65 | -------------------------------------------------------------------------------- /dashboard.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | working_dir=`pwd` 4 | 5 | #Get namesapce variable 6 | tenant=`awk '{print $NF}' $working_dir/tenant_export` 7 | 8 | ## Create jmeter database automatically in Influxdb 9 | 10 | echo "Creating Influxdb jmeter Database" 11 | 12 | ##Wait until Influxdb Deployment is up and running 13 | ##influxdb_status=`kubectl get po -n $tenant | grep influxdb-jmeter | awk '{print $2}' | grep Running 14 | 15 | influxdb_pod=`kubectl get po -n $tenant | grep influxdb-jmeter | awk '{print $1}'` 16 | kubectl exec -ti -n $tenant $influxdb_pod -- influx -execute 'CREATE DATABASE jmeter' 17 | 18 | ## Create the influxdb datasource in Grafana 19 | 20 | echo "Creating the Influxdb data source" 21 | grafana_pod=`kubectl get po -n $tenant | grep jmeter-grafana | awk '{print $1}'` 22 | 23 | ## Make load test script in Jmeter master pod executable 24 | 25 | #Get Master pod details 26 | 27 | master_pod=`kubectl get po -n $tenant | grep jmeter-master | awk '{print $1}'` 28 | 29 | kubectl exec -ti -n $tenant $master_pod -- cp -r /load_test /jmeter/load_test 30 | 31 | kubectl exec -ti -n $tenant $master_pod -- chmod 755 /jmeter/load_test 32 | 33 | ##kubectl cp $working_dir/influxdb-jmeter-datasource.json -n $tenant $grafana_pod:/influxdb-jmeter-datasource.json 34 | 35 | kubectl exec -ti -n $tenant $grafana_pod -- curl 'http://admin:admin@127.0.0.1:3000/api/datasources' -X POST -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"name":"jmeterdb","type":"influxdb","url":"http://jmeter-influxdb:8086","access":"proxy","isDefault":true,"database":"jmeter","user":"admin","password":"admin"}' 36 | -------------------------------------------------------------------------------- /openshift/dashboard.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | working_dir=`pwd` 4 | 5 | #Get namesapce variable 6 | # tenant=`awk '{print $NF}' $working_dir/tenant_export` 7 | 8 | ## Create jmeter database automatically in Influxdb 9 | 10 | echo "Creating Influxdb jmeter Database" 11 | 12 | ##Wait until Influxdb Deployment is up and running 13 | ##influxdb_status=`oc get po -n $tenant | grep influxdb-jmeter | awk '{print $2}' | grep Running 14 | 15 | influxdb_pod=`oc get pod | grep influxdb | awk '{print $1}'` 16 | oc exec -ti $influxdb_pod -- influx -execute 'CREATE DATABASE jmeter' 17 | 18 | ## make sure the db is created 19 | 20 | # $ oc rsh $influxdb_pod 21 | 22 | oc exec -ti $influxdb_pod -- influx -execute 'SHOW DATABASES' 23 | 24 | ## Create the influxdb datasource in Grafana 25 | 26 | echo "Creating the Influxdb data source" 27 | grafana_pod=`oc get pod | grep jmeter-grafana | awk '{print $1}'` 28 | 29 | ## Make load test script in Jmeter master pod executable 30 | 31 | #Get Master pod details 32 | 33 | master_pod=`oc get pod | grep jmeter-master | awk '{print $1}'` 34 | 35 | # oc exec -ti $master_pod -- cp -r /load_test /jmeter/load_test 36 | 37 | # oc exec -it $master_pod -- /bin/bash -- chmod 755 /jmeter/load_test 38 | 39 | ##oc cp $working_dir/influxdb-jmeter-datasource.json -n $tenant $grafana_pod:/influxdb-jmeter-datasource.json 40 | 41 | oc exec -it $grafana_pod -- curl 'http://admin:admin@127.0.0.1:3000/api/datasources' -X POST -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"name":"jmeterdb","type":"influxdb","url":"http://jmeter-influxdb:8086","access":"proxy","isDefault":true,"database":"jmeter","user":"admin","password":"admin"}' 42 | -------------------------------------------------------------------------------- /openshift/jmeter_influxdb_deploymentconfig.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: DeploymentConfig 3 | metadata: 4 | labels: 5 | app: influxdb-jmeter 6 | name: influxdb-jmeter 7 | spec: 8 | replicas: 1 9 | selector: 10 | app: influxdb-jmeter 11 | strategy: 12 | activeDeadlineSeconds: 21600 13 | resources: {} 14 | rollingParams: 15 | intervalSeconds: 1 16 | maxSurge: 25% 17 | maxUnavailable: 25% 18 | timeoutSeconds: 600 19 | updatePeriodSeconds: 1 20 | type: Rolling 21 | template: 22 | metadata: 23 | creationTimestamp: null 24 | labels: 25 | app: influxdb-jmeter 26 | spec: 27 | containers: 28 | - image: cloudssky/influxdb:latest 29 | name: influxdb 30 | imagePullPolicy: Always 31 | name: influxdb-jmeter 32 | volumeMounts: 33 | - name: config-volume 34 | mountPath: /etc/influxdb 35 | - name: config-meta 36 | mountPath: /var/lib/influxdb/meta 37 | subPath: meta 38 | - name: config-data 39 | mountPath: /var/lib/influxdb/data 40 | subPath: data 41 | - name: config-wal 42 | mountPath: /var/lib/influxdb/wal 43 | subPath: wal 44 | ports: 45 | - containerPort: 8083 46 | name: influx 47 | - containerPort: 8086 48 | name: api 49 | - containerPort: 2003 50 | name: graphite 51 | volumes: 52 | - name: config-volume 53 | configMap: 54 | name: influxdb-config 55 | - name: config-meta 56 | - name: config-data 57 | - name: config-wal 58 | 59 | 60 | -------------------------------------------------------------------------------- /openshift/jmeter_influxdb_openshift_deploymentconfig_persistent.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: DeploymentConfig 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | metrics: influxdb 7 | name: influxdb 8 | spec: 9 | replicas: 1 10 | selector: 11 | metrics: influxdb 12 | template: 13 | metadata: 14 | creationTimestamp: null 15 | labels: 16 | metrics: influxdb 17 | spec: 18 | containers: 19 | - env: 20 | - name: INFLUXDB_UDP_ENABLED 21 | value: "true" 22 | - name: INFLUXDB_UDP_BIND_ADDRESS 23 | value: :8087 24 | - name: INFLUXDB_UDP_DATABASE 25 | value: udp 26 | image: influxdb 27 | imagePullPolicy: Always 28 | name: influxdb 29 | ports: 30 | - containerPort: 8086 31 | protocol: TCP 32 | - containerPort: 8087 33 | protocol: UDP 34 | - containerPort: 8083 35 | protocol: TCP 36 | volumeMounts: 37 | - mountPath: /var/lib/influxdb 38 | name: influxdb-data 39 | dnsPolicy: ClusterFirst 40 | restartPolicy: Always 41 | volumes: 42 | - name: influxdb-data 43 | emptyDir: {} 44 | volumeClaimTemplates: 45 | - metadata: 46 | name: datadir 47 | labels: 48 | app: influxdb-data 49 | annotations: 50 | volume.beta.kubernetes.io/storage-class: glusterfs 51 | spec: 52 | accessModes: 53 | - ReadWriteOnce 54 | resources: 55 | requests: 56 | storage: 1Gi 57 | -------------------------------------------------------------------------------- /ingress/tls.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDj/XXsm5DIdCDW 3 | sfME5QAWDS7Dstd1h77oOxhfr1XALam3DTXf3Fo7zI1uYEF37yUNjoQnTg0PnbLg 4 | 00hMqIOPfSRz/cc5YN3T2bxInfVf1Kw5fRaWVLatvy0phNz2Q/+dcMTwDgN4E6Tl 5 | 7lWav74jC4bTw1JGPa+ad70Xwq6H3AQBCNh/J+D+jR0tGXIhRdZ+Bgu49mwzYlT1 6 | r7m4mapndW8awnVxaJ3wmeiyvWqZ94B5L3uIOvhz1rUWAR+q6KKwClKknWC04DtJ 7 | HVJKm1BPQqaWQHIwCkEsuY3Xs6Rj6R8zdGXGaqi7SqLz6oVJkFnT0+pFZNI4xl4K 8 | HmX4xkKNAgMBAAECggEBAKfrDUioR1msVmdqhw/qzkZvjSrr9M8GnPAUXl5TGDhE 9 | KYS+ARkRBZCXlu9di7qW81ZpyiHc1bfTsWTvmIeFcehkBk478tjq5FbdPlTJqmjb 10 | jcGFxPYSDL4pWU0EI25qJMFDxnj8CUgOR9xlzrz8TkEngzVC3b0IP+boG+h9Jei/ 11 | GnAj0VfhFXXR3dXm00GEiftWJZzgyk0j9Btll/IFQowZQhTI7OgVIfuEwbF72vHo 12 | p+W9EV/EaBwk52eEwgMdhGuLyIQ2hAd3+u65BGPMLYP6xJR4BIVkFLx/aLHkm9/R 13 | F763CkoUE8BovDfCzoQcLKdVPbL2ObLFZ3h1/vu1No0CgYEA9ieZJbTfIGwlHCuT 14 | YwajmNWsWrZ9IEfIjdBsVR4NyMbUGKVhuHTUly+NWc5B1rWbGPJ85hhzUWewkyWn 15 | GUTaB1CyUpTBmOJu0xMV5k9dkWQ0Qg6y16F36eACDw0CbpyJnaY2m6us1ZcJEhP0 16 | r/x+iAdkKTuuuWxTnDo3o8RkFMcCgYEA7RvfkJ2E+m3z65oQCBdBphovtrCQDawV 17 | Uv/6/zNhJau/ZHBH9MJlvHJyFCppyYCPScwd4sOgNyzrfjFk79/5Qc4CAHnEIsIB 18 | zm3a5btqHpLCnJpzuOAgnBWd5ib5M9iVXdaWDVkrGe0kyl5ghOjLvoG0M8kpVeVw 19 | NyJOcnjBsgsCgYEAm6akd6xsnxLjUHHZi/epwT3z85SLgLsDfXE634PWkYvwl/kT 20 | 1tDBkSw3hH8hMMS7Y0YKZnE1klcv14wqopbgC1oiuIdp9+PO0leyNGUhNIuZY9/p 21 | hOKMce39P0kprYn8lxyAUWV4L8OGr9DAm/vcguWxl0UvEf8Gy7YgcsT/yAcCgYBC 22 | 8zDgO6oVsEBEkT7fmfl+djxswFQcmC95PTBZKN/QbDthl9aphM6HNGWDzioKrJNJ 23 | CiqSIhy2F6fy/O18UeimrQ2hpsA79D3gVOKPJakkMtpir7XnSNnMWMo59108R3Z9 24 | hZ7e7AOgkXZm8dkdDkKhayw/xxg12dAisTwnVHOU2wKBgQCjaJbHfALdmgRttBBC 25 | 6LJbkTj0kgnXjbWrzL0LT3glTLGP4ltZ4MK4FzntG5da0a7ftg75Dz84CDikw7Pv 26 | UdrSaKx18WdOHqXK+mVa2/hSs7o9qwv5WzpCBpimsKtONI2eU4M03755vAZ31waj 27 | CWojdEFny69c30cogn3MMzcrgg== 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /openshift/ingress/tls.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDj/XXsm5DIdCDW 3 | sfME5QAWDS7Dstd1h77oOxhfr1XALam3DTXf3Fo7zI1uYEF37yUNjoQnTg0PnbLg 4 | 00hMqIOPfSRz/cc5YN3T2bxInfVf1Kw5fRaWVLatvy0phNz2Q/+dcMTwDgN4E6Tl 5 | 7lWav74jC4bTw1JGPa+ad70Xwq6H3AQBCNh/J+D+jR0tGXIhRdZ+Bgu49mwzYlT1 6 | r7m4mapndW8awnVxaJ3wmeiyvWqZ94B5L3uIOvhz1rUWAR+q6KKwClKknWC04DtJ 7 | HVJKm1BPQqaWQHIwCkEsuY3Xs6Rj6R8zdGXGaqi7SqLz6oVJkFnT0+pFZNI4xl4K 8 | HmX4xkKNAgMBAAECggEBAKfrDUioR1msVmdqhw/qzkZvjSrr9M8GnPAUXl5TGDhE 9 | KYS+ARkRBZCXlu9di7qW81ZpyiHc1bfTsWTvmIeFcehkBk478tjq5FbdPlTJqmjb 10 | jcGFxPYSDL4pWU0EI25qJMFDxnj8CUgOR9xlzrz8TkEngzVC3b0IP+boG+h9Jei/ 11 | GnAj0VfhFXXR3dXm00GEiftWJZzgyk0j9Btll/IFQowZQhTI7OgVIfuEwbF72vHo 12 | p+W9EV/EaBwk52eEwgMdhGuLyIQ2hAd3+u65BGPMLYP6xJR4BIVkFLx/aLHkm9/R 13 | F763CkoUE8BovDfCzoQcLKdVPbL2ObLFZ3h1/vu1No0CgYEA9ieZJbTfIGwlHCuT 14 | YwajmNWsWrZ9IEfIjdBsVR4NyMbUGKVhuHTUly+NWc5B1rWbGPJ85hhzUWewkyWn 15 | GUTaB1CyUpTBmOJu0xMV5k9dkWQ0Qg6y16F36eACDw0CbpyJnaY2m6us1ZcJEhP0 16 | r/x+iAdkKTuuuWxTnDo3o8RkFMcCgYEA7RvfkJ2E+m3z65oQCBdBphovtrCQDawV 17 | Uv/6/zNhJau/ZHBH9MJlvHJyFCppyYCPScwd4sOgNyzrfjFk79/5Qc4CAHnEIsIB 18 | zm3a5btqHpLCnJpzuOAgnBWd5ib5M9iVXdaWDVkrGe0kyl5ghOjLvoG0M8kpVeVw 19 | NyJOcnjBsgsCgYEAm6akd6xsnxLjUHHZi/epwT3z85SLgLsDfXE634PWkYvwl/kT 20 | 1tDBkSw3hH8hMMS7Y0YKZnE1klcv14wqopbgC1oiuIdp9+PO0leyNGUhNIuZY9/p 21 | hOKMce39P0kprYn8lxyAUWV4L8OGr9DAm/vcguWxl0UvEf8Gy7YgcsT/yAcCgYBC 22 | 8zDgO6oVsEBEkT7fmfl+djxswFQcmC95PTBZKN/QbDthl9aphM6HNGWDzioKrJNJ 23 | CiqSIhy2F6fy/O18UeimrQ2hpsA79D3gVOKPJakkMtpir7XnSNnMWMo59108R3Z9 24 | hZ7e7AOgkXZm8dkdDkKhayw/xxg12dAisTwnVHOU2wKBgQCjaJbHfALdmgRttBBC 25 | 6LJbkTj0kgnXjbWrzL0LT3glTLGP4ltZ4MK4FzntG5da0a7ftg75Dz84CDikw7Pv 26 | UdrSaKx18WdOHqXK+mVa2/hSs7o9qwv5WzpCBpimsKtONI2eU4M03755vAZ31waj 27 | CWojdEFny69c30cogn3MMzcrgg== 28 | -----END PRIVATE KEY----- 29 | -------------------------------------------------------------------------------- /openshift/Docker files: -------------------------------------------------------------------------------- 1 | Docker images for the master and slaves nodes can be built using the following procedure. 2 | 3 | First of all the jmeter base image needs to be created from the opend-jdk image, this will be used as reference while building the master and slaves images: 4 | 5 | ============JMETER BASE DOCKER FILE============ 6 | 7 | FROM openjdk:8-jre-slim 8 | MAINTAINER Kubernauts-lab 9 | 10 | ARG JMETER_VERSION=4.0 11 | 12 | RUN apt-get clean && \ 13 | apt-get update && \ 14 | apt-get -qy install \ 15 | wget \ 16 | telnet \ 17 | iputils-ping \ 18 | unzip 19 | 20 | RUN mkdir /jmeter \ 21 | && cd /jmeter/ \ 22 | && wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz \ 23 | && tar -xzf apache-jmeter-$JMETER_VERSION.tgz \ 24 | && rm apache-jmeter-$JMETER_VERSION.tgz 25 | 26 | 27 | ADD jmeter-plugins/lib /jmeter/apache-jmeter-$JMETER_VERSION/lib 28 | 29 | ENV JMETER_HOME /jmeter/apache-jmeter-$JMETER_VERSION/ 30 | 31 | ENV PATH $JMETER_HOME/bin:$PATH 32 | 33 | ============Build, tag and push the base image============ 34 | 35 | docker build --tag="kubernautslabs/jmeter-base:latest" 36 | docker push kubernautslabs/jmeter-base:latest 37 | 38 | 39 | ============JMETER-MASTER DOCKER FILE============ 40 | 41 | FROM kubernautslabs/jmeter-base:latest 42 | MAINTAINER Kubernauts-lab 43 | 44 | EXPOSE 60000 45 | 46 | ============Build, tag and push the master image============ 47 | 48 | docker build --tag="kubernautslabs/jmeter-master:latest" 49 | docker push kubernautslabs/jmeter-master:latest 50 | 51 | ================JMETER-SLAVES DOCKER FILE===================== 52 | FROM kubernautslabs/jmeter-base 53 | MAINTAINER Kubernauts-lab 54 | 55 | EXPOSE 1099 50000 56 | 57 | ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ 58 | -Dserver.rmi.ssl.disable=true \ 59 | -Dserver.rmi.localport=50000 \ 60 | -Dserver_port=1099 61 | 62 | 63 | ============Build, tag and push the salve image:================ 64 | 65 | docker build --tag="kubernautslabs/jmeter-slave:latest" 66 | docker push kubernautslabs/jmeter-slave:latest 67 | -------------------------------------------------------------------------------- /Docker files: -------------------------------------------------------------------------------- 1 | Docker images for the master and slaves nodes can be built using the following procedure. 2 | 3 | First of all the jmeter base image needs to be created from the opend-jdk image, this will be used as reference while building the master and slaves images: 4 | 5 | ============JMETER BASE DOCKER FILE============ 6 | 7 | FROM openjdk:8-jre-slim 8 | MAINTAINER Kubernauts-lab 9 | 10 | ARG JMETER_VERSION=4.0 11 | 12 | RUN apt-get clean && \ 13 | apt-get update && \ 14 | apt-get -qy install \ 15 | wget \ 16 | telnet \ 17 | iputils-ping \ 18 | unzip 19 | 20 | RUN mkdir /jmeter \ 21 | && cd /jmeter/ \ 22 | && wget https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-$JMETER_VERSION.tgz \ 23 | && tar -xzf apache-jmeter-$JMETER_VERSION.tgz \ 24 | && rm apache-jmeter-$JMETER_VERSION.tgz 25 | 26 | 27 | ADD jmeter-plugins/lib /jmeter/apache-jmeter-$JMETER_VERSION/lib 28 | 29 | ENV JMETER_HOME /jmeter/apache-jmeter-$JMETER_VERSION/ 30 | 31 | ENV PATH $JMETER_HOME/bin:$PATH 32 | 33 | ============Build, tag and push the base image============ 34 | 35 | docker build --tag="kubernautslabs/jmeter-base:latest" -f Dockerfile-base . 36 | docker push kubernautslabs/jmeter-base:latest 37 | 38 | 39 | ============JMETER-MASTER DOCKER FILE============ 40 | 41 | FROM kubernautslabs/jmeter-base:latest 42 | MAINTAINER Kubernauts-lab 43 | 44 | EXPOSE 60000 45 | 46 | ============Build, tag and push the master image============ 47 | 48 | docker build --tag="kubernautslabs/jmeter-master:latest" -f Dockerfile-master . 49 | docker push kubernautslabs/jmeter-master:latest 50 | 51 | ================JMETER-SLAVES DOCKER FILE===================== 52 | FROM kubernautslabs/jmeter-base 53 | MAINTAINER Kubernauts-lab 54 | 55 | EXPOSE 1099 50000 56 | 57 | ENTRYPOINT $JMETER_HOME/bin/jmeter-server \ 58 | -Dserver.rmi.ssl.disable=true \ 59 | -Dserver.rmi.localport=50000 \ 60 | -Dserver_port=1099 61 | 62 | 63 | ============Build, tag and push the slave image:================ 64 | 65 | docker build --tag="kubernautslabs/jmeter-slave:latest" -f Dockerfile-slave . 66 | docker push kubernautslabs/jmeter-slave:latest 67 | 68 | ================JMETER-REPORTER DOCKER FILE===================== 69 | 70 | docker build --tag="kubernautslabs/jmeter-reporter" -f Dockerfile-reporter . 71 | docker push kubernautslabs/jmeter-reporter 72 | -------------------------------------------------------------------------------- /start_test_csv.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Script created to launch Jmeter tests with csv data files directly from the current terminal without accessing the jmeter master pod. 3 | # It requires that you supply the path to the directory with jmx file and csv files 4 | # Directory structure of jmx with csv supposed to be: 5 | # _test_name_/ 6 | # _test_name_/_test_name_.jmx 7 | # _test_name_/test_data1.csv 8 | # _test_name_/test_data2.csv 9 | # i.e. jmx file name have to be the same as directory name. 10 | # After execution, test script jmx file may be deleted from the pod itself but not locally. 11 | 12 | working_dir=$(pwd) 13 | 14 | # Get namesapce variable 15 | tenant=$(awk '{print $NF}' "$working_dir"/tenant_export) 16 | 17 | jmx_dir=$1 18 | 19 | if [ ! -d "$jmx_dir" ]; 20 | then 21 | echo "Test script dir was not found" 22 | echo "Kindly check and input the correct file path" 23 | exit 24 | fi 25 | 26 | # Get Master pod details 27 | 28 | printf "Copy %s to master\n" "${jmx_dir}.jmx" 29 | 30 | master_pod=$(kubectl get po -n "$tenant" | grep jmeter-master | awk '{print $1}') 31 | 32 | kubectl cp "${jmx_dir}/${jmx_dir}.jmx" -n "$tenant" "$master_pod":/ 33 | 34 | # Get slaves 35 | 36 | printf "Get number of slaves\n" 37 | 38 | slave_pods=($(kubectl get po -n "$tenant" | grep jmeter-slave | awk '{print $1}')) 39 | 40 | # for array iteration 41 | slavesnum=${#slave_pods[@]} 42 | 43 | # for split command suffix and seq generator 44 | slavedigits="${#slavesnum}" 45 | 46 | printf "Number of slaves is %s\n" "${slavesnum}" 47 | 48 | # Split and upload csv files 49 | 50 | for csvfilefull in "${jmx_dir}"/*.csv 51 | 52 | do 53 | 54 | csvfile="${csvfilefull##*/}" 55 | 56 | printf "Processing %s file..\n" "$csvfile" 57 | 58 | split --suffix-length="${slavedigits}" --additional-suffix=.csv -d --number="l/${slavesnum}" "${jmx_dir}/${csvfile}" "$jmx_dir"/ 59 | 60 | j=0 61 | for i in $(seq -f "%0${slavedigits}g" 0 $((slavesnum-1))) 62 | do 63 | printf "Copy %s to %s on %s\n" "${i}.csv" "${csvfile}" "${slave_pods[j]}" 64 | kubectl -n "$tenant" cp "${jmx_dir}/${i}.csv" "${slave_pods[j]}":/ 65 | kubectl -n "$tenant" exec "${slave_pods[j]}" -- mv -v /"${i}.csv" /"${csvfile}" 66 | rm -v "${jmx_dir}/${i}.csv" 67 | 68 | let j=j+1 69 | done # for i in "${slave_pods[@]}" 70 | 71 | done # for csvfile in "${jmx_dir}/*.csv" 72 | 73 | ## Echo Starting Jmeter load test 74 | 75 | kubectl exec -ti -n "$tenant" "$master_pod" -- /jmeter/load_test "/${jmx_dir}.jmx" 76 | -------------------------------------------------------------------------------- /openshift/jmeter_cluster_create.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Create multiple Jmeter namespaces on an existing kuberntes cluster 3 | #Started On January 23, 2018 4 | 5 | working_dir=`pwd` 6 | 7 | echo "checking if oc is present" 8 | 9 | if ! hash oc 2>/dev/null 10 | then 11 | echo "'oc' was not found in PATH" 12 | echo "Kindly ensure that you can acces an existing OpenShift cluster via oc" 13 | exit 14 | fi 15 | 16 | oc version 17 | 18 | echo "Current list of projects on the OpenShift cluster:" 19 | 20 | echo 21 | 22 | oc get project | grep -v NAME | awk '{print $1}' 23 | 24 | echo 25 | 26 | echo "Enter the name of the new project unique name, this will be used to create the namespace" 27 | read tenant 28 | echo 29 | 30 | #Check If namespace exists 31 | 32 | oc get project $tenant > /dev/null 2>&1 33 | 34 | if [ $? -eq 0 ] 35 | then 36 | echo "Project $tenant already exists, please select a unique name" 37 | echo "Current list of projects on the OpenShift cluster" 38 | sleep 2 39 | 40 | oc get project | grep -v NAME | awk '{print $1}' 41 | exit 1 42 | fi 43 | 44 | echo 45 | echo "Creating project: $tenant" 46 | 47 | oc new-project $tenant --description="jmeter cluster for loadtesting" --display-name="loadtesting" 48 | 49 | 50 | echo "Project $tenant has been created" 51 | 52 | oc project $tenant 53 | 54 | echo 55 | 56 | echo "Creating Jmeter slave nodes" 57 | 58 | # nodes=`kubectl get no | egrep -v "master|NAME" | wc -l` 59 | 60 | # echo 61 | 62 | # echo "Number of worker nodes on this cluster is " $nodes 63 | 64 | echo 65 | 66 | #echo "Creating $nodes Jmeter slave replicas and service" 67 | 68 | echo 69 | 70 | oc create -f $working_dir/jmeter_slaves_deploymentconfig.yaml 71 | 72 | oc create -f $working_dir/jmeter_slaves_svc.yaml 73 | 74 | echo "Creating Jmeter Master" 75 | 76 | oc create -f $working_dir/jmeter_master_configmap.yaml 77 | 78 | oc create -f $working_dir/jmeter_master_deploymentconfig.yaml 79 | 80 | 81 | echo "Creating Influxdb and the service" 82 | 83 | oc create -f $working_dir/jmeter_influxdb_configmap.yaml 84 | 85 | oc create -f $working_dir/jmeter_influxdb_openshift_deploymentconfig_ephemeral.yaml 86 | 87 | oc create -f $working_dir/jmeter_influxdb_svc.yaml 88 | 89 | echo "Creating Grafana Deployment" 90 | 91 | oc create -f $working_dir/jmeter_grafana_deploy.yaml 92 | 93 | oc create -f $working_dir/jmeter_grafana_svc.yaml 94 | 95 | echo "Printout Of the $tenant Objects" 96 | 97 | echo 98 | 99 | oc get all -o wide 100 | 101 | echo project= $tenant > $working_dir/tenant_export 102 | -------------------------------------------------------------------------------- /jmeter_cluster_create.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Create multiple Jmeter namespaces on an existing kuberntes cluster 3 | #Started On January 23, 2018 4 | 5 | working_dir=`pwd` 6 | 7 | echo "checking if kubectl is present" 8 | 9 | if ! hash kubectl 2>/dev/null 10 | then 11 | echo "'kubectl' was not found in PATH" 12 | echo "Kindly ensure that you can acces an existing kubernetes cluster via kubectl" 13 | exit 14 | fi 15 | 16 | kubectl version --short 17 | 18 | echo "Current list of namespaces on the kubernetes cluster:" 19 | 20 | echo 21 | 22 | kubectl get namespaces | grep -v NAME | awk '{print $1}' 23 | 24 | echo 25 | 26 | tenant="$1" 27 | if [ -z "$tenant" ] 28 | then 29 | echo "Enter the name of the new tenant unique name, this will be used to create the namespace" 30 | read tenant 31 | fi 32 | 33 | echo 34 | 35 | #Check If namespace exists 36 | 37 | kubectl get namespace $tenant > /dev/null 2>&1 38 | 39 | if [ $? -eq 0 ] 40 | then 41 | echo "Namespace $tenant already exists, please select a unique name" 42 | echo "Current list of namespaces on the kubernetes cluster" 43 | sleep 2 44 | 45 | kubectl get namespaces | grep -v NAME | awk '{print $1}' 46 | exit 1 47 | fi 48 | 49 | echo 50 | echo "Creating Namespace: $tenant" 51 | 52 | kubectl create namespace $tenant 53 | 54 | echo "Namspace $tenant has been created" 55 | 56 | echo 57 | 58 | echo "Creating Jmeter slave nodes" 59 | 60 | nodes=`kubectl get no | egrep -v "master|NAME" | wc -l` 61 | 62 | echo 63 | 64 | echo "Number of worker nodes on this cluster is " $nodes 65 | 66 | echo 67 | 68 | #echo "Creating $nodes Jmeter slave replicas and service" 69 | 70 | echo 71 | 72 | kubectl create -n $tenant -f $working_dir/jmeter_slaves_deploy.yaml 73 | 74 | kubectl create -n $tenant -f $working_dir/jmeter_slaves_svc.yaml 75 | 76 | echo "Creating Jmeter Master" 77 | 78 | kubectl create -n $tenant -f $working_dir/jmeter_master_configmap.yaml 79 | 80 | kubectl create -n $tenant -f $working_dir/jmeter_master_deploy.yaml 81 | 82 | 83 | echo "Creating Influxdb and the service" 84 | 85 | kubectl create -n $tenant -f $working_dir/jmeter_influxdb_configmap.yaml 86 | 87 | kubectl create -n $tenant -f $working_dir/jmeter_influxdb_deploy.yaml 88 | 89 | kubectl create -n $tenant -f $working_dir/jmeter_influxdb_svc.yaml 90 | 91 | echo "Creating Grafana Deployment" 92 | 93 | kubectl create -n $tenant -f $working_dir/jmeter_grafana_deploy.yaml 94 | 95 | kubectl create -n $tenant -f $working_dir/jmeter_grafana_svc.yaml 96 | 97 | echo "Printout Of the $tenant Objects" 98 | 99 | echo 100 | 101 | kubectl get -n $tenant all 102 | 103 | echo namespace = $tenant > $working_dir/tenant_export 104 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /openshift/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /cloudssky.jmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This test plan was created by the BlazeMeter converter v.1.1.307. Please contact support@blazemeter.com for further support. 6 | false 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Accept 18 | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 19 | 20 | 21 | Upgrade-Insecure-Requests 22 | 1 23 | 24 | 25 | User-Agent 26 | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 27 | 28 | 29 | Accept-Language 30 | en-GB,en-US;q=0.9,en;q=0.8 31 | 32 | 33 | Accept-Encoding 34 | gzip, deflate, br 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | BASE_URL_1 43 | cloudssky.com 44 | = 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | true 59 | true 60 | 6 61 | 62 | 63 | 64 | 65 | 66 | 67 | true 68 | false 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | true 78 | 79 | 80 | 81 | true 82 | false 83 | 84 | 85 | 86 | continue 87 | 88 | false 89 | 20 90 | 91 | 2 92 | 2 93 | 1363247040000 94 | 1363247040000 95 | false 96 | 0 97 | 0 98 | 99 | 100 | 101 | 102 | 103 | 104 | ${BASE_URL_1} 105 | 106 | https 107 | 108 | en/ 109 | GET 110 | true 111 | false 112 | true 113 | false 114 | 115 | 116 | 117 | 118 | 119 | 120 | 0 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | ${BASE_URL_1} 129 | 130 | https 131 | 132 | en/services/consulting/ 133 | GET 134 | true 135 | false 136 | true 137 | false 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | Referer 147 | https://cloudssky.com/en/ 148 | 149 | 150 | 151 | 152 | 153 | 10179 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | ${BASE_URL_1} 162 | 163 | https 164 | 165 | en/human-cloud/index.html 166 | GET 167 | true 168 | false 169 | true 170 | false 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | Referer 180 | https://cloudssky.com/en/services/consulting/ 181 | 182 | 183 | 184 | 185 | 186 | 27526 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | ${BASE_URL_1} 195 | 196 | https 197 | 198 | en/solutions/amazon-web-services/ 199 | GET 200 | true 201 | false 202 | true 203 | false 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | Referer 213 | https://cloudssky.com/en/human-cloud/index.html 214 | 215 | 216 | 217 | 218 | 219 | 20020 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | influxdbMetricsSender 228 | org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender 229 | = 230 | 231 | 232 | influxdbUrl 233 | http://jmeter-influxdb:8086/write?db=jmeter 234 | = 235 | 236 | 237 | application 238 | cloudssky 239 | = 240 | 241 | 242 | measurement 243 | jmeter 244 | = 245 | 246 | 247 | summaryOnly 248 | false 249 | = 250 | 251 | 252 | samplersRegex 253 | .* 254 | = 255 | 256 | 257 | percentiles 258 | 90;95;99 259 | = 260 | 261 | 262 | testTitle 263 | Test name 264 | = 265 | 266 | 267 | eventTags 268 | 269 | = 270 | 271 | 272 | 273 | org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient 274 | 275 | 276 | 277 | 278 | 279 | true 280 | 281 | 282 | 283 | 284 | -------------------------------------------------------------------------------- /openshift/cloudssky.jmx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | This test plan was created by the BlazeMeter converter v.1.1.307. Please contact support@blazemeter.com for further support. 6 | false 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Accept 18 | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 19 | 20 | 21 | Upgrade-Insecure-Requests 22 | 1 23 | 24 | 25 | User-Agent 26 | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 27 | 28 | 29 | Accept-Language 30 | en-GB,en-US;q=0.9,en;q=0.8 31 | 32 | 33 | Accept-Encoding 34 | gzip, deflate, br 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | BASE_URL_1 43 | cloudssky.com 44 | = 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | true 59 | true 60 | 6 61 | 62 | 63 | 64 | 65 | 66 | 67 | true 68 | false 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | true 78 | 79 | 80 | 81 | true 82 | false 83 | 84 | 85 | 86 | continue 87 | 88 | false 89 | 20 90 | 91 | 2 92 | 2 93 | 1363247040000 94 | 1363247040000 95 | false 96 | 0 97 | 0 98 | 99 | 100 | 101 | 102 | 103 | 104 | ${BASE_URL_1} 105 | 106 | https 107 | 108 | en/ 109 | GET 110 | true 111 | false 112 | true 113 | false 114 | 115 | 116 | 117 | 118 | 119 | 120 | 0 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | ${BASE_URL_1} 129 | 130 | https 131 | 132 | en/services/consulting/ 133 | GET 134 | true 135 | false 136 | true 137 | false 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | Referer 147 | https://cloudssky.com/en/ 148 | 149 | 150 | 151 | 152 | 153 | 10179 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | ${BASE_URL_1} 162 | 163 | https 164 | 165 | en/human-cloud/index.html 166 | GET 167 | true 168 | false 169 | true 170 | false 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | Referer 180 | https://cloudssky.com/en/services/consulting/ 181 | 182 | 183 | 184 | 185 | 186 | 27526 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | ${BASE_URL_1} 195 | 196 | https 197 | 198 | en/solutions/amazon-web-services/ 199 | GET 200 | true 201 | false 202 | true 203 | false 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | Referer 213 | https://cloudssky.com/en/human-cloud/index.html 214 | 215 | 216 | 217 | 218 | 219 | 20020 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | influxdbMetricsSender 228 | org.apache.jmeter.visualizers.backend.influxdb.HttpMetricsSender 229 | = 230 | 231 | 232 | influxdbUrl 233 | http://jmeter-influxdb:8086/write?db=jmeter 234 | = 235 | 236 | 237 | application 238 | cloudssky 239 | = 240 | 241 | 242 | measurement 243 | jmeter 244 | = 245 | 246 | 247 | summaryOnly 248 | false 249 | = 250 | 251 | 252 | samplersRegex 253 | .* 254 | = 255 | 256 | 257 | percentiles 258 | 90;95;99 259 | = 260 | 261 | 262 | testTitle 263 | Test name 264 | = 265 | 266 | 267 | eventTags 268 | 269 | = 270 | 271 | 272 | 273 | org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient 274 | 275 | 276 | 277 | 278 | 279 | true 280 | 281 | 282 | 283 | 284 | -------------------------------------------------------------------------------- /GrafanaJMeterTemplate.json: -------------------------------------------------------------------------------- 1 | { 2 | "__inputs": [ 3 | { 4 | "name": "DS_JMETERDB", 5 | "label": "jmeterdb", 6 | "description": "", 7 | "type": "datasource", 8 | "pluginId": "influxdb", 9 | "pluginName": "InfluxDB" 10 | } 11 | ], 12 | "__requires": [ 13 | { 14 | "type": "grafana", 15 | "id": "grafana", 16 | "name": "Grafana", 17 | "version": "5.2.0" 18 | }, 19 | { 20 | "type": "panel", 21 | "id": "graph", 22 | "name": "Graph", 23 | "version": "5.0.0" 24 | }, 25 | { 26 | "type": "datasource", 27 | "id": "influxdb", 28 | "name": "InfluxDB", 29 | "version": "5.0.0" 30 | }, 31 | { 32 | "type": "panel", 33 | "id": "singlestat", 34 | "name": "Singlestat", 35 | "version": "5.0.0" 36 | } 37 | ], 38 | "annotations": { 39 | "list": [ 40 | { 41 | "builtIn": 1, 42 | "datasource": "-- Grafana --", 43 | "enable": true, 44 | "hide": true, 45 | "iconColor": "rgba(0, 211, 255, 1)", 46 | "name": "Annotations & Alerts", 47 | "type": "dashboard" 48 | }, 49 | { 50 | "datasource": "${DS_JMETERDB}", 51 | "enable": true, 52 | "iconColor": "rgb(237, 18, 18)", 53 | "iconSize": 17, 54 | "lineColor": "rgb(0, 21, 255)", 55 | "name": "Annotation", 56 | "query": "select text,tags,title from \"$retention\".\"events\" where application =~ /$app/ AND $timeFilter", 57 | "showLine": true, 58 | "tagsColumn": "tags", 59 | "textColumn": "text", 60 | "titleColumn": "title" 61 | } 62 | ] 63 | }, 64 | "editable": true, 65 | "gnetId": null, 66 | "graphTooltip": 1, 67 | "id": null, 68 | "iteration": 1552478455724, 69 | "links": [ 70 | { 71 | "asDropdown": true, 72 | "icon": "dashboard", 73 | "includeVars": true, 74 | "keepTime": true, 75 | "tags": [], 76 | "targetBlank": true, 77 | "tooltip": "", 78 | "type": "dashboards", 79 | "url": "" 80 | } 81 | ], 82 | "panels": [ 83 | { 84 | "collapsed": false, 85 | "gridPos": { 86 | "h": 1, 87 | "w": 24, 88 | "x": 0, 89 | "y": 0 90 | }, 91 | "id": 35, 92 | "panels": [], 93 | "repeat": null, 94 | "title": "Jmeter Metrics", 95 | "type": "row" 96 | }, 97 | { 98 | "cacheTimeout": null, 99 | "colorBackground": false, 100 | "colorValue": false, 101 | "colors": [ 102 | "rgba(245, 54, 54, 0.9)", 103 | "rgba(237, 129, 40, 0.89)", 104 | "rgba(50, 172, 45, 0.97)" 105 | ], 106 | "datasource": "${DS_JMETERDB}", 107 | "editable": true, 108 | "error": false, 109 | "format": "none", 110 | "gauge": { 111 | "maxValue": 100, 112 | "minValue": 0, 113 | "show": false, 114 | "thresholdLabels": false, 115 | "thresholdMarkers": true 116 | }, 117 | "gridPos": { 118 | "h": 4, 119 | "w": 8, 120 | "x": 0, 121 | "y": 1 122 | }, 123 | "id": 19, 124 | "interval": "$granularity", 125 | "links": [], 126 | "mappingType": 1, 127 | "mappingTypes": [ 128 | { 129 | "name": "value to text", 130 | "value": 1 131 | }, 132 | { 133 | "name": "range to text", 134 | "value": 2 135 | } 136 | ], 137 | "maxDataPoints": 100, 138 | "nullPointMode": "connected", 139 | "nullText": null, 140 | "postfix": " users", 141 | "postfixFontSize": "50%", 142 | "prefix": "", 143 | "prefixFontSize": "50%", 144 | "rangeMaps": [ 145 | { 146 | "from": "null", 147 | "text": "N/A", 148 | "to": "null" 149 | } 150 | ], 151 | "sparkline": { 152 | "fillColor": "rgba(31, 118, 189, 0.18)", 153 | "full": true, 154 | "lineColor": "rgb(31, 120, 193)", 155 | "show": true 156 | }, 157 | "tableColumn": "", 158 | "targets": [ 159 | { 160 | "dsType": "influxdb", 161 | "groupBy": [ 162 | { 163 | "params": [ 164 | "$granularity" 165 | ], 166 | "type": "time" 167 | }, 168 | { 169 | "params": [ 170 | "null" 171 | ], 172 | "type": "fill" 173 | } 174 | ], 175 | "measurement": "jmeter", 176 | "policy": "$retention", 177 | "query": "SELECT last(\"startedT\") FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity) fill(null)", 178 | "refId": "A", 179 | "resultFormat": "time_series", 180 | "select": [ 181 | [ 182 | { 183 | "params": [ 184 | "meanAT" 185 | ], 186 | "type": "field" 187 | }, 188 | { 189 | "params": [], 190 | "type": "last" 191 | } 192 | ] 193 | ], 194 | "tags": [ 195 | { 196 | "key": "application", 197 | "operator": "=~", 198 | "value": "/$app$/" 199 | } 200 | ] 201 | } 202 | ], 203 | "thresholds": "", 204 | "title": "Active Users", 205 | "type": "singlestat", 206 | "valueFontSize": "80%", 207 | "valueMaps": [ 208 | { 209 | "op": "=", 210 | "text": "0", 211 | "value": "null" 212 | } 213 | ], 214 | "valueName": "current" 215 | }, 216 | { 217 | "cacheTimeout": null, 218 | "colorBackground": false, 219 | "colorValue": false, 220 | "colors": [ 221 | "rgba(245, 54, 54, 0.9)", 222 | "rgba(237, 129, 40, 0.89)", 223 | "rgba(50, 172, 45, 0.97)" 224 | ], 225 | "datasource": "${DS_JMETERDB}", 226 | "editable": true, 227 | "error": false, 228 | "format": "none", 229 | "gauge": { 230 | "maxValue": 100, 231 | "minValue": 0, 232 | "show": false, 233 | "thresholdLabels": false, 234 | "thresholdMarkers": true 235 | }, 236 | "gridPos": { 237 | "h": 4, 238 | "w": 8, 239 | "x": 8, 240 | "y": 1 241 | }, 242 | "id": 17, 243 | "interval": "", 244 | "links": [], 245 | "mappingType": 1, 246 | "mappingTypes": [ 247 | { 248 | "name": "value to text", 249 | "value": 1 250 | }, 251 | { 252 | "name": "range to text", 253 | "value": 2 254 | } 255 | ], 256 | "maxDataPoints": 100, 257 | "nullPointMode": "connected", 258 | "nullText": null, 259 | "postfix": " TPS", 260 | "postfixFontSize": "50%", 261 | "prefix": "", 262 | "prefixFontSize": "50%", 263 | "rangeMaps": [ 264 | { 265 | "from": "null", 266 | "text": "N/A", 267 | "to": "null" 268 | } 269 | ], 270 | "sparkline": { 271 | "fillColor": "rgba(31, 118, 189, 0.18)", 272 | "full": true, 273 | "lineColor": "rgb(31, 120, 193)", 274 | "show": true 275 | }, 276 | "tableColumn": "", 277 | "targets": [ 278 | { 279 | "dsType": "influxdb", 280 | "groupBy": [ 281 | { 282 | "params": [ 283 | "$granularity" 284 | ], 285 | "type": "time" 286 | } 287 | ], 288 | "measurement": "jmeter", 289 | "policy": "default", 290 | "query": "SELECT sum(\"hit\") / 30 FROM \"$retention\".\"jmeter\" WHERE \"application\" = '$app' AND \"transaction\" = 'all' AND $timeFilter GROUP BY time(30s)", 291 | "rawQuery": true, 292 | "refId": "A", 293 | "resultFormat": "time_series", 294 | "select": [ 295 | [ 296 | { 297 | "params": [ 298 | "hit" 299 | ], 300 | "type": "field" 301 | }, 302 | { 303 | "params": [], 304 | "type": "last" 305 | }, 306 | { 307 | "params": [ 308 | " / 5" 309 | ], 310 | "type": "math" 311 | } 312 | ] 313 | ], 314 | "tags": [ 315 | { 316 | "key": "application", 317 | "operator": "=~", 318 | "value": "/$app$/" 319 | }, 320 | { 321 | "condition": "AND", 322 | "key": "transaction", 323 | "operator": "=", 324 | "value": "all" 325 | } 326 | ] 327 | } 328 | ], 329 | "thresholds": "", 330 | "title": "Currents hits per Second", 331 | "type": "singlestat", 332 | "valueFontSize": "80%", 333 | "valueMaps": [ 334 | { 335 | "op": "=", 336 | "text": "0", 337 | "value": "null" 338 | } 339 | ], 340 | "valueName": "current" 341 | }, 342 | { 343 | "cacheTimeout": null, 344 | "colorBackground": false, 345 | "colorValue": true, 346 | "colors": [ 347 | "rgba(50, 172, 45, 0.97)", 348 | "rgba(237, 129, 40, 0.89)", 349 | "rgba(245, 54, 54, 0.9)" 350 | ], 351 | "datasource": "${DS_JMETERDB}", 352 | "editable": true, 353 | "error": false, 354 | "format": "percentunit", 355 | "gauge": { 356 | "maxValue": 100, 357 | "minValue": 0, 358 | "show": false, 359 | "thresholdLabels": false, 360 | "thresholdMarkers": true 361 | }, 362 | "gridPos": { 363 | "h": 4, 364 | "w": 8, 365 | "x": 16, 366 | "y": 1 367 | }, 368 | "id": 21, 369 | "interval": "$granularity", 370 | "links": [], 371 | "mappingType": 1, 372 | "mappingTypes": [ 373 | { 374 | "name": "value to text", 375 | "value": 1 376 | }, 377 | { 378 | "name": "range to text", 379 | "value": 2 380 | } 381 | ], 382 | "maxDataPoints": 100, 383 | "nullPointMode": "connected", 384 | "nullText": null, 385 | "postfix": "", 386 | "postfixFontSize": "50%", 387 | "prefix": "", 388 | "prefixFontSize": "50%", 389 | "rangeMaps": [ 390 | { 391 | "from": "null", 392 | "text": "N/A", 393 | "to": "null" 394 | } 395 | ], 396 | "sparkline": { 397 | "fillColor": "rgba(31, 118, 189, 0.18)", 398 | "full": true, 399 | "lineColor": "rgb(31, 120, 193)", 400 | "show": true 401 | }, 402 | "tableColumn": "", 403 | "targets": [ 404 | { 405 | "dsType": "influxdb", 406 | "groupBy": [], 407 | "measurement": "jmeter", 408 | "policy": "$retention", 409 | "query": "SELECT sum(\"countError\") / sum(\"count\") FROM \"$retention\".\"jmeter\" WHERE \"application\" =~ /$app$/ AND \"transaction\" = 'all' AND $timeFilter", 410 | "rawQuery": true, 411 | "refId": "B", 412 | "resultFormat": "time_series", 413 | "select": [ 414 | [ 415 | { 416 | "params": [ 417 | "countError" 418 | ], 419 | "type": "field" 420 | }, 421 | { 422 | "params": [], 423 | "type": "sum" 424 | }, 425 | { 426 | "params": [ 427 | " / sum(\"count\")" 428 | ], 429 | "type": "math" 430 | } 431 | ] 432 | ], 433 | "tags": [ 434 | { 435 | "key": "application", 436 | "operator": "=~", 437 | "value": "/$app$/" 438 | }, 439 | { 440 | "condition": "AND", 441 | "key": "transaction", 442 | "operator": "=", 443 | "value": "all" 444 | } 445 | ] 446 | } 447 | ], 448 | "thresholds": "0.1,0.2", 449 | "title": "% Errors", 450 | "type": "singlestat", 451 | "valueFontSize": "80%", 452 | "valueMaps": [ 453 | { 454 | "op": "=", 455 | "text": "0", 456 | "value": "null" 457 | } 458 | ], 459 | "valueName": "total" 460 | }, 461 | { 462 | "aliasColors": {}, 463 | "bars": false, 464 | "dashLength": 10, 465 | "dashes": false, 466 | "datasource": "${DS_JMETERDB}", 467 | "editable": true, 468 | "error": false, 469 | "fill": 1, 470 | "grid": {}, 471 | "gridPos": { 472 | "h": 4, 473 | "w": 8, 474 | "x": 0, 475 | "y": 5 476 | }, 477 | "id": 27, 478 | "interval": "$granularity", 479 | "legend": { 480 | "avg": false, 481 | "current": false, 482 | "max": false, 483 | "min": false, 484 | "show": false, 485 | "total": false, 486 | "values": false 487 | }, 488 | "lines": true, 489 | "linewidth": 1, 490 | "links": [], 491 | "nullPointMode": "null as zero", 492 | "percentage": false, 493 | "pointradius": 5, 494 | "points": false, 495 | "renderer": "flot", 496 | "seriesOverrides": [], 497 | "spaceLength": 10, 498 | "stack": false, 499 | "steppedLine": true, 500 | "targets": [ 501 | { 502 | "alias": "Hits", 503 | "dsType": "influxdb", 504 | "groupBy": [ 505 | { 506 | "params": [ 507 | "$granularity" 508 | ], 509 | "type": "time" 510 | }, 511 | { 512 | "params": [ 513 | "null" 514 | ], 515 | "type": "fill" 516 | } 517 | ], 518 | "measurement": "jmeter", 519 | "policy": "$retention", 520 | "query": "SELECT last(\"hit\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity) fill(null)", 521 | "refId": "A", 522 | "resultFormat": "time_series", 523 | "select": [ 524 | [ 525 | { 526 | "params": [ 527 | "hit" 528 | ], 529 | "type": "field" 530 | }, 531 | { 532 | "params": [], 533 | "type": "last" 534 | }, 535 | { 536 | "params": [ 537 | " / 5" 538 | ], 539 | "type": "math" 540 | } 541 | ] 542 | ], 543 | "tags": [ 544 | { 545 | "key": "application", 546 | "operator": "=~", 547 | "value": "/$app$/" 548 | } 549 | ] 550 | } 551 | ], 552 | "thresholds": [], 553 | "timeFrom": null, 554 | "timeShift": null, 555 | "title": "Hits per Second", 556 | "tooltip": { 557 | "msResolution": false, 558 | "shared": true, 559 | "sort": 0, 560 | "value_type": "cumulative" 561 | }, 562 | "type": "graph", 563 | "xaxis": { 564 | "buckets": null, 565 | "mode": "time", 566 | "name": null, 567 | "show": false, 568 | "values": [] 569 | }, 570 | "yaxes": [ 571 | { 572 | "format": "short", 573 | "logBase": 1, 574 | "max": null, 575 | "min": 0, 576 | "show": true 577 | }, 578 | { 579 | "format": "short", 580 | "logBase": 1, 581 | "max": null, 582 | "min": null, 583 | "show": true 584 | } 585 | ], 586 | "yaxis": { 587 | "align": false, 588 | "alignLevel": null 589 | } 590 | }, 591 | { 592 | "cacheTimeout": null, 593 | "colorBackground": false, 594 | "colorValue": false, 595 | "colors": [ 596 | "rgba(245, 54, 54, 0.9)", 597 | "rgba(237, 129, 40, 0.89)", 598 | "rgba(50, 172, 45, 0.97)" 599 | ], 600 | "datasource": "${DS_JMETERDB}", 601 | "editable": true, 602 | "error": false, 603 | "format": "none", 604 | "gauge": { 605 | "maxValue": 100, 606 | "minValue": 0, 607 | "show": false, 608 | "thresholdLabels": false, 609 | "thresholdMarkers": true 610 | }, 611 | "gridPos": { 612 | "h": 4, 613 | "w": 8, 614 | "x": 8, 615 | "y": 5 616 | }, 617 | "id": 22, 618 | "interval": "$granularity", 619 | "links": [], 620 | "mappingType": 1, 621 | "mappingTypes": [ 622 | { 623 | "name": "value to text", 624 | "value": 1 625 | }, 626 | { 627 | "name": "range to text", 628 | "value": 2 629 | } 630 | ], 631 | "maxDataPoints": 100, 632 | "nullPointMode": "connected", 633 | "nullText": null, 634 | "postfix": "", 635 | "postfixFontSize": "50%", 636 | "prefix": "", 637 | "prefixFontSize": "50%", 638 | "rangeMaps": [ 639 | { 640 | "from": "null", 641 | "text": "N/A", 642 | "to": "null" 643 | } 644 | ], 645 | "sparkline": { 646 | "fillColor": "rgba(31, 118, 189, 0.18)", 647 | "full": true, 648 | "lineColor": "rgb(31, 120, 193)", 649 | "show": true 650 | }, 651 | "tableColumn": "", 652 | "targets": [ 653 | { 654 | "dsType": "influxdb", 655 | "groupBy": [], 656 | "measurement": "jmeter", 657 | "policy": "$retention", 658 | "query": "SELECT \"hit\" FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND \"statut\" = 'all' AND $timeFilter", 659 | "rawQuery": false, 660 | "refId": "A", 661 | "resultFormat": "time_series", 662 | "select": [ 663 | [ 664 | { 665 | "params": [ 666 | "hit" 667 | ], 668 | "type": "field" 669 | } 670 | ] 671 | ], 672 | "tags": [ 673 | { 674 | "key": "application", 675 | "operator": "=~", 676 | "value": "/$app$/" 677 | }, 678 | { 679 | "condition": "AND", 680 | "key": "statut", 681 | "operator": "=", 682 | "value": "all" 683 | } 684 | ] 685 | } 686 | ], 687 | "thresholds": "", 688 | "title": "Total Hits", 689 | "type": "singlestat", 690 | "valueFontSize": "80%", 691 | "valueMaps": [ 692 | { 693 | "op": "=", 694 | "text": "0", 695 | "value": "null" 696 | } 697 | ], 698 | "valueName": "total" 699 | }, 700 | { 701 | "aliasColors": {}, 702 | "bars": false, 703 | "dashLength": 10, 704 | "dashes": false, 705 | "datasource": "${DS_JMETERDB}", 706 | "editable": true, 707 | "error": false, 708 | "fill": 1, 709 | "grid": {}, 710 | "gridPos": { 711 | "h": 4, 712 | "w": 8, 713 | "x": 16, 714 | "y": 5 715 | }, 716 | "id": 28, 717 | "interval": "$granularity", 718 | "legend": { 719 | "avg": false, 720 | "current": false, 721 | "max": false, 722 | "min": false, 723 | "show": false, 724 | "total": false, 725 | "values": false 726 | }, 727 | "lines": true, 728 | "linewidth": 1, 729 | "links": [], 730 | "nullPointMode": "null", 731 | "percentage": false, 732 | "pointradius": 5, 733 | "points": false, 734 | "renderer": "flot", 735 | "seriesOverrides": [], 736 | "spaceLength": 10, 737 | "stack": false, 738 | "steppedLine": true, 739 | "targets": [ 740 | { 741 | "alias": "Errors", 742 | "dsType": "influxdb", 743 | "groupBy": [ 744 | { 745 | "params": [ 746 | "$granularity" 747 | ], 748 | "type": "time" 749 | }, 750 | { 751 | "params": [ 752 | "0" 753 | ], 754 | "type": "fill" 755 | } 756 | ], 757 | "measurement": "jmeter", 758 | "policy": "$retention", 759 | "query": "SELECT mean(\"countError\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity) fill(0)", 760 | "rawQuery": false, 761 | "refId": "A", 762 | "resultFormat": "time_series", 763 | "select": [ 764 | [ 765 | { 766 | "params": [ 767 | "countError" 768 | ], 769 | "type": "field" 770 | }, 771 | { 772 | "params": [], 773 | "type": "mean" 774 | }, 775 | { 776 | "params": [ 777 | " / 5" 778 | ], 779 | "type": "math" 780 | } 781 | ] 782 | ], 783 | "tags": [ 784 | { 785 | "key": "application", 786 | "operator": "=~", 787 | "value": "/$app$/" 788 | } 789 | ] 790 | } 791 | ], 792 | "thresholds": [], 793 | "timeFrom": null, 794 | "timeShift": null, 795 | "title": "Errors per Second", 796 | "tooltip": { 797 | "msResolution": false, 798 | "shared": true, 799 | "sort": 0, 800 | "value_type": "cumulative" 801 | }, 802 | "type": "graph", 803 | "xaxis": { 804 | "buckets": null, 805 | "mode": "time", 806 | "name": null, 807 | "show": false, 808 | "values": [] 809 | }, 810 | "yaxes": [ 811 | { 812 | "format": "short", 813 | "logBase": 1, 814 | "max": null, 815 | "min": 0, 816 | "show": true 817 | }, 818 | { 819 | "format": "short", 820 | "logBase": 1, 821 | "max": null, 822 | "min": null, 823 | "show": true 824 | } 825 | ], 826 | "yaxis": { 827 | "align": false, 828 | "alignLevel": null 829 | } 830 | }, 831 | { 832 | "collapsed": false, 833 | "gridPos": { 834 | "h": 1, 835 | "w": 24, 836 | "x": 0, 837 | "y": 9 838 | }, 839 | "id": 36, 840 | "panels": [], 841 | "repeat": null, 842 | "title": "Application Metrics", 843 | "type": "row" 844 | }, 845 | { 846 | "aliasColors": {}, 847 | "bars": false, 848 | "dashLength": 10, 849 | "dashes": false, 850 | "datasource": "${DS_JMETERDB}", 851 | "editable": true, 852 | "error": false, 853 | "fill": 1, 854 | "grid": {}, 855 | "gridPos": { 856 | "h": 18, 857 | "w": 24, 858 | "x": 0, 859 | "y": 10 860 | }, 861 | "height": "", 862 | "id": 25, 863 | "interval": "$granularity", 864 | "legend": { 865 | "alignAsTable": true, 866 | "avg": true, 867 | "current": true, 868 | "hideEmpty": false, 869 | "max": true, 870 | "min": true, 871 | "rightSide": false, 872 | "show": true, 873 | "total": false, 874 | "values": true 875 | }, 876 | "lines": true, 877 | "linewidth": 1, 878 | "links": [], 879 | "minSpan": 24, 880 | "nullPointMode": "null", 881 | "percentage": false, 882 | "pointradius": 5, 883 | "points": false, 884 | "renderer": "flot", 885 | "seriesOverrides": [], 886 | "spaceLength": 10, 887 | "stack": false, 888 | "steppedLine": true, 889 | "targets": [ 890 | { 891 | "alias": "$tag_transaction", 892 | "dsType": "influxdb", 893 | "groupBy": [ 894 | { 895 | "params": [ 896 | "$granularity" 897 | ], 898 | "type": "time" 899 | }, 900 | { 901 | "params": [ 902 | "transaction" 903 | ], 904 | "type": "tag" 905 | } 906 | ], 907 | "hide": false, 908 | "measurement": "jmeter", 909 | "policy": "$retention", 910 | "query": "SELECT mean(\"avg\") FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity), \"transaction\"", 911 | "rawQuery": false, 912 | "refId": "A", 913 | "resultFormat": "time_series", 914 | "select": [ 915 | [ 916 | { 917 | "params": [ 918 | "avg" 919 | ], 920 | "type": "field" 921 | }, 922 | { 923 | "params": [], 924 | "type": "mean" 925 | } 926 | ] 927 | ], 928 | "tags": [ 929 | { 930 | "key": "application", 931 | "operator": "=~", 932 | "value": "/$app$/" 933 | }, 934 | { 935 | "condition": "AND", 936 | "key": "statut", 937 | "operator": "=", 938 | "value": "all" 939 | } 940 | ] 941 | } 942 | ], 943 | "thresholds": [], 944 | "timeFrom": null, 945 | "timeShift": null, 946 | "title": "Average Response Time", 947 | "tooltip": { 948 | "msResolution": false, 949 | "shared": false, 950 | "sort": 0, 951 | "value_type": "cumulative" 952 | }, 953 | "transparent": false, 954 | "type": "graph", 955 | "xaxis": { 956 | "buckets": null, 957 | "mode": "time", 958 | "name": null, 959 | "show": true, 960 | "values": [] 961 | }, 962 | "yaxes": [ 963 | { 964 | "format": "ms", 965 | "logBase": 1, 966 | "max": null, 967 | "min": null, 968 | "show": true 969 | }, 970 | { 971 | "format": "short", 972 | "logBase": 1, 973 | "max": null, 974 | "min": null, 975 | "show": true 976 | } 977 | ], 978 | "yaxis": { 979 | "align": false, 980 | "alignLevel": null 981 | } 982 | }, 983 | { 984 | "aliasColors": {}, 985 | "bars": false, 986 | "dashLength": 10, 987 | "dashes": false, 988 | "datasource": "${DS_JMETERDB}", 989 | "editable": true, 990 | "error": false, 991 | "fill": 1, 992 | "grid": {}, 993 | "gridPos": { 994 | "h": 18, 995 | "w": 24, 996 | "x": 0, 997 | "y": 28 998 | }, 999 | "height": "", 1000 | "id": 26, 1001 | "interval": "$granularity", 1002 | "legend": { 1003 | "alignAsTable": true, 1004 | "avg": true, 1005 | "current": true, 1006 | "hideEmpty": false, 1007 | "max": true, 1008 | "min": true, 1009 | "rightSide": false, 1010 | "show": true, 1011 | "sort": "current", 1012 | "sortDesc": true, 1013 | "total": false, 1014 | "values": true 1015 | }, 1016 | "lines": true, 1017 | "linewidth": 1, 1018 | "links": [], 1019 | "minSpan": 24, 1020 | "nullPointMode": "null", 1021 | "percentage": false, 1022 | "pointradius": 5, 1023 | "points": false, 1024 | "renderer": "flot", 1025 | "seriesOverrides": [], 1026 | "spaceLength": 10, 1027 | "stack": false, 1028 | "steppedLine": true, 1029 | "targets": [ 1030 | { 1031 | "alias": "$tag_transaction", 1032 | "dsType": "influxdb", 1033 | "groupBy": [ 1034 | { 1035 | "params": [ 1036 | "30s" 1037 | ], 1038 | "type": "time" 1039 | }, 1040 | { 1041 | "params": [ 1042 | "transaction" 1043 | ], 1044 | "type": "tag" 1045 | } 1046 | ], 1047 | "measurement": "jmeter", 1048 | "policy": "$retention", 1049 | "query": "SELECT mean(\"count\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND \"transaction\" <> 'all' AND $timeFilter GROUP BY time($granularity), \"transaction\"", 1050 | "rawQuery": false, 1051 | "refId": "A", 1052 | "resultFormat": "time_series", 1053 | "select": [ 1054 | [ 1055 | { 1056 | "params": [ 1057 | "count" 1058 | ], 1059 | "type": "field" 1060 | }, 1061 | { 1062 | "params": [], 1063 | "type": "sum" 1064 | }, 1065 | { 1066 | "params": [ 1067 | " / 30" 1068 | ], 1069 | "type": "math" 1070 | } 1071 | ] 1072 | ], 1073 | "tags": [ 1074 | { 1075 | "key": "application", 1076 | "operator": "=~", 1077 | "value": "/$app$/" 1078 | }, 1079 | { 1080 | "condition": "AND", 1081 | "key": "transaction", 1082 | "operator": "<>", 1083 | "value": "all" 1084 | }, 1085 | { 1086 | "condition": "AND", 1087 | "key": "statut", 1088 | "operator": "=", 1089 | "value": "all" 1090 | } 1091 | ] 1092 | } 1093 | ], 1094 | "thresholds": [], 1095 | "timeFrom": null, 1096 | "timeShift": null, 1097 | "title": "Transaction Per Second", 1098 | "tooltip": { 1099 | "msResolution": false, 1100 | "shared": false, 1101 | "sort": 0, 1102 | "value_type": "cumulative" 1103 | }, 1104 | "transparent": false, 1105 | "type": "graph", 1106 | "xaxis": { 1107 | "buckets": null, 1108 | "mode": "time", 1109 | "name": null, 1110 | "show": true, 1111 | "values": [] 1112 | }, 1113 | "yaxes": [ 1114 | { 1115 | "format": "ops", 1116 | "label": "", 1117 | "logBase": 1, 1118 | "max": null, 1119 | "min": null, 1120 | "show": true 1121 | }, 1122 | { 1123 | "format": "short", 1124 | "logBase": 1, 1125 | "max": null, 1126 | "min": null, 1127 | "show": true 1128 | } 1129 | ], 1130 | "yaxis": { 1131 | "align": false, 1132 | "alignLevel": null 1133 | } 1134 | }, 1135 | { 1136 | "aliasColors": {}, 1137 | "bars": false, 1138 | "dashLength": 10, 1139 | "dashes": false, 1140 | "datasource": "${DS_JMETERDB}", 1141 | "editable": true, 1142 | "error": false, 1143 | "fill": 1, 1144 | "grid": {}, 1145 | "gridPos": { 1146 | "h": 18, 1147 | "w": 24, 1148 | "x": 0, 1149 | "y": 46 1150 | }, 1151 | "height": "", 1152 | "id": 29, 1153 | "interval": "$granularity", 1154 | "legend": { 1155 | "alignAsTable": true, 1156 | "avg": true, 1157 | "current": true, 1158 | "hideEmpty": false, 1159 | "max": true, 1160 | "min": true, 1161 | "rightSide": false, 1162 | "show": true, 1163 | "total": false, 1164 | "values": true 1165 | }, 1166 | "lines": true, 1167 | "linewidth": 1, 1168 | "links": [], 1169 | "minSpan": 24, 1170 | "nullPointMode": "null", 1171 | "percentage": false, 1172 | "pointradius": 5, 1173 | "points": false, 1174 | "renderer": "flot", 1175 | "seriesOverrides": [], 1176 | "spaceLength": 10, 1177 | "stack": false, 1178 | "steppedLine": true, 1179 | "targets": [ 1180 | { 1181 | "alias": "$tag_transaction", 1182 | "dsType": "influxdb", 1183 | "groupBy": [ 1184 | { 1185 | "params": [ 1186 | "30s" 1187 | ], 1188 | "type": "time" 1189 | }, 1190 | { 1191 | "params": [ 1192 | "transaction" 1193 | ], 1194 | "type": "tag" 1195 | }, 1196 | { 1197 | "params": [ 1198 | "null" 1199 | ], 1200 | "type": "fill" 1201 | } 1202 | ], 1203 | "measurement": "jmeter", 1204 | "policy": "$retention", 1205 | "query": "SELECT last(\"count\") / 30 FROM \"$retention\".\"jmeter\" WHERE \"application\" =~ /$app$/ AND \"statut\" = 'ko' AND $timeFilter GROUP BY time(30s), \"transaction\" fill(null)", 1206 | "rawQuery": false, 1207 | "refId": "B", 1208 | "resultFormat": "time_series", 1209 | "select": [ 1210 | [ 1211 | { 1212 | "params": [ 1213 | "count" 1214 | ], 1215 | "type": "field" 1216 | }, 1217 | { 1218 | "params": [], 1219 | "type": "sum" 1220 | }, 1221 | { 1222 | "params": [ 1223 | " / 30" 1224 | ], 1225 | "type": "math" 1226 | } 1227 | ] 1228 | ], 1229 | "tags": [ 1230 | { 1231 | "key": "application", 1232 | "operator": "=~", 1233 | "value": "/$app$/" 1234 | }, 1235 | { 1236 | "condition": "AND", 1237 | "key": "statut", 1238 | "operator": "=", 1239 | "value": "ko" 1240 | } 1241 | ] 1242 | } 1243 | ], 1244 | "thresholds": [], 1245 | "timeFrom": null, 1246 | "timeShift": null, 1247 | "title": "Error Per Second", 1248 | "tooltip": { 1249 | "msResolution": false, 1250 | "shared": false, 1251 | "sort": 0, 1252 | "value_type": "cumulative" 1253 | }, 1254 | "transparent": false, 1255 | "type": "graph", 1256 | "xaxis": { 1257 | "buckets": null, 1258 | "mode": "time", 1259 | "name": null, 1260 | "show": true, 1261 | "values": [] 1262 | }, 1263 | "yaxes": [ 1264 | { 1265 | "format": "ops", 1266 | "label": "", 1267 | "logBase": 1, 1268 | "max": null, 1269 | "min": null, 1270 | "show": true 1271 | }, 1272 | { 1273 | "format": "short", 1274 | "logBase": 1, 1275 | "max": null, 1276 | "min": null, 1277 | "show": true 1278 | } 1279 | ], 1280 | "yaxis": { 1281 | "align": false, 1282 | "alignLevel": null 1283 | } 1284 | }, 1285 | { 1286 | "aliasColors": {}, 1287 | "bars": false, 1288 | "dashLength": 10, 1289 | "dashes": false, 1290 | "datasource": "${DS_JMETERDB}", 1291 | "editable": true, 1292 | "error": false, 1293 | "fill": 1, 1294 | "grid": {}, 1295 | "gridPos": { 1296 | "h": 18, 1297 | "w": 24, 1298 | "x": 0, 1299 | "y": 64 1300 | }, 1301 | "height": "", 1302 | "id": 34, 1303 | "interval": "", 1304 | "legend": { 1305 | "alignAsTable": true, 1306 | "avg": true, 1307 | "current": true, 1308 | "hideEmpty": true, 1309 | "hideZero": true, 1310 | "max": true, 1311 | "min": true, 1312 | "rightSide": false, 1313 | "show": true, 1314 | "total": false, 1315 | "values": true 1316 | }, 1317 | "lines": true, 1318 | "linewidth": 1, 1319 | "links": [], 1320 | "minSpan": 24, 1321 | "nullPointMode": "null", 1322 | "percentage": false, 1323 | "pointradius": 1, 1324 | "points": false, 1325 | "renderer": "flot", 1326 | "seriesOverrides": [], 1327 | "spaceLength": 10, 1328 | "stack": false, 1329 | "steppedLine": true, 1330 | "targets": [ 1331 | { 1332 | "alias": "$tag_transaction - $tag_responseCode : $tag_responseMessage", 1333 | "dsType": "influxdb", 1334 | "groupBy": [ 1335 | { 1336 | "params": [ 1337 | "30s" 1338 | ], 1339 | "type": "time" 1340 | }, 1341 | { 1342 | "params": [ 1343 | "responseMessage" 1344 | ], 1345 | "type": "tag" 1346 | }, 1347 | { 1348 | "params": [ 1349 | "responseCode" 1350 | ], 1351 | "type": "tag" 1352 | }, 1353 | { 1354 | "params": [ 1355 | "transaction" 1356 | ], 1357 | "type": "tag" 1358 | }, 1359 | { 1360 | "params": [ 1361 | "null" 1362 | ], 1363 | "type": "fill" 1364 | } 1365 | ], 1366 | "measurement": "jmeter", 1367 | "policy": "$retention", 1368 | "query": "SELECT sum(\"count\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND \"statut\" = 'ko' AND $timeFilter GROUP BY time($granularity), \"responseCode\" fill(null)", 1369 | "rawQuery": false, 1370 | "refId": "B", 1371 | "resultFormat": "time_series", 1372 | "select": [ 1373 | [ 1374 | { 1375 | "params": [ 1376 | "count" 1377 | ], 1378 | "type": "field" 1379 | }, 1380 | { 1381 | "params": [], 1382 | "type": "sum" 1383 | }, 1384 | { 1385 | "params": [ 1386 | " / 30" 1387 | ], 1388 | "type": "math" 1389 | } 1390 | ] 1391 | ], 1392 | "tags": [ 1393 | { 1394 | "key": "application", 1395 | "operator": "=~", 1396 | "value": "/$app$/" 1397 | }, 1398 | { 1399 | "condition": "AND", 1400 | "key": "responseCode", 1401 | "operator": "!~", 1402 | "value": "/^0$|^$/" 1403 | }, 1404 | { 1405 | "condition": "AND", 1406 | "key": "transaction", 1407 | "operator": "=~", 1408 | "value": "/$transaction/" 1409 | } 1410 | ] 1411 | } 1412 | ], 1413 | "thresholds": [], 1414 | "timeFrom": null, 1415 | "timeShift": null, 1416 | "title": "Error detail", 1417 | "tooltip": { 1418 | "msResolution": false, 1419 | "shared": true, 1420 | "sort": 0, 1421 | "value_type": "cumulative" 1422 | }, 1423 | "transparent": false, 1424 | "type": "graph", 1425 | "xaxis": { 1426 | "buckets": null, 1427 | "mode": "time", 1428 | "name": null, 1429 | "show": true, 1430 | "values": [] 1431 | }, 1432 | "yaxes": [ 1433 | { 1434 | "format": "none", 1435 | "label": "", 1436 | "logBase": 1, 1437 | "max": null, 1438 | "min": null, 1439 | "show": true 1440 | }, 1441 | { 1442 | "format": "short", 1443 | "logBase": 1, 1444 | "max": null, 1445 | "min": null, 1446 | "show": true 1447 | } 1448 | ], 1449 | "yaxis": { 1450 | "align": false, 1451 | "alignLevel": null 1452 | } 1453 | } 1454 | ], 1455 | "refresh": "30s", 1456 | "schemaVersion": 16, 1457 | "style": "dark", 1458 | "tags": [], 1459 | "templating": { 1460 | "list": [ 1461 | { 1462 | "allValue": ".*", 1463 | "current": {}, 1464 | "datasource": "${DS_JMETERDB}", 1465 | "hide": 0, 1466 | "includeAll": false, 1467 | "label": null, 1468 | "multi": true, 1469 | "name": "app", 1470 | "options": [], 1471 | "query": "SHOW TAG VALUES FROM \"process\" WITH KEY = \"application\"", 1472 | "refresh": 2, 1473 | "regex": "", 1474 | "sort": 1, 1475 | "tagValuesQuery": "", 1476 | "tags": [], 1477 | "tagsQuery": "SHOW TAG VALUES FROM \"events\" WITH KEY = \"tags\"", 1478 | "type": "query", 1479 | "useTags": false 1480 | }, 1481 | { 1482 | "allFormat": "regex wildcard", 1483 | "auto": false, 1484 | "auto_count": 10, 1485 | "auto_min": "10s", 1486 | "current": { 1487 | "text": "1m", 1488 | "value": "1m" 1489 | }, 1490 | "datasource": "jmeterdb", 1491 | "hide": 0, 1492 | "includeAll": true, 1493 | "label": "", 1494 | "multi": false, 1495 | "multiFormat": "glob", 1496 | "name": "granularity", 1497 | "options": [ 1498 | { 1499 | "selected": true, 1500 | "text": "1m", 1501 | "value": "1m" 1502 | }, 1503 | { 1504 | "selected": false, 1505 | "text": "5m", 1506 | "value": "5m" 1507 | }, 1508 | { 1509 | "selected": false, 1510 | "text": "1h", 1511 | "value": "1h" 1512 | }, 1513 | { 1514 | "selected": false, 1515 | "text": "5s", 1516 | "value": "5s" 1517 | }, 1518 | { 1519 | "selected": false, 1520 | "text": "15s", 1521 | "value": "15s" 1522 | }, 1523 | { 1524 | "selected": false, 1525 | "text": "30s", 1526 | "value": "30s" 1527 | } 1528 | ], 1529 | "query": "1m,5m,1h,5s,15s,30s", 1530 | "refresh": 2, 1531 | "regex": "", 1532 | "type": "interval" 1533 | }, 1534 | { 1535 | "allValue": null, 1536 | "current": {}, 1537 | "datasource": "${DS_JMETERDB}", 1538 | "hide": 0, 1539 | "includeAll": false, 1540 | "label": null, 1541 | "multi": false, 1542 | "name": "retention", 1543 | "options": [], 1544 | "query": "SHOW RETENTION POLICIES ON \"jmeterdb\"", 1545 | "refresh": 1, 1546 | "regex": "", 1547 | "sort": 0, 1548 | "tagValuesQuery": null, 1549 | "tags": [], 1550 | "tagsQuery": null, 1551 | "type": "query", 1552 | "useTags": false 1553 | }, 1554 | { 1555 | "allValue": ".*", 1556 | "current": {}, 1557 | "datasource": "${DS_JMETERDB}", 1558 | "hide": 0, 1559 | "includeAll": true, 1560 | "label": null, 1561 | "multi": true, 1562 | "name": "transaction", 1563 | "options": [], 1564 | "query": "SHOW TAG VALUES FROM \"jmeter\" WITH KEY IN (\"transaction\",\"application\") where application =~ /$app/ and transaction !~ /all/", 1565 | "refresh": 2, 1566 | "regex": "", 1567 | "sort": 0, 1568 | "tagValuesQuery": null, 1569 | "tags": [], 1570 | "tagsQuery": null, 1571 | "type": "query", 1572 | "useTags": false 1573 | } 1574 | ] 1575 | }, 1576 | "time": { 1577 | "from": "now-30m", 1578 | "to": "now" 1579 | }, 1580 | "timepicker": { 1581 | "now": true, 1582 | "refresh_intervals": [ 1583 | "10s", 1584 | "30s", 1585 | "1m", 1586 | "5m", 1587 | "15m", 1588 | "30m", 1589 | "1h", 1590 | "2h", 1591 | "1d" 1592 | ], 1593 | "time_options": [ 1594 | "5m", 1595 | "15m", 1596 | "1h", 1597 | "6h", 1598 | "12h", 1599 | "24h", 1600 | "2d", 1601 | "7d", 1602 | "30d" 1603 | ] 1604 | }, 1605 | "timezone": "browser", 1606 | "title": "JMeter Metric Template", 1607 | "uid": "ltaas", 1608 | "version": 1 1609 | } -------------------------------------------------------------------------------- /openshift/GrafanaJMeterTemplate.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": 97, 3 | "uid": "ltaas", 4 | "title": "JMeter Metric Template", 5 | "tags": [], 6 | "style": "light", 7 | "timezone": "browser", 8 | "editable": true, 9 | "sharedCrosshair": true, 10 | "hideControls": false, 11 | "time": { 12 | "from": "2017-06-08T01:09:30.935Z", 13 | "to": "2017-06-08T02:55:58.972Z" 14 | }, 15 | "timepicker": { 16 | "now": true, 17 | "refresh_intervals": [ 18 | "10s", 19 | "30s", 20 | "1m", 21 | "5m", 22 | "15m", 23 | "30m", 24 | "1h", 25 | "2h", 26 | "1d" 27 | ], 28 | "time_options": [ 29 | "5m", 30 | "15m", 31 | "1h", 32 | "6h", 33 | "12h", 34 | "24h", 35 | "2d", 36 | "7d", 37 | "30d" 38 | ] 39 | }, 40 | "templating": { 41 | "list": [ 42 | { 43 | "allValue": ".*", 44 | "datasource": "jmeterdb", 45 | "hide": 0, 46 | "includeAll": false, 47 | "label": null, 48 | "multi": true, 49 | "name": "app", 50 | "options": [], 51 | "query": "SHOW TAG VALUES FROM \"process\" WITH KEY = \"application\"", 52 | "refresh": 2, 53 | "regex": "", 54 | "sort": 1, 55 | "tagValuesQuery": "", 56 | "tagsQuery": "SHOW TAG VALUES FROM \"events\" WITH KEY = \"tags\"", 57 | "type": "query" 58 | }, 59 | { 60 | "allFormat": "regex wildcard", 61 | "auto": false, 62 | "auto_count": 10, 63 | "auto_min": "10s", 64 | "current": { 65 | "text": "1m", 66 | "value": "1m" 67 | }, 68 | "datasource": "jmeterdb", 69 | "hide": 0, 70 | "includeAll": true, 71 | "label": "", 72 | "multi": false, 73 | "multiFormat": "glob", 74 | "name": "granularity", 75 | "options": [ 76 | { 77 | "text": "1m", 78 | "value": "1m", 79 | "selected": true 80 | }, 81 | { 82 | "text": "5m", 83 | "value": "5m", 84 | "selected": false 85 | }, 86 | { 87 | "text": "1h", 88 | "value": "1h", 89 | "selected": false 90 | }, 91 | { 92 | "text": "5s", 93 | "value": "5s", 94 | "selected": false 95 | }, 96 | { 97 | "text": "15s", 98 | "value": "15s", 99 | "selected": false 100 | }, 101 | { 102 | "text": "30s", 103 | "value": "30s", 104 | "selected": false 105 | } 106 | ], 107 | "query": "1m,5m,1h,5s,15s,30s", 108 | "refresh": 2, 109 | "regex": "", 110 | "type": "interval" 111 | }, 112 | { 113 | "allValue": null, 114 | "current": { 115 | "text": "default", 116 | "value": "default", 117 | "tags": [] 118 | }, 119 | "datasource": "jmeterdb", 120 | "hide": 0, 121 | "includeAll": false, 122 | "label": null, 123 | "multi": false, 124 | "name": "retention", 125 | "options": [], 126 | "query": "SHOW RETENTION POLICIES ON \"jmeterdb\"", 127 | "refresh": 1, 128 | "regex": "", 129 | "sort": 0, 130 | "tagValuesQuery": null, 131 | "tagsQuery": null, 132 | "type": "query" 133 | }, 134 | { 135 | "allValue": ".*", 136 | "current": { 137 | "value": [ 138 | "$__all" 139 | ], 140 | "text": "All" 141 | }, 142 | "datasource": "jmeterdb", 143 | "hide": 0, 144 | "includeAll": true, 145 | "label": null, 146 | "multi": true, 147 | "name": "transaction", 148 | "options": [], 149 | "query": "SHOW TAG VALUES FROM \"jmeter\" WITH KEY IN (\"transaction\",\"application\") where application =~ /$app/ and transaction !~ /all/", 150 | "refresh": 2, 151 | "regex": "", 152 | "sort": 0, 153 | "tagValuesQuery": null, 154 | "tagsQuery": null, 155 | "type": "query" 156 | } 157 | ] 158 | }, 159 | "annotations": { 160 | "list": [ 161 | { 162 | "datasource": "jmeterdb", 163 | "enable": true, 164 | "iconColor": "rgb(237, 18, 18)", 165 | "iconSize": 17, 166 | "lineColor": "rgb(0, 21, 255)", 167 | "name": "Annotation", 168 | "query": "select text,tags,title from \"$retention\".\"events\" where application =~ /$app/ AND $timeFilter", 169 | "showLine": true, 170 | "textColumn": "text", 171 | "titleColumn": "title", 172 | "tagsColumn": "tags" 173 | } 174 | ] 175 | }, 176 | "refresh": false, 177 | "schemaVersion": 13, 178 | "version": 0, 179 | "links": [ 180 | { 181 | "asDropdown": true, 182 | "icon": "dashboard", 183 | "includeVars": true, 184 | "keepTime": true, 185 | "tags": [], 186 | "targetBlank": true, 187 | "tooltip": "", 188 | "type": "dashboards", 189 | "url": "" 190 | } 191 | ], 192 | "gnetId": null, 193 | "rows": [ 194 | { 195 | "title": "Jmeter Metrics", 196 | "panels": [ 197 | { 198 | "cacheTimeout": null, 199 | "colorBackground": false, 200 | "colorValue": false, 201 | "colors": [ 202 | "rgba(245, 54, 54, 0.9)", 203 | "rgba(237, 129, 40, 0.89)", 204 | "rgba(50, 172, 45, 0.97)" 205 | ], 206 | "datasource": "jmeterdb", 207 | "editable": true, 208 | "error": false, 209 | "format": "none", 210 | "gauge": { 211 | "maxValue": 100, 212 | "minValue": 0, 213 | "show": false, 214 | "thresholdLabels": false, 215 | "thresholdMarkers": true 216 | }, 217 | "id": 19, 218 | "interval": "$granularity", 219 | "links": [], 220 | "mappingType": 1, 221 | "mappingTypes": [ 222 | { 223 | "name": "value to text", 224 | "value": 1 225 | }, 226 | { 227 | "name": "range to text", 228 | "value": 2 229 | } 230 | ], 231 | "maxDataPoints": 100, 232 | "nullPointMode": "connected", 233 | "nullText": null, 234 | "postfix": " users", 235 | "postfixFontSize": "50%", 236 | "prefix": "", 237 | "prefixFontSize": "50%", 238 | "rangeMaps": [ 239 | { 240 | "from": "null", 241 | "text": "N/A", 242 | "to": "null" 243 | } 244 | ], 245 | "span": 4, 246 | "sparkline": { 247 | "fillColor": "rgba(31, 118, 189, 0.18)", 248 | "full": true, 249 | "lineColor": "rgb(31, 120, 193)", 250 | "show": true 251 | }, 252 | "targets": [ 253 | { 254 | "dsType": "influxdb", 255 | "groupBy": [ 256 | { 257 | "params": [ 258 | "$granularity" 259 | ], 260 | "type": "time" 261 | }, 262 | { 263 | "params": [ 264 | "null" 265 | ], 266 | "type": "fill" 267 | } 268 | ], 269 | "measurement": "jmeter", 270 | "policy": "$retention", 271 | "query": "SELECT last(\"startedT\") FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity) fill(null)", 272 | "refId": "A", 273 | "resultFormat": "time_series", 274 | "select": [ 275 | [ 276 | { 277 | "params": [ 278 | "meanAT" 279 | ], 280 | "type": "field" 281 | }, 282 | { 283 | "params": [], 284 | "type": "last" 285 | } 286 | ] 287 | ], 288 | "tags": [ 289 | { 290 | "key": "application", 291 | "operator": "=~", 292 | "value": "/$app$/" 293 | } 294 | ] 295 | } 296 | ], 297 | "thresholds": "", 298 | "title": "Active Users", 299 | "type": "singlestat", 300 | "valueFontSize": "80%", 301 | "valueMaps": [ 302 | { 303 | "op": "=", 304 | "text": "0", 305 | "value": "null" 306 | } 307 | ], 308 | "valueName": "current" 309 | }, 310 | { 311 | "cacheTimeout": null, 312 | "colorBackground": false, 313 | "colorValue": false, 314 | "colors": [ 315 | "rgba(245, 54, 54, 0.9)", 316 | "rgba(237, 129, 40, 0.89)", 317 | "rgba(50, 172, 45, 0.97)" 318 | ], 319 | "datasource": "jmeterdb", 320 | "editable": true, 321 | "error": false, 322 | "format": "none", 323 | "gauge": { 324 | "maxValue": 100, 325 | "minValue": 0, 326 | "show": false, 327 | "thresholdLabels": false, 328 | "thresholdMarkers": true 329 | }, 330 | "id": 17, 331 | "interval": "", 332 | "links": [], 333 | "mappingType": 1, 334 | "mappingTypes": [ 335 | { 336 | "name": "value to text", 337 | "value": 1 338 | }, 339 | { 340 | "name": "range to text", 341 | "value": 2 342 | } 343 | ], 344 | "maxDataPoints": 100, 345 | "nullPointMode": "connected", 346 | "nullText": null, 347 | "postfix": " TPS", 348 | "postfixFontSize": "50%", 349 | "prefix": "", 350 | "prefixFontSize": "50%", 351 | "rangeMaps": [ 352 | { 353 | "from": "null", 354 | "text": "N/A", 355 | "to": "null" 356 | } 357 | ], 358 | "span": 4, 359 | "sparkline": { 360 | "fillColor": "rgba(31, 118, 189, 0.18)", 361 | "full": true, 362 | "lineColor": "rgb(31, 120, 193)", 363 | "show": true 364 | }, 365 | "targets": [ 366 | { 367 | "dsType": "influxdb", 368 | "groupBy": [ 369 | { 370 | "params": [ 371 | "$granularity" 372 | ], 373 | "type": "time" 374 | } 375 | ], 376 | "measurement": "jmeter", 377 | "policy": "default", 378 | "query": "SELECT sum(\"hit\") / 30 FROM \"$retention\".\"jmeter\" WHERE \"application\" = '$app' AND \"transaction\" = 'all' AND $timeFilter GROUP BY time(30s)", 379 | "rawQuery": true, 380 | "refId": "A", 381 | "resultFormat": "time_series", 382 | "select": [ 383 | [ 384 | { 385 | "params": [ 386 | "hit" 387 | ], 388 | "type": "field" 389 | }, 390 | { 391 | "params": [], 392 | "type": "last" 393 | }, 394 | { 395 | "params": [ 396 | " / 5" 397 | ], 398 | "type": "math" 399 | } 400 | ] 401 | ], 402 | "tags": [ 403 | { 404 | "key": "application", 405 | "operator": "=~", 406 | "value": "/$app$/" 407 | }, 408 | { 409 | "condition": "AND", 410 | "key": "transaction", 411 | "operator": "=", 412 | "value": "all" 413 | } 414 | ] 415 | } 416 | ], 417 | "thresholds": "", 418 | "title": "Currents hits per Second", 419 | "type": "singlestat", 420 | "valueFontSize": "80%", 421 | "valueMaps": [ 422 | { 423 | "op": "=", 424 | "text": "0", 425 | "value": "null" 426 | } 427 | ], 428 | "valueName": "current" 429 | }, 430 | { 431 | "cacheTimeout": null, 432 | "colorBackground": false, 433 | "colorValue": true, 434 | "colors": [ 435 | "rgba(50, 172, 45, 0.97)", 436 | "rgba(237, 129, 40, 0.89)", 437 | "rgba(245, 54, 54, 0.9)" 438 | ], 439 | "datasource": "jmeterdb", 440 | "editable": true, 441 | "error": false, 442 | "format": "percentunit", 443 | "gauge": { 444 | "maxValue": 100, 445 | "minValue": 0, 446 | "show": false, 447 | "thresholdLabels": false, 448 | "thresholdMarkers": true 449 | }, 450 | "id": 21, 451 | "interval": "$granularity", 452 | "links": [], 453 | "mappingType": 1, 454 | "mappingTypes": [ 455 | { 456 | "name": "value to text", 457 | "value": 1 458 | }, 459 | { 460 | "name": "range to text", 461 | "value": 2 462 | } 463 | ], 464 | "maxDataPoints": 100, 465 | "nullPointMode": "connected", 466 | "nullText": null, 467 | "postfix": "", 468 | "postfixFontSize": "50%", 469 | "prefix": "", 470 | "prefixFontSize": "50%", 471 | "rangeMaps": [ 472 | { 473 | "from": "null", 474 | "text": "N/A", 475 | "to": "null" 476 | } 477 | ], 478 | "span": 4, 479 | "sparkline": { 480 | "fillColor": "rgba(31, 118, 189, 0.18)", 481 | "full": true, 482 | "lineColor": "rgb(31, 120, 193)", 483 | "show": true 484 | }, 485 | "targets": [ 486 | { 487 | "dsType": "influxdb", 488 | "groupBy": [], 489 | "measurement": "jmeter", 490 | "policy": "$retention", 491 | "query": "SELECT sum(\"countError\") / sum(\"count\") FROM \"$retention\".\"jmeter\" WHERE \"application\" =~ /$app$/ AND \"transaction\" = 'all' AND $timeFilter", 492 | "rawQuery": true, 493 | "refId": "B", 494 | "resultFormat": "time_series", 495 | "select": [ 496 | [ 497 | { 498 | "params": [ 499 | "countError" 500 | ], 501 | "type": "field" 502 | }, 503 | { 504 | "params": [], 505 | "type": "sum" 506 | }, 507 | { 508 | "params": [ 509 | " / sum(\"count\")" 510 | ], 511 | "type": "math" 512 | } 513 | ] 514 | ], 515 | "tags": [ 516 | { 517 | "key": "application", 518 | "operator": "=~", 519 | "value": "/$app$/" 520 | }, 521 | { 522 | "condition": "AND", 523 | "key": "transaction", 524 | "operator": "=", 525 | "value": "all" 526 | } 527 | ] 528 | } 529 | ], 530 | "thresholds": "0.1,0.2", 531 | "title": "% Errors", 532 | "type": "singlestat", 533 | "valueFontSize": "80%", 534 | "valueMaps": [ 535 | { 536 | "op": "=", 537 | "text": "0", 538 | "value": "null" 539 | } 540 | ], 541 | "valueName": "total" 542 | }, 543 | { 544 | "aliasColors": {}, 545 | "bars": false, 546 | "datasource": "jmeterdb", 547 | "editable": true, 548 | "error": false, 549 | "fill": 1, 550 | "grid": {}, 551 | "id": 27, 552 | "interval": "$granularity", 553 | "legend": { 554 | "avg": false, 555 | "current": false, 556 | "max": false, 557 | "min": false, 558 | "show": false, 559 | "total": false, 560 | "values": false 561 | }, 562 | "lines": true, 563 | "linewidth": 1, 564 | "links": [], 565 | "nullPointMode": "null as zero", 566 | "percentage": false, 567 | "pointradius": 5, 568 | "points": false, 569 | "renderer": "flot", 570 | "seriesOverrides": [], 571 | "span": 4, 572 | "stack": false, 573 | "steppedLine": true, 574 | "targets": [ 575 | { 576 | "alias": "Hits", 577 | "dsType": "influxdb", 578 | "groupBy": [ 579 | { 580 | "params": [ 581 | "$granularity" 582 | ], 583 | "type": "time" 584 | }, 585 | { 586 | "params": [ 587 | "null" 588 | ], 589 | "type": "fill" 590 | } 591 | ], 592 | "measurement": "jmeter", 593 | "policy": "$retention", 594 | "query": "SELECT last(\"hit\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity) fill(null)", 595 | "refId": "A", 596 | "resultFormat": "time_series", 597 | "select": [ 598 | [ 599 | { 600 | "params": [ 601 | "hit" 602 | ], 603 | "type": "field" 604 | }, 605 | { 606 | "params": [], 607 | "type": "last" 608 | }, 609 | { 610 | "params": [ 611 | " / 5" 612 | ], 613 | "type": "math" 614 | } 615 | ] 616 | ], 617 | "tags": [ 618 | { 619 | "key": "application", 620 | "operator": "=~", 621 | "value": "/$app$/" 622 | } 623 | ] 624 | } 625 | ], 626 | "thresholds": [], 627 | "timeFrom": null, 628 | "timeShift": null, 629 | "title": "Hits per Second", 630 | "tooltip": { 631 | "msResolution": false, 632 | "shared": true, 633 | "sort": 0, 634 | "value_type": "cumulative" 635 | }, 636 | "type": "graph", 637 | "xaxis": { 638 | "mode": "time", 639 | "name": null, 640 | "show": false, 641 | "values": [] 642 | }, 643 | "yaxes": [ 644 | { 645 | "format": "short", 646 | "logBase": 1, 647 | "max": null, 648 | "min": 0, 649 | "show": true 650 | }, 651 | { 652 | "format": "short", 653 | "logBase": 1, 654 | "max": null, 655 | "min": null, 656 | "show": true 657 | } 658 | ] 659 | }, 660 | { 661 | "cacheTimeout": null, 662 | "colorBackground": false, 663 | "colorValue": false, 664 | "colors": [ 665 | "rgba(245, 54, 54, 0.9)", 666 | "rgba(237, 129, 40, 0.89)", 667 | "rgba(50, 172, 45, 0.97)" 668 | ], 669 | "datasource": "jmeterdb", 670 | "editable": true, 671 | "error": false, 672 | "format": "none", 673 | "gauge": { 674 | "maxValue": 100, 675 | "minValue": 0, 676 | "show": false, 677 | "thresholdLabels": false, 678 | "thresholdMarkers": true 679 | }, 680 | "id": 22, 681 | "interval": "$granularity", 682 | "links": [], 683 | "mappingType": 1, 684 | "mappingTypes": [ 685 | { 686 | "name": "value to text", 687 | "value": 1 688 | }, 689 | { 690 | "name": "range to text", 691 | "value": 2 692 | } 693 | ], 694 | "maxDataPoints": 100, 695 | "nullPointMode": "connected", 696 | "nullText": null, 697 | "postfix": "", 698 | "postfixFontSize": "50%", 699 | "prefix": "", 700 | "prefixFontSize": "50%", 701 | "rangeMaps": [ 702 | { 703 | "from": "null", 704 | "text": "N/A", 705 | "to": "null" 706 | } 707 | ], 708 | "span": 4, 709 | "sparkline": { 710 | "fillColor": "rgba(31, 118, 189, 0.18)", 711 | "full": true, 712 | "lineColor": "rgb(31, 120, 193)", 713 | "show": true 714 | }, 715 | "targets": [ 716 | { 717 | "dsType": "influxdb", 718 | "groupBy": [], 719 | "measurement": "jmeter", 720 | "policy": "$retention", 721 | "query": "SELECT \"hit\" FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND \"statut\" = 'all' AND $timeFilter", 722 | "rawQuery": false, 723 | "refId": "A", 724 | "resultFormat": "time_series", 725 | "select": [ 726 | [ 727 | { 728 | "params": [ 729 | "hit" 730 | ], 731 | "type": "field" 732 | } 733 | ] 734 | ], 735 | "tags": [ 736 | { 737 | "key": "application", 738 | "operator": "=~", 739 | "value": "/$app$/" 740 | }, 741 | { 742 | "condition": "AND", 743 | "key": "statut", 744 | "operator": "=", 745 | "value": "all" 746 | } 747 | ] 748 | } 749 | ], 750 | "thresholds": "", 751 | "title": "Total Hits", 752 | "type": "singlestat", 753 | "valueFontSize": "80%", 754 | "valueMaps": [ 755 | { 756 | "op": "=", 757 | "text": "0", 758 | "value": "null" 759 | } 760 | ], 761 | "valueName": "total" 762 | }, 763 | { 764 | "aliasColors": {}, 765 | "bars": false, 766 | "datasource": "jmeterdb", 767 | "editable": true, 768 | "error": false, 769 | "fill": 1, 770 | "grid": {}, 771 | "id": 28, 772 | "interval": "$granularity", 773 | "legend": { 774 | "avg": false, 775 | "current": false, 776 | "max": false, 777 | "min": false, 778 | "show": false, 779 | "total": false, 780 | "values": false 781 | }, 782 | "lines": true, 783 | "linewidth": 1, 784 | "links": [], 785 | "nullPointMode": "null", 786 | "percentage": false, 787 | "pointradius": 5, 788 | "points": false, 789 | "renderer": "flot", 790 | "seriesOverrides": [], 791 | "span": 4, 792 | "stack": false, 793 | "steppedLine": true, 794 | "targets": [ 795 | { 796 | "alias": "Errors", 797 | "dsType": "influxdb", 798 | "groupBy": [ 799 | { 800 | "params": [ 801 | "$granularity" 802 | ], 803 | "type": "time" 804 | }, 805 | { 806 | "params": [ 807 | "0" 808 | ], 809 | "type": "fill" 810 | } 811 | ], 812 | "measurement": "jmeter", 813 | "policy": "$retention", 814 | "query": "SELECT mean(\"countError\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity) fill(0)", 815 | "rawQuery": false, 816 | "refId": "A", 817 | "resultFormat": "time_series", 818 | "select": [ 819 | [ 820 | { 821 | "params": [ 822 | "countError" 823 | ], 824 | "type": "field" 825 | }, 826 | { 827 | "params": [], 828 | "type": "mean" 829 | }, 830 | { 831 | "params": [ 832 | " / 5" 833 | ], 834 | "type": "math" 835 | } 836 | ] 837 | ], 838 | "tags": [ 839 | { 840 | "key": "application", 841 | "operator": "=~", 842 | "value": "/$app$/" 843 | } 844 | ] 845 | } 846 | ], 847 | "thresholds": [], 848 | "timeFrom": null, 849 | "timeShift": null, 850 | "title": "Errors per Second", 851 | "tooltip": { 852 | "msResolution": false, 853 | "shared": true, 854 | "sort": 0, 855 | "value_type": "cumulative" 856 | }, 857 | "type": "graph", 858 | "xaxis": { 859 | "mode": "time", 860 | "name": null, 861 | "show": false, 862 | "values": [] 863 | }, 864 | "yaxes": [ 865 | { 866 | "format": "short", 867 | "logBase": 1, 868 | "max": null, 869 | "min": 0, 870 | "show": true 871 | }, 872 | { 873 | "format": "short", 874 | "logBase": 1, 875 | "max": null, 876 | "min": null, 877 | "show": true 878 | } 879 | ] 880 | } 881 | ], 882 | "showTitle": true, 883 | "titleSize": "h6", 884 | "height": "150px", 885 | "repeat": null, 886 | "repeatRowId": null, 887 | "repeatIteration": null, 888 | "collapse": false 889 | }, 890 | { 891 | "title": "Application Metrics", 892 | "panels": [ 893 | { 894 | "aliasColors": {}, 895 | "bars": false, 896 | "datasource": "jmeterdb", 897 | "editable": true, 898 | "error": false, 899 | "fill": 1, 900 | "grid": {}, 901 | "height": "", 902 | "id": 25, 903 | "interval": "$granularity", 904 | "legend": { 905 | "alignAsTable": true, 906 | "avg": true, 907 | "current": true, 908 | "hideEmpty": false, 909 | "max": true, 910 | "min": true, 911 | "rightSide": false, 912 | "show": true, 913 | "total": false, 914 | "values": true 915 | }, 916 | "lines": true, 917 | "linewidth": 1, 918 | "links": [], 919 | "minSpan": 12, 920 | "nullPointMode": "null", 921 | "percentage": false, 922 | "pointradius": 5, 923 | "points": false, 924 | "renderer": "flot", 925 | "seriesOverrides": [], 926 | "span": 12, 927 | "stack": false, 928 | "steppedLine": true, 929 | "targets": [ 930 | { 931 | "alias": "$tag_transaction", 932 | "dsType": "influxdb", 933 | "groupBy": [ 934 | { 935 | "params": [ 936 | "$granularity" 937 | ], 938 | "type": "time" 939 | }, 940 | { 941 | "params": [ 942 | "transaction" 943 | ], 944 | "type": "tag" 945 | } 946 | ], 947 | "hide": false, 948 | "measurement": "jmeter", 949 | "policy": "$retention", 950 | "query": "SELECT mean(\"avg\") FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND $timeFilter GROUP BY time($granularity), \"transaction\"", 951 | "rawQuery": false, 952 | "refId": "A", 953 | "resultFormat": "time_series", 954 | "select": [ 955 | [ 956 | { 957 | "params": [ 958 | "avg" 959 | ], 960 | "type": "field" 961 | }, 962 | { 963 | "params": [], 964 | "type": "mean" 965 | } 966 | ] 967 | ], 968 | "tags": [ 969 | { 970 | "key": "application", 971 | "operator": "=~", 972 | "value": "/$app$/" 973 | }, 974 | { 975 | "condition": "AND", 976 | "key": "statut", 977 | "operator": "=", 978 | "value": "all" 979 | } 980 | ] 981 | } 982 | ], 983 | "thresholds": [], 984 | "timeFrom": null, 985 | "timeShift": null, 986 | "title": "Average Response Time", 987 | "tooltip": { 988 | "msResolution": false, 989 | "shared": false, 990 | "sort": 0, 991 | "value_type": "cumulative" 992 | }, 993 | "transparent": false, 994 | "type": "graph", 995 | "xaxis": { 996 | "mode": "time", 997 | "name": null, 998 | "show": true, 999 | "values": [] 1000 | }, 1001 | "yaxes": [ 1002 | { 1003 | "format": "ms", 1004 | "logBase": 1, 1005 | "max": null, 1006 | "min": null, 1007 | "show": true 1008 | }, 1009 | { 1010 | "format": "short", 1011 | "logBase": 1, 1012 | "max": null, 1013 | "min": null, 1014 | "show": true 1015 | } 1016 | ] 1017 | }, 1018 | { 1019 | "aliasColors": {}, 1020 | "bars": false, 1021 | "datasource": "jmeterdb", 1022 | "editable": true, 1023 | "error": false, 1024 | "fill": 1, 1025 | "grid": {}, 1026 | "height": "", 1027 | "id": 26, 1028 | "interval": "$granularity", 1029 | "legend": { 1030 | "alignAsTable": true, 1031 | "avg": true, 1032 | "current": true, 1033 | "hideEmpty": false, 1034 | "max": true, 1035 | "min": true, 1036 | "rightSide": false, 1037 | "show": true, 1038 | "sort": "current", 1039 | "sortDesc": true, 1040 | "total": false, 1041 | "values": true 1042 | }, 1043 | "lines": true, 1044 | "linewidth": 1, 1045 | "links": [], 1046 | "minSpan": 12, 1047 | "nullPointMode": "null", 1048 | "percentage": false, 1049 | "pointradius": 5, 1050 | "points": false, 1051 | "renderer": "flot", 1052 | "seriesOverrides": [], 1053 | "span": 12, 1054 | "stack": false, 1055 | "steppedLine": true, 1056 | "targets": [ 1057 | { 1058 | "alias": "$tag_transaction", 1059 | "dsType": "influxdb", 1060 | "groupBy": [ 1061 | { 1062 | "params": [ 1063 | "30s" 1064 | ], 1065 | "type": "time" 1066 | }, 1067 | { 1068 | "params": [ 1069 | "transaction" 1070 | ], 1071 | "type": "tag" 1072 | } 1073 | ], 1074 | "measurement": "jmeter", 1075 | "policy": "$retention", 1076 | "query": "SELECT mean(\"count\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND \"transaction\" <> 'all' AND $timeFilter GROUP BY time($granularity), \"transaction\"", 1077 | "rawQuery": false, 1078 | "refId": "A", 1079 | "resultFormat": "time_series", 1080 | "select": [ 1081 | [ 1082 | { 1083 | "params": [ 1084 | "count" 1085 | ], 1086 | "type": "field" 1087 | }, 1088 | { 1089 | "params": [], 1090 | "type": "sum" 1091 | }, 1092 | { 1093 | "params": [ 1094 | " / 30" 1095 | ], 1096 | "type": "math" 1097 | } 1098 | ] 1099 | ], 1100 | "tags": [ 1101 | { 1102 | "key": "application", 1103 | "operator": "=~", 1104 | "value": "/$app$/" 1105 | }, 1106 | { 1107 | "condition": "AND", 1108 | "key": "transaction", 1109 | "operator": "<>", 1110 | "value": "all" 1111 | }, 1112 | { 1113 | "condition": "AND", 1114 | "key": "statut", 1115 | "operator": "=", 1116 | "value": "all" 1117 | } 1118 | ] 1119 | } 1120 | ], 1121 | "thresholds": [], 1122 | "timeFrom": null, 1123 | "timeShift": null, 1124 | "title": "Transaction Per Second", 1125 | "tooltip": { 1126 | "msResolution": false, 1127 | "shared": false, 1128 | "sort": 0, 1129 | "value_type": "cumulative" 1130 | }, 1131 | "transparent": false, 1132 | "type": "graph", 1133 | "xaxis": { 1134 | "mode": "time", 1135 | "name": null, 1136 | "show": true, 1137 | "values": [] 1138 | }, 1139 | "yaxes": [ 1140 | { 1141 | "format": "ops", 1142 | "label": "", 1143 | "logBase": 1, 1144 | "max": null, 1145 | "min": null, 1146 | "show": true 1147 | }, 1148 | { 1149 | "format": "short", 1150 | "logBase": 1, 1151 | "max": null, 1152 | "min": null, 1153 | "show": true 1154 | } 1155 | ] 1156 | }, 1157 | { 1158 | "aliasColors": {}, 1159 | "bars": false, 1160 | "datasource": "jmeterdb", 1161 | "editable": true, 1162 | "error": false, 1163 | "fill": 1, 1164 | "grid": {}, 1165 | "height": "", 1166 | "id": 29, 1167 | "interval": "$granularity", 1168 | "legend": { 1169 | "alignAsTable": true, 1170 | "avg": true, 1171 | "current": true, 1172 | "hideEmpty": false, 1173 | "max": true, 1174 | "min": true, 1175 | "rightSide": false, 1176 | "show": true, 1177 | "total": false, 1178 | "values": true 1179 | }, 1180 | "lines": true, 1181 | "linewidth": 1, 1182 | "links": [], 1183 | "minSpan": 12, 1184 | "nullPointMode": "null", 1185 | "percentage": false, 1186 | "pointradius": 5, 1187 | "points": false, 1188 | "renderer": "flot", 1189 | "seriesOverrides": [], 1190 | "span": 12, 1191 | "stack": false, 1192 | "steppedLine": true, 1193 | "targets": [ 1194 | { 1195 | "alias": "$tag_transaction", 1196 | "dsType": "influxdb", 1197 | "groupBy": [ 1198 | { 1199 | "params": [ 1200 | "30s" 1201 | ], 1202 | "type": "time" 1203 | }, 1204 | { 1205 | "params": [ 1206 | "transaction" 1207 | ], 1208 | "type": "tag" 1209 | }, 1210 | { 1211 | "params": [ 1212 | "null" 1213 | ], 1214 | "type": "fill" 1215 | } 1216 | ], 1217 | "measurement": "jmeter", 1218 | "policy": "$retention", 1219 | "query": "SELECT last(\"count\") / 30 FROM \"$retention\".\"jmeter\" WHERE \"application\" =~ /$app$/ AND \"statut\" = 'ko' AND $timeFilter GROUP BY time(30s), \"transaction\" fill(null)", 1220 | "rawQuery": false, 1221 | "refId": "B", 1222 | "resultFormat": "time_series", 1223 | "select": [ 1224 | [ 1225 | { 1226 | "params": [ 1227 | "count" 1228 | ], 1229 | "type": "field" 1230 | }, 1231 | { 1232 | "params": [], 1233 | "type": "sum" 1234 | }, 1235 | { 1236 | "params": [ 1237 | " / 30" 1238 | ], 1239 | "type": "math" 1240 | } 1241 | ] 1242 | ], 1243 | "tags": [ 1244 | { 1245 | "key": "application", 1246 | "operator": "=~", 1247 | "value": "/$app$/" 1248 | }, 1249 | { 1250 | "condition": "AND", 1251 | "key": "statut", 1252 | "operator": "=", 1253 | "value": "ko" 1254 | } 1255 | ] 1256 | } 1257 | ], 1258 | "thresholds": [], 1259 | "timeFrom": null, 1260 | "timeShift": null, 1261 | "title": "Error Per Second", 1262 | "tooltip": { 1263 | "msResolution": false, 1264 | "shared": false, 1265 | "sort": 0, 1266 | "value_type": "cumulative" 1267 | }, 1268 | "transparent": false, 1269 | "type": "graph", 1270 | "xaxis": { 1271 | "mode": "time", 1272 | "name": null, 1273 | "show": true, 1274 | "values": [] 1275 | }, 1276 | "yaxes": [ 1277 | { 1278 | "format": "ops", 1279 | "label": "", 1280 | "logBase": 1, 1281 | "max": null, 1282 | "min": null, 1283 | "show": true 1284 | }, 1285 | { 1286 | "format": "short", 1287 | "logBase": 1, 1288 | "max": null, 1289 | "min": null, 1290 | "show": true 1291 | } 1292 | ] 1293 | }, 1294 | { 1295 | "aliasColors": {}, 1296 | "bars": false, 1297 | "datasource": "jmeterdb", 1298 | "editable": true, 1299 | "error": false, 1300 | "fill": 1, 1301 | "grid": {}, 1302 | "height": "", 1303 | "id": 34, 1304 | "interval": "", 1305 | "legend": { 1306 | "alignAsTable": true, 1307 | "avg": true, 1308 | "current": true, 1309 | "hideEmpty": true, 1310 | "hideZero": true, 1311 | "max": true, 1312 | "min": true, 1313 | "rightSide": false, 1314 | "show": true, 1315 | "total": false, 1316 | "values": true 1317 | }, 1318 | "lines": true, 1319 | "linewidth": 1, 1320 | "links": [], 1321 | "minSpan": 12, 1322 | "nullPointMode": "null", 1323 | "percentage": false, 1324 | "pointradius": 1, 1325 | "points": false, 1326 | "renderer": "flot", 1327 | "seriesOverrides": [], 1328 | "span": 12, 1329 | "stack": false, 1330 | "steppedLine": true, 1331 | "targets": [ 1332 | { 1333 | "alias": "$tag_transaction - $tag_responseCode : $tag_responseMessage", 1334 | "dsType": "influxdb", 1335 | "groupBy": [ 1336 | { 1337 | "params": [ 1338 | "30s" 1339 | ], 1340 | "type": "time" 1341 | }, 1342 | { 1343 | "params": [ 1344 | "responseMessage" 1345 | ], 1346 | "type": "tag" 1347 | }, 1348 | { 1349 | "params": [ 1350 | "responseCode" 1351 | ], 1352 | "type": "tag" 1353 | }, 1354 | { 1355 | "params": [ 1356 | "transaction" 1357 | ], 1358 | "type": "tag" 1359 | }, 1360 | { 1361 | "params": [ 1362 | "null" 1363 | ], 1364 | "type": "fill" 1365 | } 1366 | ], 1367 | "measurement": "jmeter", 1368 | "policy": "$retention", 1369 | "query": "SELECT sum(\"count\") / 5 FROM \"jmeter\" WHERE \"application\" =~ /$app$/ AND \"statut\" = 'ko' AND $timeFilter GROUP BY time($granularity), \"responseCode\" fill(null)", 1370 | "rawQuery": false, 1371 | "refId": "B", 1372 | "resultFormat": "time_series", 1373 | "select": [ 1374 | [ 1375 | { 1376 | "params": [ 1377 | "count" 1378 | ], 1379 | "type": "field" 1380 | }, 1381 | { 1382 | "params": [], 1383 | "type": "sum" 1384 | }, 1385 | { 1386 | "params": [ 1387 | " / 30" 1388 | ], 1389 | "type": "math" 1390 | } 1391 | ] 1392 | ], 1393 | "tags": [ 1394 | { 1395 | "key": "application", 1396 | "operator": "=~", 1397 | "value": "/$app$/" 1398 | }, 1399 | { 1400 | "condition": "AND", 1401 | "key": "responseCode", 1402 | "operator": "!~", 1403 | "value": "/^0$|^$/" 1404 | }, 1405 | { 1406 | "condition": "AND", 1407 | "key": "transaction", 1408 | "operator": "=~", 1409 | "value": "/$transaction/" 1410 | } 1411 | ] 1412 | } 1413 | ], 1414 | "thresholds": [], 1415 | "timeFrom": null, 1416 | "timeShift": null, 1417 | "title": "Error detail", 1418 | "tooltip": { 1419 | "msResolution": false, 1420 | "shared": true, 1421 | "sort": 0, 1422 | "value_type": "cumulative" 1423 | }, 1424 | "transparent": false, 1425 | "type": "graph", 1426 | "xaxis": { 1427 | "mode": "time", 1428 | "name": null, 1429 | "show": true, 1430 | "values": [] 1431 | }, 1432 | "yaxes": [ 1433 | { 1434 | "format": "none", 1435 | "label": "", 1436 | "logBase": 1, 1437 | "max": null, 1438 | "min": null, 1439 | "show": true 1440 | }, 1441 | { 1442 | "format": "short", 1443 | "logBase": 1, 1444 | "max": null, 1445 | "min": null, 1446 | "show": true 1447 | } 1448 | ] 1449 | } 1450 | ], 1451 | "showTitle": true, 1452 | "titleSize": "h6", 1453 | "height": "700px", 1454 | "repeat": null, 1455 | "repeatRowId": null, 1456 | "repeatIteration": null, 1457 | "collapse": false 1458 | } 1459 | ] 1460 | } 1461 | --------------------------------------------------------------------------------