diff --git a/doc/PERFORMANCE.md b/doc/PERFORMANCE.md new file mode 100644 index 0000000..7e92d1a --- /dev/null +++ b/doc/PERFORMANCE.md @@ -0,0 +1,9 @@ +Performance +======== + +[k6](https://k6.io/docs/) is an Open source load testing tool and SaaS for engineering teams. + +Two example cases are available of k6 usage for load testing in FADI: + +* [load testing of the Kafka service](/examples/K6/Kafka/README.md) (manual k6 installation, in a pod or a VM) +* [load testing of the NiFi service](/examples/K6/NiFi/README.md) (using the [k6 Helm chart developed by CETIC](/helm/helmk6)) diff --git a/doc/README.md b/doc/README.md index e7230bb..53065c8 100644 --- a/doc/README.md +++ b/doc/README.md @@ -6,6 +6,7 @@ FADI Documentation * [Reverse proxy](REVERSEPROXY.md) - Traefik reverse proxy configuration * [Security](SECURITY.md) - SSL setup * [Testing](/tests/README.md) - tests for the FADI framework +* [Performance](PERFORMANCE.md) - performance tests * [TSimulus](TSIMULUS.md) - how to simulate sensors and generate realistic data with [TSimulus](https://github.com/cetic/TSimulus) * [Machine learning models management](SELDON.md) - how to package and score machine learning models using [Seldon Core](https://www.seldon.io/tech/products/core/) * [Sample self-hosted infrastructure](RANCHER_PROXMOX.md) - How to install FADI on a self hosted infrastructure using diff --git a/examples/K6/Kafka/README.md b/examples/K6/Kafka/README.md new file mode 100644 index 0000000..627703e --- /dev/null +++ b/examples/K6/Kafka/README.md @@ -0,0 +1,109 @@ +Load testing Kafka with k6 +======== + +This use case will show how to use k6 installed on Ubuntu for a load test on Kafka. k6 will be used to send a pre-defined number of events to a pre-defined topic. + +## Kafka deployment + +First, install and get the IP address of the Kafka service. + +For the installation, we will use the FADI Helm chart with the values.yaml file in this folder : + +```bash +helm repo add cetic https://cetic.github.io/helm-charts/ +helm repo update +helm install cetic/fadi -f values.yaml +``` + +To get the IP address of the Kafka service, type this command : + +``` +kubectl get service +``` + +## k6 deployment + +To deploy k6, we will use an Ubuntu container. Next, we will install GO and k6 there. To be able to do a load test on Kafka, k6 needs a plugin that we are going to add. + +### a. Deploy Ubuntu + +You can use the "deployment.yaml" file in this folder to deploy the Ubuntu pod : + +``` +kubectl apply -f deployment.yaml +``` + +Then, enter into the pod by typing this command : + +``` +kubectl exec -it /bin/bash +``` + +Once into the pod, we can install the tools. + +### b. Install GO + +You will find [here](https://go.dev/doc/install) that shows how to install GO on Ubuntu. + +### c. Install k6 and Kafka plugin + +To install k6 and the Kafka plugin, enter these commands : + +``` +go install go.k6.io/xk6/cmd/xk6@latest +xk6 build --with github.com/mostafa/xk6-kafka@latest +``` + +Now, you have k6 and Kafka plugins installed. + +## Load test + +Once all the requirements installed, we can run to a load test. + +First, copy the content of the ["script.js"](./script.js) file. Create a "*kafka-test.js" file in the directory where k6 is installed in the Ubuntu pod and paste the content. + +Replace the `bootstrapServers` IP address with the Kafka service IP address. + +This script will : + +* Create in Kafka a topic named 'xk6_kafka_json_topic' +* Send a number of copies that we will define of 2 events ('Load Testing SQL Databases with k6' and 'Benchmarking Redis with k6') +* Check if events are successfully sent +* Teardown the data in Kafka + +To start the load test, you can adapt this command : + +``` +./k6 run --vus 1 --duration 10s --iterations 10 script.js +``` +That will send 10 copies of each event in a period of 10s. + +You can now see the results of the load test directly on your CLI. + +## Some results + +### a. Per iteration +100 iterations + + +1000 iterations + + +10000 iterations + + +### b. Per time + +1 second + + +10 seconds + + +### c. Per virtual user (10000) + +50 VUs + + +100 VUs + diff --git a/examples/K6/Kafka/deployment.yaml b/examples/K6/Kafka/deployment.yaml new file mode 100644 index 0000000..bc05d07 --- /dev/null +++ b/examples/K6/Kafka/deployment.yaml @@ -0,0 +1,21 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: ubuntu + name: ubuntu +spec: + replicas: 1 + selector: + matchLabels: + app: ubuntu + strategy: {} + template: + metadata: + labels: + app: ubuntu + spec: + containers: + - image: ubuntu + name: ubuntu + command: ["/bin/sleep", "3650d"] \ No newline at end of file diff --git a/examples/K6/Kafka/images/100.PNG b/examples/K6/Kafka/images/100.PNG new file mode 100644 index 0000000..fc13449 Binary files /dev/null and b/examples/K6/Kafka/images/100.PNG differ diff --git a/examples/K6/Kafka/images/1000.PNG b/examples/K6/Kafka/images/1000.PNG new file mode 100644 index 0000000..0f10c1d Binary files /dev/null and b/examples/K6/Kafka/images/1000.PNG differ diff --git a/examples/K6/Kafka/images/10000-100vus.PNG b/examples/K6/Kafka/images/10000-100vus.PNG new file mode 100644 index 0000000..9be6f18 Binary files /dev/null and b/examples/K6/Kafka/images/10000-100vus.PNG differ diff --git a/examples/K6/Kafka/images/10000-10s.PNG b/examples/K6/Kafka/images/10000-10s.PNG new file mode 100644 index 0000000..9215668 Binary files /dev/null and b/examples/K6/Kafka/images/10000-10s.PNG differ diff --git a/examples/K6/Kafka/images/10000-50vus.PNG b/examples/K6/Kafka/images/10000-50vus.PNG new file mode 100644 index 0000000..0981541 Binary files /dev/null and b/examples/K6/Kafka/images/10000-50vus.PNG differ diff --git a/examples/K6/Kafka/images/10000.PNG b/examples/K6/Kafka/images/10000.PNG new file mode 100644 index 0000000..cc3d835 Binary files /dev/null and b/examples/K6/Kafka/images/10000.PNG differ diff --git a/examples/K6/Kafka/images/10s.PNG b/examples/K6/Kafka/images/10s.PNG new file mode 100644 index 0000000..e112654 Binary files /dev/null and b/examples/K6/Kafka/images/10s.PNG differ diff --git a/examples/K6/Kafka/images/1s.PNG b/examples/K6/Kafka/images/1s.PNG new file mode 100644 index 0000000..57b5659 Binary files /dev/null and b/examples/K6/Kafka/images/1s.PNG differ diff --git a/examples/K6/Kafka/script.js b/examples/K6/Kafka/script.js new file mode 100644 index 0000000..553d544 --- /dev/null +++ b/examples/K6/Kafka/script.js @@ -0,0 +1,49 @@ +import { check } from 'k6'; +import { writer, produce, reader, consume, createTopic } from 'k6/x/kafka'; + +const bootstrapServers = ['10.111.124.142:9092']; +const kafkaTopic = 'xk6_kafka_json_topic'; + +const producer = writer(bootstrapServers, kafkaTopic); +const consumer = reader(bootstrapServers, kafkaTopic); + +createTopic(bootstrapServers[0], kafkaTopic); + +function getRandomInt(max = 1000) { + return Math.floor(Math.random() * max + 1); +} + +export default function () { + const messages = [ + { + key: JSON.stringify({ + correlationId: 'test-id-sql-' + getRandomInt(), + }), + value: JSON.stringify({ + title: 'Load Testing SQL Databases with k6', + url: 'https://k6.io/blog/load-testing-sql-databases-with-k6/', + locale: 'en', + }), + }, + { + key: JSON.stringify({ + correlationId: 'test-id-redis-' + getRandomInt(), + }), + value: JSON.stringify({ + title: 'Benchmarking Redis with k6', + url: 'https://k6.io/blog/benchmarking-redis-with-k6/', + locale: 'en', + }), + }, + ]; + + const error = produce(producer, messages); + check(error, { + 'is sent': (err) => err == undefined, + }); +} + +export function teardown(data) { + producer.close(); + consumer.close(); +} \ No newline at end of file diff --git a/examples/K6/Kafka/values.yaml b/examples/K6/Kafka/values.yaml new file mode 100644 index 0000000..b80393a --- /dev/null +++ b/examples/K6/Kafka/values.yaml @@ -0,0 +1,647 @@ +--- +# Default values for FADI. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +spark: + enabled: false + Master: + Name: spark-master + WebUi: + Name: spark-webui + Worker: + Name: spark-worker + Zeppelin: + Name: spark-zeppelin + Replicas: 0 + +superset: + enabled: false + persistence: + enabled: true + service: + type: ClusterIP + configFile: |- + from flask_appbuilder.security.manager import AUTH_DB,AUTH_LDAP + #--------------------------------------------------------- + # Superset specific config + #--------------------------------------------------------- + ROW_LIMIT = 5000 + SUPERSET_WORKERS = 2 + SUPERSET_WEBSERVER_PORT = 8088 + #--------------------------------------------------------- + #--------------------------------------------------------- + # Flask App Builder configuration + #--------------------------------------------------------- + # Your App secret key + SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h' + # The SQLAlchemy connection string to your database backend + # This connection defines the path to the database that stores your + # superset metadata (slices, connections, tables, dashboards, ...). + # Note that the connection information to connect to the datasources + # you want to explore are managed directly in the web UI + SQLALCHEMY_DATABASE_URI = 'sqlite:////var/lib/superset/superset.db' + # Flask-WTF flag for CSRF + WTF_CSRF_ENABLED = True + # Add endpoints that need to be exempt from CSRF protection + WTF_CSRF_EXEMPT_LIST = [] + # Set this API key to enable Mapbox visualizations + MAPBOX_API_KEY = '' + DEBUG=True + LOG_FORMAT = '%(asctime)s:%(levelname)s:%(name)s:%(message)s' + LOG_LEVEL = 'DEBUG' + AUTH_TYPE = AUTH_LDAP + AUTH_LDAP_SERVER = "ldap://fadi-openldap:389" + AUTH_LDAP_USE_TLS = False + AUTH_USER_REGISTRATION = True + AUTH_LDAP_SEARCH = "dc=ldap,dc=cetic,dc=be" + AUTH_LDAP_BIND_USER = "cn=admin,dc=ldap,dc=cetic,dc=be" + AUTH_LDAP_BIND_PASSWORD = "Z2JHHezi4aAA" + AUTH_LDAP_UID_FIELD = "cn" + # ---- ingress ---- + traefikIngress: + enabled: true + tls: false + host: superset.example.cetic.be # change to your superset domainname + +postgresql: + enabled: false + persistence: + enabled: true + ldap: + enabled: true + pgldapconfig: |- + # Reference: https://github.com/larskanis/pg-ldap-sync/blob/master/config/sample-config.yaml + # Connection parameters to LDAP server + ldap_connection: + host: fadi-openldap + port: 389 + auth: + method: :simple + username: CN=admin,DC=ldap,DC=cetic,DC=be + password: Z2JHHezi4aAA + # Search parameters for LDAP users which should be synchronized + ldap_users: + base: CN=admin,DC=ldap,DC=cetic,DC=be + # LDAP filter (according to RFC 2254) + # defines to users in LDAP to be synchronized + filter: (!(cn=admin)) + # this attribute is used as PG role name + name_attribute: cn + # lowercase name for use as PG role name + lowercase_name: true + ldap_groups: + base: DC=ldap,DC=cetic,DC=be + filter: (|(cn=group1)(cn=group2)(cn=group3)) + # this attribute is used as PG role name + name_attribute: cn + # this attribute must reference to all member DN's of the given group + member_attribute: member + # Connection parameters to PostgreSQL server + # see also: http://rubydoc.info/gems/pg/PG/Connection#initialize-instance_method + pg_connection: + host: fadi-postgresql + dbname: postgres # the db name is usually "postgres" + user: admin # the user name is usually "postgres" + password: Z2JHHezi4aAA # kubectl get secret --namespace fadi -o jsonpath="{.data.postgresql-password}" | base64 --decode + pg_users: + # Filter for identifying LDAP generated users in the database. + # It's the WHERE-condition to "SELECT rolname, oid FROM pg_roles" + # filter: rolcanlogin AND NOT rolsuper + filter: oid IN (SELECT pam.member FROM pg_auth_members pam JOIN pg_roles pr ON pr.oid=pam.roleid WHERE pr.rolname='ldap_users') + # Options for CREATE RULE statements + create_options: LOGIN IN ROLE ldap_users + pg_groups: + # Filter for identifying LDAP generated groups in the database. + # It's the WHERE-condition to "SELECT rolname, oid FROM pg_roles" + # filter: NOT rolcanlogin AND NOT rolsuper + filter: oid IN (SELECT pam.member FROM pg_auth_members pam JOIN pg_roles pr ON pr.oid=pam.roleid WHERE pr.rolname='ldap_groups') + # Options for CREATE RULE statements + create_options: NOLOGIN IN ROLE ldap_groups + #grant_options: + cron: + schedule: "*/30 * * * *" + repo: ceticasbl/pg-ldap-sync + tag: latest + restartPolicy: Never + mountPath: /workspace + subPath: "" + postgresql: + username: admin + password: Z2JHHezi4aAA + database: postgres + pghba: |- + local all all ldap ldapserver=fadi-openldap ldapport=389 ldaptls=0 ldapbasedn="dc=ldap,dc=cetic,dc=be" ldapbinddn="cn=admin,dc=ldap,dc=cetic,dc=be" ldapbindpasswd=Z2JHHezi4aAA ldapsearchfilter=cn=$username + host all all 0.0.0.0/0 ldap ldapserver=fadi-openldap ldapport=389 ldaptls=0 ldapbasedn="dc=ldap,dc=cetic,dc=be" ldapbinddn="cn=admin,dc=ldap,dc=cetic,dc=be" ldapbindpasswd=Z2JHHezi4aAA ldapsearchfilter=cn=$username + initdbscripts: |- + #!/bin/sh + psql -c "create role ldap_users;" postgres admin + psql -c "create role ldap_groups;" postgres admin + psql -c "create database zabbix;" postgres admin + +minio: + enabled: false + persistence: + enabled: true + size: 50Gi + service: + type: ClusterIP + +grafana: + enabled: false + service: + type: ClusterIP + grafana.ini: + paths: + data: /var/lib/grafana/data + logs: /var/log/grafana + plugins: /var/lib/grafana/plugins + provisioning: /etc/grafana/provisioning + analytics: + check_for_updates: true + log: + mode: console + grafana_net: + url: https://grafana.net + ## LDAP Authentication can be enabled with the following values on grafana.ini + ## NOTE: Grafana will fail to start if the value for ldap.toml is invalid + # ----- auth ------- + auth.ldap: + enabled: true + allow_sign_up: true + config_file: /etc/grafana/ldap.toml + auth.azuread: + name: Azure AD + enabled: false + allow_sign_up: true + client_id: + client_secret: + scopes: openid email profile + auth_url: https://login.microsoftonline.com//oauth2/v2.0/authorize + token_url: https://login.microsoftonline.com//oauth2/v2.0/token + allowed_domains: + allowed_groups: + server: + root_url: https://grafana.example.cetic.be # change to your grafana domainname + # Enable persistence + persistence: + enabled: true + # Administrator credentials when not using an existing secret (see below) + adminUser: admin + + ## Grafana's LDAP configuration + ## Templated by the template in _helpers.tpl + ## NOTE: To enable the grafana.ini must be configured with auth.ldap.enabled + ## ref: http://docs.grafana.org/installation/configuration/#auth-ldap + ## ref: http://docs.grafana.org/installation/ldap/#configuration + ldap: + enabled: true + # `existingSecret` is a reference to an existing secret containing the ldap configuration + # for Grafana in a key `ldap-toml`. + existingSecret: "" + # `config` is the content of `ldap.toml` that will be stored in the created secret + config: |- + verbose_logging = true + [[servers]] + host = "fadi-openldap" + port = 389 + use_ssl = false + start_tls = false + ssl_skip_verify = false + bind_dn = "cn=admin,DC=ldap,DC=cetic,DC=be" + bind_password = 'password1' + search_filter = "(|(cn=%s)(&(cn=%s)(memberOf=cn=admin,DC=ldap,DC=cetic,DC=be)))" + search_base_dns = ["cn=admin,dc=ldap,dc=cetic,dc=be"] + group_search_base_dns = ["ou=Groups,dc=ldap,dc=cetic,dc=be"] + + [[servers.group_mappings]] + group_dn = "*" + org_role = "Admin" + ##grafana_admin = true + + #group_dn = "cn=amen,DC=ldap,DC=cetic,DC=be" + #org_role = "Viewer" + + [servers.attributes] + name = "givenName" + surname = "sn" + username = "cn" + member_of = "memberOf" + email = "email" + # ---- ingress ---- + traefikIngress: + enabled: true + tls: false + host: grafana.example.cetic.be # change to your grafana domainname + +jupyterhub: + enabled: false + proxy: + secretToken: 'af83775ec3bfaf0507ce596df51d491e7ed54450adc454038fa7405495465f19' + db: + type: sqlite-memory + service: + type: ClusterIP + rbac: + enabled: true + singleuser: + storage: + capacity: 5Gi + # Defines the default image + profileList: + - display_name: "Minimal environment" + description: "To avoid too much bells and whistles: Python." + default: true + - display_name: "Datascience environment" + description: "If you want the additional bells and whistles: Python, R, and Julia." + kubespawner_override: + image: jupyter/datascience-notebook:7d427e7a4dde + - display_name: "Spark environment" + description: "The Jupyter Stacks spark image" + kubespawner_override: + image: jupyter/all-spark-notebook:latest + - display_name: "tensorflow environment" + description: "TensorFlow Notebook" + kubespawner_override: + image: jupyter/tensorflow-notebook:latest + # ---- auth ---- + hub: + config: + # ---- Comment this blok to disable LDAP authentication ---- + JupyterHub: + authenticator_class: ldapauthenticator.LDAPAuthenticator + LDAPAuthenticator: + bind_dn_template: + - 'cn={username},dc=ldap,dc=cetic,dc=be' + - 'cn={username},cn=admin,dc=ldap,dc=cetic,dc=be' + escape_userdn: false + lookup_dn: false + server_address: fadi-openldap + user_attribute: cn + use_ssl: false + # ---- Uncomment this blok to enable AzureAD authentication ---- + # AzureAdOAuthenticator: + # client_id: + # client_secret: + # oauth_callback_url: https:///hub/oauth_callback + # tenant_id: + # JupyterHub: + # authenticator_class: azuread + # ---- auth ---- + prePuller: + hook: + enabled: false + # ---- ingress ---- + traefikIngress: + enabled: true + tls: false + host: jupyterhub.example.cetic.be # change to your jupyterhub domainname + +nifi: + enabled: false + service: + type: ClusterIP + nodePort: "" + postStart: /opt/nifi/psql; wget -P /opt/nifi/psql https://jdbc.postgresql.org/download/postgresql-42.2.6.jar + persistence: + enabled: true + properties: + sensitiveKey: changeMechangeMe # Must have at least 12 characters + isNode: false + httpsPort: 8443 + webProxyHost: nifi.example.cetic.be # set it by the same host than nifi.traefikIngress.host if traefik ingress is enabled + clusterPort: 6007 + customLibPath: "/opt/configuration_resources/custom_lib" + auth: + admin: CN=admin, OU=NIFI + SSL: + keystorePasswd: changeMe + truststorePasswd: changeMe + + # Automaticaly disabled if OIDC or LDAP enabled + singleUser: + username: username + password: changemechangeme # Must to have at least 12 characters + + ldap: + enabled: false + host: ldap://fadi-openldap:389 # change to your LDAP host + searchBase: cn=admin,dc=ldap,dc=cetic,dc=be # change to your LDAP searchBase + admin: cn=admin,dc=ldap,dc=example,dc=be # change to your LDAP admin + pass: Z2JHHezi4aAA # set a strong password + searchFilter: (objectClass=*) + userIdentityAttribute: cn + authStrategy: SIMPLE # How the connection to the LDAP server is authenticated. Possible values are ANONYMOUS, SIMPLE, LDAPS, or START_TLS. + identityStrategy: USE_DN + authExpiration: 12 hours + oidc: + enabled: false + discoveryUrl: https://login.microsoftonline.com//v2.0/.well-known/openid-configuration + clientId: + clientSecret: + claimIdentifyingUser: email + admin: + ## Request additional scopes, for example profile + additionalScopes: + registry: + enabled: false + # ---- add new processors ---- + # ---- example for InfluxDB processors ---- + extraVolumeMounts: + - name: mycustomlibs + mountPath: /opt/configuration_resources/custom_lib + extraVolumes: # this will create the volume from the directory + - name: mycustomlibs + emptyDir: {} + initContainers: + install-processor: + image: "ellerbrock/alpine-bash-curl-ssl" + imagePullPolicy: "IfNotPresent" + command: + - bash + - -c + - | + cd /data + wget https://github.com/influxdata/nifi-influxdb-bundle/releases/download/v1.13.0/nifi-influx-database-nar-1.13.0.nar + volumeMounts: + - name: mycustomlibs + mountPath: /data + + # ---- ingress ---- + traefikIngress: + enabled: true + host: nifi.example.cetic.be # change to your nifi domainname + +openldap: + enabled: false + persistence: + enabled: true + env: + LDAP_ORGANISATION: "Cetic" + LDAP_DOMAIN: "ldap.cetic.be" + LDAP_BACKEND: "hdb" + LDAP_TLS: "true" + LDAP_TLS_ENFORCE: "false" + LDAP_REMOVE_CONFIG_AFTER_SETUP: "false" + LDAP_TLS_VERIFY_CLIENT: "try" + adminPassword: Z2JHHezi4aAA + configPassword: password2 + customLdifFiles: + 1-default-users.ldif: |- + # You can find an example ldif file. + + +phpldapadmin: + enabled: false + service: + type: ClusterIP + env: + PHPLDAPADMIN_LDAP_HOSTS: "fadi-openldap" + +kafka: + enabled: true + replicas: 1 + affinity: {} + external: + enabled: false + persistence: + enabled: true + zookeeper: + replicaCount: 1 + fullnameOverride: fadi-kafka-zookeeper + +cassandra: + enabled: false + affinity: {} + config: + cluster_size: 1 + seed_size: 1 + start_rpc: true + +elasticsearch: + enabled: false + +kibana: + enabled: false + env: + ELASTICSEARCH_HOSTS: http://{{ .Release.Name }}-elasticsearch-client:9200 + +nginx_ldapauth_proxy: + enabled: false + service: + type: ClusterIP + externalPort: 5601 + proxy: + port: 443 + host: "fadi-kibana" + authName: "admin" + ldapHost: "fadi-openldap" + ldapDN: "dc=ldap,dc=cetic,dc=be" + ldapFilter: "objectClass=organizationalPerson" + ldapBindDN: "cn=admin,dc=ldap,dc=cetic,dc=be" + requires: + - name: "admin" + filter: "cn=admin,dc=ldap,dc=cetic,dc=be" + secrets: + ldapBindPassword: "password1" + +logstash: + enabled: false + elasticsearch: + host: fadi-elasticsearch-client + +filebeat: + enabled: false + config: + output.file.enabled: false + output.logstash: + hosts: ["fadi-logstash:5044"] + indexTemplateLoad: + - fadi-elasticsearch-client:9200 + +tsaas: + enabled: false + +swaggerui: + enabled: false + swaggerui : + jsonPath : "" + jsonUrl : https://raw.githubusercontent.com/cetic/tsimulus-saas/master/oas/api-doc/openapi.json + server : + url: http://api-tsimulus.fadi.minikube + description: "TSIMULUS API" + +adminer: + enabled: false + config: + design: "pepa-linha" + service: + type: ClusterIP + +mlflow: + enabled: false + db: + default: + enabled: false + host: fadi-postgresql + port: 5432 + user: admin + password: password1 + database: postgres + +seldon-core-operator: + enabled: false + usageMetrics: + enabled: false + +zabbix: + enabled: false + postgresql: + enabled: false + zabbixServer: + DB_SERVER_HOST: "fadi-postgresql" + POSTGRES_USER: "admin" + POSTGRES_PASSWORD: "password1" + POSTGRES_DB: "zabbix" + zabbixagent: + enabled: true + ZBX_SERVER_HOST: 127.0.01 + ZBX_SERVER_PORT: 10051 + ZBX_PASSIVE_ALLOW: true + ZBX_PASSIVESERVERS: 127.0.0.1 + ZBX_ACTIVE_ALLOW: true + zabbixweb: + enabled: true + ZBX_SERVER_HOST: zabbix-server + ZBX_SERVER_PORT: 10051 + DB_SERVER_HOST: fadi-postgresql + DB_SERVER_PORT: 5432 + POSTGRES_USER: admin + POSTGRES_PASSWORD: password1 + POSTGRES_DB: zabbix + + +drupal: + enabled: false + ingress: + enabled: false + hostname: + +airflow: + enabled: false + postgresql: + enabled: false + externalDatabase: + database: postgres + host: fadi-postgresql + password: password1 + port: 5432 + user: admin + service: + type: ClusterIP + port: 8080 + auth: + forcePassword: false + username: admin + password: password1 + fernetKey: _WJG5F2fIZ6q5LH03MQE45stfYpuLpeqzYcqOIxvCbs= + ldap: + enabled: false + uri: 'ldap://fadi-openldap:389' + base: 'dc=ldap,dc=cetic,dc=be' + binddn: 'cn=admin,dc=ldap,dc=cetic,dc=be' + bindpw: 'password1' + uidField: 'cn' + redis: + enabled: true + password: 'password1' + metrics: + enabled: false + +rabbitmq: + enabled: false + auth: + username: admin + password: password1 + ldap: + enabled: false + servers: ldap-server + port: '389' + user_dn_pattern: cn=${username},dc=example,dc=org + tls: + enabled: false + service: + type: ClusterIP + +thingsboard: + enabled: false + rabbitmq: + enabled: false + TB_RABBIT_MQ: + TB_QUEUE_TYPE: rabbitmq + TB_QUEUE_RABBIT_MQ_USERNAME: admin + TB_QUEUE_RABBIT_MQ_PASSWORD: password1 + TB_QUEUE_RABBIT_MQ_HOST: rabbitmq + TB_QUEUE_RABBIT_MQ_PORT: 5672 + readinessProbe: + enabled: true + initialDelaySeconds: 60 + periodSeconds: 7 + +mongodb: + enabled: false + persistence: + enabled: true + auth: + enabled: true + rootPassword: "password1" + initdbScripts: + create_admin_user.sh: | + $MONGODB_BIN_DIR/mongo admin --host 127.0.0.1 --port $MONGODB_PORT_NUMBER -u root -p $MONGODB_ROOT_PASSWORD << EOF + db.createUser({ user: "admin" , pwd: "password1", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]}) + EOF + +influxdb: + enabled: false + auth: + admin: + username: admin + password: changeMechangeMe123 # Must be longer than 8 characters + token: MKQISHDF3R23RSDKMQFM13I5KERN1MOIHTZEMR1OI5RMRN1OIH53R # Set a long token + user: + username: "" + password: "" + bucket: "" + influxdb: + replicaCount: 1 + service: + type: Nodeport + port: 8086 + rpcPort: 8088 + persistence: + enabled: true + storageClass: "" + size: 8Gi + +traefik: + enabled: false + dashboardIngress: + enabled: false + dashboardHost: + # Uncomment these 2 lines below to access the dashboard through the ingness + # globalArguments: + # - "--api.insecure=true" + additionalArguments: + - "--providers.kubernetesIngress.ingressClass=traefik-cert-manager" + service: + spec: + loadBalancerIP: # "" + +cert-manager: + enabled: false + installCRDs: true + +clusterIssuer: + enabled: false + prod: false + email: diff --git a/examples/K6/NiFi/.helmignore b/examples/K6/NiFi/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/examples/K6/NiFi/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/examples/K6/NiFi/Chart.yaml b/examples/K6/NiFi/Chart.yaml new file mode 100644 index 0000000..3192094 --- /dev/null +++ b/examples/K6/NiFi/Chart.yaml @@ -0,0 +1,37 @@ +apiVersion: v2 +name: k6 +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" +dependencies: + - name: influxdb + version: ~1.1.8 + repository: https://charts.bitnami.com/bitnami + condition: influxdb.enabled + - name: grafana + version: ~6.14.1 + repository: https://grafana.github.io/helm-charts + condition: grafana.enabled + - name: kube-prometheus + version: ~6.1.11 + repository: https://charts.bitnami.com/bitnami + condition: kube-prometheus.enabled \ No newline at end of file diff --git a/examples/K6/NiFi/README.md b/examples/K6/NiFi/README.md new file mode 100644 index 0000000..6877857 --- /dev/null +++ b/examples/K6/NiFi/README.md @@ -0,0 +1,72 @@ +Load testing NiFi with k6 +======== + +This use case will show how to use the [k6 Helm chart](/helm/helmk6/README.md) for a load test on NiFi. k6 will be used to send a pre-defined number of binary files in a pre-defined duration. + +## NiFi deployment + +First, you have to install and configure NiFi and a listener processor. + +### a. NiFi installation + +You can follow the [FADI installation instructions](/doc/INSTALLATION.md) to deploy Nifi. + +### b. Processor configuration + +The [ListenHTTP](https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.6.0/org.apache.nifi.processors.standard.ListenHTTP/) processor will be used to consume incoming data from k6. + +For that NiFi processor to be reachable from a browser, we need to add a `NodePort` service to it. For that, navigate to the `processors` part of `service` section in values.yaml file and add this config : + +``` +processors: + enabled: true + ports: + - name: listenHTTP + port: 7001 + targetPort: 7001 +``` + +Then, upgrade the NiFi release : + +``` +helm upgrade +``` + +Then, you can go to the Nifi UI, login and add the `ListenHTTP` processor with the port number defined in the values.yaml file. + +## k6 deployment + +First, edit the `values.yaml` file : + +``` +target: + virtualuser: 1 + iterations: 100 + duration: "10s" + host: + port: + fileUpload: + +conf: + schedule: "*/3 * * * *" +``` + +* `virtualuser` : number of virtual users simultaneously connected +* `iterations` : number of copies of the file sent per virtual user +* `duration` : period during which all files are sent +* `host` : the address of your Nifi server +* `port` : the port number of your `ListenHTTP` processor +* `fileUpload` : path to the file that will be copied and sent for the load testing +* `schedule` : as a cron job you need to set a schedule (every 3 min in this example) + +Now, you can lauch the load test by typing this command : + +``` +helm install k6 . +``` + +To see the results, type this command : + +``` +kubectl logs +``` \ No newline at end of file diff --git a/examples/K6/NiFi/confgit.yaml b/examples/K6/NiFi/confgit.yaml new file mode 100644 index 0000000..76cf387 --- /dev/null +++ b/examples/K6/NiFi/confgit.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: gitlab + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: gitlab-admin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: gitlab + namespace: kube-system + diff --git a/examples/K6/NiFi/templates/NOTES.txt b/examples/K6/NiFi/templates/NOTES.txt new file mode 100644 index 0000000..4eaa9db --- /dev/null +++ b/examples/K6/NiFi/templates/NOTES.txt @@ -0,0 +1,23 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "k6.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "k6.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "k6.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "k6.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} + \ No newline at end of file diff --git a/examples/K6/NiFi/templates/_helpers.tpl b/examples/K6/NiFi/templates/_helpers.tpl new file mode 100644 index 0000000..e9cf59f --- /dev/null +++ b/examples/K6/NiFi/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "k6.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "k6.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "k6.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "k6.labels" -}} +helm.sh/chart: {{ include "k6.chart" . }} +{{ include "k6.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "k6.selectorLabels" -}} +app.kubernetes.io/name: {{ include "k6.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "k6.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "k6.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/examples/K6/NiFi/templates/configmap.yaml b/examples/K6/NiFi/templates/configmap.yaml new file mode 100644 index 0000000..1f21843 --- /dev/null +++ b/examples/K6/NiFi/templates/configmap.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: k6-scripts +data: + nginx-test.js: | + import http, { FileData } from 'k6/http'; + import { check } from 'k6'; + import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js'; + + export const options = { + discardResponseBodies: true, + scenarios: { + contacts: { + executor: 'per-vu-iterations', + vus: {{ .Values.target.virtualuser }}, + iterations: {{ .Values.target.iterations }}, + maxDuration: {{ .Values.target.duration }}, + }, + }, + }; + + const binFile = open({{ .Values.target.fileUpload | quote }},'b'); + + export default function () { + const responses = http.post('{{ .Values.target.host }}:{{ .Values.target.port }}/contentListener', binFile + ); + + check(responses, { 'is status 200': (r) => r.status === 200, }); + + } diff --git a/examples/K6/NiFi/templates/cron.yaml b/examples/K6/NiFi/templates/cron.yaml new file mode 100644 index 0000000..35178fa --- /dev/null +++ b/examples/K6/NiFi/templates/cron.yaml @@ -0,0 +1,36 @@ +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: k6-test +spec: + schedule: {{ .Values.conf.schedule | quote }} + jobTemplate: + spec: + template: + spec: + containers: + - name: k6 + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + env: + - name: K6_OUT + value: influxdb=http://{{ .Release.Name }}-influxdb:8086/k6 + - name: TARGET_HOSTNAME + value: nginx-service.default.svc.cluster.local + args: + - run + - /scripts/nginx-test.js + volumeMounts: + - name: scripts-vol + mountPath: /scripts + - name: data + mountPath: /data + + restartPolicy: Never + volumes: + - name: scripts-vol + configMap: + name: k6-scripts + - name: data + hostPath: + path: /home/docker + type: Directory diff --git a/examples/K6/NiFi/templates/hpa.yaml b/examples/K6/NiFi/templates/hpa.yaml new file mode 100644 index 0000000..8cbd352 --- /dev/null +++ b/examples/K6/NiFi/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "k6.fullname" . }} + labels: + {{- include "k6.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "k6.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/examples/K6/NiFi/templates/serviceaccount.yaml b/examples/K6/NiFi/templates/serviceaccount.yaml new file mode 100644 index 0000000..ecc0bc1 --- /dev/null +++ b/examples/K6/NiFi/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "k6.serviceAccountName" . }} + labels: + {{- include "k6.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/examples/K6/NiFi/templates/tests/test-connection.yaml b/examples/K6/NiFi/templates/tests/test-connection.yaml new file mode 100644 index 0000000..eb56a01 --- /dev/null +++ b/examples/K6/NiFi/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "k6.fullname" . }}-test-connection" + labels: + {{- include "k6.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "k6.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/examples/K6/NiFi/values.yaml b/examples/K6/NiFi/values.yaml new file mode 100644 index 0000000..78ef9d8 --- /dev/null +++ b/examples/K6/NiFi/values.yaml @@ -0,0 +1,134 @@ +# Default values for k6. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: loadimpact/k6 + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "0.34.1" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service accdebianount should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 +service: + type: ClusterIP + port: 80 + +influxdb: + authEnabled: false + adminUser: + name: admin + pwd: changeme + architecture: standalone + database: k6 + +grafana: + enabled: true + env: { + GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin", + GF_AUTH_ANONYMOUS_ENABLED: "true", + GF_AUTH_BASIC_ENABLED: "false"} + service: + type: NodePort + port: 3000 + datasources: + datasources.yaml: + apiVersion: 1 + datasources: + # name of the datasource. Required + + # datasource type. Require + - name: k6influxdb + type: influxdb + access: proxy + database: k6 + url: http://{{ .Release.Name }}-influxdb:8086 + user: admin + password: changeme + isDefault: true + editable: true + - name: k6prometheus + type: prometheus + access: proxy + url: http://{{ .Release.Name }}-kube-prometheus-prometheus:9090 + user: admin + password: changeme + editable: true + +target: + virtualuser: 1 + iterations: 100 + duration: "10s" + host: + port: + fileUpload: + +conf: + schedule: "*/3 * * * *" + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 400m + memory: 1280Mi + requests: + cpu: 400m + memory: 1280Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + diff --git a/examples/README.md b/examples/README.md index 848b723..78cbe70 100644 --- a/examples/README.md +++ b/examples/README.md @@ -7,4 +7,7 @@ This section contains various usage examples for FADI: * [streaming ingestion](examples/kafka/README.md) with streaming ingestion with the help of the [Apache Kafka](https://kafka.apache.org) message broker * [on-demand compute environments](examples/binderhub/README.md) with [BinderHub](https://binderhub.readthedocs.io/en/latest/) * [Tensorflow example](examples/tensorflow/README.md) for image classification -* [NiFi/InfluxDB2 example](examples/influxDB2-nifi/README.md) on how to write and read data from an InfluxDB2 database \ No newline at end of file +* [NiFi/InfluxDB2 example](examples/influxDB2-nifi/README.md) on how to write and read data from an InfluxDB2 database +* Load testing examples using [K6](https://k6.io): + * [Kafka](K6/Kafka/README.md) + * [NiFi](K6/NiFi/README.md) \ No newline at end of file diff --git a/helm/helmk6/Chart.yaml b/helm/helmk6/Chart.yaml new file mode 100644 index 0000000..3192094 --- /dev/null +++ b/helm/helmk6/Chart.yaml @@ -0,0 +1,37 @@ +apiVersion: v2 +name: k6 +description: A Helm chart for Kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.16.0" +dependencies: + - name: influxdb + version: ~1.1.8 + repository: https://charts.bitnami.com/bitnami + condition: influxdb.enabled + - name: grafana + version: ~6.14.1 + repository: https://grafana.github.io/helm-charts + condition: grafana.enabled + - name: kube-prometheus + version: ~6.1.11 + repository: https://charts.bitnami.com/bitnami + condition: kube-prometheus.enabled \ No newline at end of file diff --git a/helm/helmk6/README.md b/helm/helmk6/README.md new file mode 100644 index 0000000..f4db252 --- /dev/null +++ b/helm/helmk6/README.md @@ -0,0 +1,159 @@ +# Helm Chart for k6 load testing + +## Introduction + +This [Helm](https://helm.sh/) chart installs [k6](https://k6.io/) and differents tools to load test, monitor and troubleshoot FADI services in a [Kubernetes](https://kubernetes.io/) cluster. + +## Prerequisites + +- Kubernetes cluster 1.10+ +- Helm 3.0.0+ +- [Persistent Volumes (PV)](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) provisioner support in the underlying infrastructure. + +## Installation + +### Install from local clone + +```bash +git clone https://github.com/cetic/fadi.git +cd helm/helmk6 +helm dep up +helm install k6loadtest . + +NAME: k6loadtest +LAST DEPLOYED: Sat Aug 14 13:21:43 2021 +NAMESPACE: default +STATUS: deployed +REVISION: 1 +NOTES: +1. Get the application URL by running these commands: + export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=k6,app.kubernetes.io/instance=k6loadtest" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT +``` + +## Uninstallation + +To uninstall/delete the `k6loadtest` deployment: + +```bash +helm delete k6loadtest +release "k6loadtest" uninstalled +``` + +## Configuration + +The following table lists the configurable parameters of the chart and the default values. + +| Parameter | Description | Default | +| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------| ------------------------------- | +| **ReplicaCount** | +| `replicaCount` | Number of k6 pod | `1` | +| **Image** | +| `image.repository` | k6 Image name | `loadimpact` | +| `image.tag` | k6 Image tag | `k6` | +| `image.pullPolicy` | k6 Image pull policy | `IfNotPresent` | +| `image.pullSecret` | k6 Image pull secret | `nil` | +| **cronJob** | +| `conf.schedule` | configuration cronJob schedule | ` */10 * * * * ` | +| **grafana** | +| `grafana.enabled` | Enable grafana | `true` | +| `grafana.env` | environment variable | `{GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin",GF_AUTHNONYMOUS_ENABLED: "true",GF_AUTH_BASIC_ENABLED: "false"}` | +| `grafana.service.type` | service type | `NodePort` | +| `grafana.service.port` | service port | `3000` | +| `grafana.datasources` | datasources config .yaml | ` datasources.yaml` | +| **influxdb** | +| `influxdb.authEnabled` | authEnabled influxdb | `false` | +| `influxdb.adminUser.name` | admin name | `CHANGEME`| +| `influxdb.adminUser.pwd` |admin password | `` | +| `influxdb.architecture` | Architecture deployment | `standalone` | +| `influxdb.database` | name of the influxdb database to be created| `k6` | | | +| **Load test conf** | +| `target.virtualuser` | number of virtual users to simulate | `` | +| `target.duration` | test duration | | +| `target.host` | host service address to be tested | | +| `target.port` | service port | + +## Troubleshooting + +Before [filing a bug report](https://github.com/cetic/helm-nifi/issues/new/choose), you may want to: + +* check that [persistent storage](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) is configured on your cluster +* keep in mind that a first installation may take a significant amount of time on a home internet connection +* check if a pod is in error: +```bash +kubectl get po +NAME READY STATUS RESTARTS AGE +k6-test-1628944200-dg8pr 0/1 Completed 0 2m10s +k6loadtest-grafana-5589f69c96-wdlt2 1/1 Running 0 10m +k6loadtest-influxdb-85c844958f-6nfzx 1/1 Running 0 10m +nifi-0 4/4 Running 25 10d + + +kubectl logs k6-test-1628944200-dg8pr + + /\ |‾‾| /‾‾/ /‾‾/ + /\ / \ | |/ / / / + / \/ \ | ( / ‾‾\ + / \ | |\ \ | (‾) | + / __________ \ |__| \__\ \_____/ .io + + execution: local + script: /scripts/nginx-test.js + output: InfluxDBv1 (http://k6loadtest-influxdb:8086) + + scenarios: (100.00%) 1 scenario, 10 max VUs, 31s max duration (incl. graceful stop): + * default: Up to 10 looping VUs for 1s over 1 stages (gracefulRampDown: 30s, gracefulStop: 30s) + + +running (01.0s), 09/10 VUs, 3845 complete and 0 interrupted iterations +default [ 99% ] 09/10 VUs 1.0s/1.0s + +running (01.0s), 00/10 VUs, 3955 complete and 0 interrupted iterations +default ✓ [ 100% ] 00/10 VUs 1s + + ✓ http response status code is 200 + + checks.........................: 100.00% ✓ 3955 ✗ 0 + data_received..................: 5.5 MB 5.4 MB/s + data_sent......................: 340 kB 336 kB/s + http_req_blocked...............: avg=6.37µs min=700ns med=1.43µs max=9.78ms p(90)=2.35µs p(95)=3.1µs + http_req_connecting............: avg=863ns min=0s med=0s max=1.33ms p(90)=0s p(95)=0s + http_req_duration..............: avg=1.15ms min=121.93µs med=744.33µs max=399.13ms p(90)=1.64ms p(95)=2.16ms + { expected_response:true }...: avg=1.15ms min=121.93µs med=744.33µs max=399.13ms p(90)=1.64ms p(95)=2.16ms + http_req_failed................: 0.00% ✓ 0 ✗ 3955 + http_req_receiving.............: avg=59.62µs min=9.59µs med=23.64µs max=6.9ms p(90)=59.3µs p(95)=129.24µs + http_req_sending...............: avg=15.23µs min=3.27µs med=6.65µs max=3.25ms p(90)=11.91µs p(95)=20.77µs + http_req_tls_handshaking.......: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s + http_req_waiting...............: avg=1.07ms min=102.92µs med=682.98µs max=399.02ms p(90)=1.52ms p(95)=1.99ms + http_reqs......................: 3955 3902.325748/s + iteration_duration.............: avg=1.27ms min=160.41µs med=834.85µs max=399.65ms p(90)=1.85ms p(95)=2.44ms + iterations.....................: 3955 3902.325748/s + vus............................: 9 min=9 max=9 + vus_max........................: 10 min=10 max=10 + +``` + +Inspect the pod, check the "Events" section at the end for anything suspicious. + +```bash +minikube service k6loadtest-grafana +|-----------|--------------------|--------------|-----------------------------| +| NAMESPACE | NAME | TARGET PORT | URL | +|-----------|--------------------|--------------|-----------------------------| +| default | k6loadtest-grafana | service/3000 | http://192.168.99.113:32372 | +|-----------|--------------------|--------------|-----------------------------| +🎉 Opening service default/k6loadtest-grafana in default browser... + +``` + +Get logs on a failed container inside the pod (here the `server` one): + +```bash +kubectl logs myrelease-nifi-0 server +``` + +## License + +[Apache License 2.0](/LICENSE) diff --git a/helm/helmk6/confgit.yaml b/helm/helmk6/confgit.yaml new file mode 100644 index 0000000..76cf387 --- /dev/null +++ b/helm/helmk6/confgit.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: gitlab + namespace: kube-system +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: gitlab-admin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: gitlab + namespace: kube-system + diff --git a/helm/helmk6/dash.json b/helm/helmk6/dash.json new file mode 100644 index 0000000..ba7dc1c --- /dev/null +++ b/helm/helmk6/dash.json @@ -0,0 +1,2523 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "A dashboard for visualizing results from the k6.io load testing tool, using the InfluxDB exporter.\r\n\r\nBased on https://grafana.com/dashboards/2587\r\n\r\n", + "editable": true, + "gnetId": 4411, + "graphTooltip": 2, + "id": 1, + "iteration": 1633438508385, + "links": [], + "panels": [ + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 68, + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 66, + "links": [], + "options": { + "content": "### To choose which measurements to show, use the **Measurements** drop-down in the top left corner!\n\nK6 collects metrics for several phases during the HTTP request lifetime.\n\nThe combined delays for the application and network (send, wait, recieve) are available in this metric:\n * **http_req_duration** _( Total time for request, excluding time spent blocked (http_req_blocked), DNS lookup (http_req_looking_up) and TCP connect (http_req_connecting) time. )_\n\nThis metric can also be broken down into these metrics:\n * **http_req_tls_handshaking** _( Time spent handshaking TLS session with remote host. )_\n * **http_req_sending** _( Time spent sending data to remote host. )_\n * **http_req_waiting** _( Time spent waiting for response from remote host (a.k.a. \"time to first byte\", or \"TTFB\"). )_\n * **http_req_receiving** _( Time spent receiving response data from remote host. )_\n\nThese metrics measure delays and durations on the client:\n\n * **http_req_blocked** _( Time spent blocked (waiting for a free TCP connection slot) before initiating request. )_\n * **http_req_looking_up** _( Time spent looking up remote host name in DNS. )_\n * **http_req_connecting** _( Time spent establishing TCP connection to remote host. )_\n\n\n### View official K6.io documentation here: [https://docs.k6.io/docs/result-metrics][1]\n\n\n[1]: https://docs.k6.io/docs/result-metrics\n\n", + "mode": "markdown" + }, + "pluginVersion": "8.0.5", + "transparent": true, + "type": "text" + } + ], + "repeat": null, + "title": "Documentation", + "type": "row" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 97, + "panels": [], + "title": "Cluster metric", + "type": "row" + }, + { + "datasource": "k6prometheus", + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "osVersion" + }, + "properties": [ + { + "id": "custom.width", + "value": 360 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Docker version" + }, + "properties": [ + { + "id": "custom.width", + "value": 83 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Node name" + }, + "properties": [ + { + "id": "custom.width", + "value": 213 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "No. of pods" + }, + "properties": [ + { + "id": "custom.width", + "value": 104 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "dockerVersion" + }, + "properties": [ + { + "id": "custom.width", + "value": 123 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "instance" + }, + "properties": [ + { + "id": "custom.width", + "value": 147 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Memory used" + }, + "properties": [ + { + "id": "custom.width", + "value": 109 + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "thresholds", + "value": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "lcd-gauge" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "kernelVersion" + }, + "properties": [ + { + "id": "custom.width", + "value": 140 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "node" + }, + "properties": [ + { + "id": "custom.width", + "value": 204 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Pod capacity used" + }, + "properties": [ + { + "id": "custom.width", + "value": 142 + }, + { + "id": "unit", + "value": "none" + }, + { + "id": "custom.displayMode", + "value": "auto" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU usage" + }, + "properties": [ + { + "id": "custom.width", + "value": 91 + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "thresholds", + "value": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + { + "id": "custom.displayMode", + "value": "lcd-gauge" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "K8s version" + }, + "properties": [ + { + "id": "custom.width", + "value": 105 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "OS version" + }, + "properties": [ + { + "id": "custom.width", + "value": 178 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pod_cidr" + }, + "properties": [ + { + "id": "custom.width", + "value": 122 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Kernel version" + }, + "properties": [ + { + "id": "custom.width", + "value": 122 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Pod count" + }, + "properties": [ + { + "id": "custom.width", + "value": 88 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "role" + }, + "properties": [ + { + "id": "custom.width", + "value": 72 + } + ] + } + ] + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 89, + "options": { + "angular": { + "decimals": 0, + "defaultColor": "#37872D", + "format": "none", + "linkIndex": "0", + "linkVars": [], + "mathColorValue": "data[end]", + "mathDisplayValue": "data[end]", + "mathScratchPad": "data = size(data)[1] == 0 ? [NaN] : data", + "options": {}, + "radius": "25px", + "thresholds": [ + { + "color": "#37872D", + "value": "1" + }, + { + "color": "#C4162A", + "value": "0" + } + ] + }, + "frameIndex": 0, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "exemplar": true, + "expr": "kube_node_info", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "{{node}}", + "refId": "A" + }, + { + "expr": " (count by (node)(container_spec_memory_reservation_limit_bytes{pod!=\"\"}))", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "B" + }, + { + "expr": "((label_replace((node_memory_MemTotal_bytes + on(instance) group_left(nodename) \nnode_uname_info),\"node\",\"$1\",\"nodename\", \"(.+)\")) - (label_replace((node_memory_MemAvailable_bytes + on(instance) group_left(nodename) \nnode_uname_info),\"node\",\"$1\",\"nodename\", \"(.+)\"))) / (label_replace((node_memory_MemTotal_bytes + on(instance) group_left(nodename) \nnode_uname_info),\"node\",\"$1\",\"nodename\", \"(.+)\")) ", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "C" + }, + { + "expr": "max\n by(node) (max by(instance) (kubelet_running_pod_count{job=\"kubelet\",metrics_path=\"/metrics\"})\n * on(instance) group_left(node) kubelet_node_name{job=\"kubelet\",metrics_path=\"/metrics\"})\n", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "D" + }, + { + "expr": "sum by (node)(label_replace(instance:node_cpu:ratio + on(instance) group_left(nodename) \nnode_uname_info,\"node\",\"$1\",\"nodename\", \"(.+)\") ) / sum by (node)(kube_node_status_capacity{resource=\"cpu\"})", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "E" + }, + { + "expr": "kube_node_role", + "format": "table", + "interval": "", + "legendFormat": "", + "refId": "F" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "cluster node details", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "container_runtime_version", + "kernel_version", + "kubelet_version", + "node", + "os_image", + "pod_cidr", + "provider_id", + "Value #C", + "Value #D", + "Value #E", + "role" + ] + } + } + }, + { + "id": "seriesToColumns", + "options": { + "byField": "node" + } + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": { + "Value #C": 2, + "Value #D": 4, + "Value #E": 3, + "container_runtime_version": 9, + "kernel_version": 7, + "kubelet_version": 5, + "node": 0, + "os_image": 8, + "pod_cidr": 6, + "provider_id": 10, + "role": 1 + }, + "renameByName": { + "Value #C": "Memory used", + "Value #D": "Pod count", + "Value #E": "CPU usage", + "container_runtime_version": "Docker version", + "kernel_version": "Kernel version", + "kubelet_version": "K8s version", + "node": "Node name", + "os_image": "OS version", + "provider_id": "" + } + } + } + ], + "transparent": true, + "type": "table" + }, + { + "cacheTimeout": null, + "datasource": "k6prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 2 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 3 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 5 + }, + "id": 95, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "exemplar": true, + "expr": "node_memory_MemTotal_bytes", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{instance}}", + "refId": "A", + "step": 20 + } + ], + "title": "Total memory", + "type": "stat" + }, + { + "datasource": "k6prometheus", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "displayName": "", + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 60 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 21, + "x": 3, + "y": 5 + }, + "id": 103, + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "exemplar": true, + "expr": "100 - (avg(irate(node_cpu_seconds_total{mode=\"idle\"}[30m])) * 100)", + "instant": true, + "interval": "", + "legendFormat": "CPU Busy", + "refId": "A" + }, + { + "exemplar": true, + "expr": "avg(irate(node_cpu_seconds_total{mode=\"iowait\"}[30m])) * 100", + "hide": true, + "instant": true, + "interval": "", + "legendFormat": "Busy Iowait", + "refId": "C" + }, + { + "exemplar": true, + "expr": "(1 - (node_memory_MemAvailable_bytes / (node_memory_MemTotal_bytes)))* 100", + "instant": true, + "interval": "", + "legendFormat": "Used RAM Memory", + "refId": "B" + }, + { + "exemplar": true, + "expr": "(1 - (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes)) * 100", + "instant": true, + "interval": "", + "legendFormat": "Used SWAP", + "refId": "E" + } + ], + "timeFrom": null, + "timeShift": null, + "type": "bargauge" + }, + { + "cacheTimeout": null, + "datasource": "k6prometheus", + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 2 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 8 + }, + "id": 91, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "exemplar": true, + "expr": "count(count(node_cpu_seconds_total) by (cpu))", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A", + "step": 20 + } + ], + "title": "Total CPU ", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6prometheus", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 11 + }, + "hiddenSeries": false, + "id": 105, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(irate(container_cpu_usage_seconds_total{container=\"$container\", namespace=\"$namespace\"}[30s])) by (id,pod)", + "instant": false, + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(container_spec_cpu_quota{container=\"$container\", namespace=\"$namespace\"} / container_spec_cpu_period{container=\"$container\", namespace=\"$namespace\"}) by (namespace,container) / count(container_memory_usage_bytes{container=\"$container\", namespace=\"$namespace\"}) by (namespace,container) ", + "interval": "", + "intervalFactor": 2, + "legendFormat": "limit", + "refId": "B", + "step": 2 + }, + { + "expr": "sum(container_spec_cpu_shares{container=\"$container\", namespace=\"$namespace\"} / 1024) by (namespace,container) / count(container_spec_cpu_shares{container=\"$container\", namespace=\"$namespace\"}) by (namespace,container) ", + "interval": "", + "intervalFactor": 2, + "legendFormat": "request", + "refId": "C", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Cpu usage (per pod)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": "cores", + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": { + "limit": "yellow" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6prometheus", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 11 + }, + "hiddenSeries": false, + "id": 107, + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": true, + "show": true, + "sort": "avg", + "sortDesc": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(container_memory_usage_bytes{container=\"$container\", namespace=\"$namespace\"}) by (id,pod)", + "interval": "", + "intervalFactor": 2, + "legendFormat": "{{pod}}", + "refId": "A", + "step": 2 + }, + { + "expr": "sum(container_spec_memory_limit_bytes{container=\"$container\", namespace=\"$namespace\"}) by (namespace,container) / count(container_memory_usage_bytes{container=\"$container\", namespace=\"$namespace\"}) by (container,namespace)", + "interval": "", + "intervalFactor": 2, + "legendFormat": "limit", + "refId": "B", + "step": 2 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory usage (per pod)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 69, + "panels": [], + "repeat": null, + "title": "K6 Test overview (all URLs)", + "type": "row" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 19 + }, + "id": 75, + "interval": ">1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Active VUs", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "vus", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Virtual Users", + "type": "gauge" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "noValue": "-", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 19 + }, + "id": 77, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 15 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "[[tag_name]]", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "http_req_duration", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"value\") FROM \"http_req_duration\" WHERE $timeFilter GROUP BY time($__interval), \"name\"", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "title": "#total requests", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "noValue": "-", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 19 + }, + "id": 80, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 15 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "[[tag_name]]", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "http_req_duration", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [ + { + "key": "expected_response", + "operator": "=", + "value": "false" + } + ] + } + ], + "title": "#total failed requests", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "min": 0, + "noValue": "-", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 19 + }, + "id": 82, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "[[tag_check]]", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "measurement": "http_req_duration", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT count(\"value\") FROM \"autogen\".\"checks\" WHERE $timeFilter AND \"value\" = 1 GROUP BY \"check\", time(1s) fill(null)", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [ + { + "key": "expected_response", + "operator": "=", + "value": "false" + } + ] + } + ], + "title": "#total checks", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "description": "for more information, see\nhttps://k6.io/docs/javascript-api/error-codes", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 10 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 87, + "interval": "1s", + "links": [], + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 15 + }, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "HTTP status:[[tag_status]] - [[tag_name]]", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"value\") FROM \"http_req_failed\" WHERE $timeFilter AND \"value\" > 0 AND (\"status\" != '0') GROUP BY \"name\", \"error\", \"error_code\", \"status\"", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "[[tag_error]] (error_code [[tag_error_code]])", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"value\") FROM \"http_req_failed\" WHERE $timeFilter AND \"value\" > 0 AND (\"status\" = '0') GROUP BY \"error\", \"error_code\", \"status\"", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "#total failed requests", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "description": "for more information, see\nhttps://k6.io/docs/javascript-api/error-codes", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 10 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 85, + "interval": "1s", + "links": [], + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 15 + }, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "HTTP status:[[tag_status]] - [[tag_name]]", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"value\") FROM \"autogen\".\"http_req_failed\" WHERE $timeFilter AND \"value\" > 0 AND (\"status\" != '0') GROUP BY \"name\", time(1s), \"error\", \"error_code\", \"status\"", + "rawQuery": true, + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + }, + { + "alias": "[[tag_error]] (error_code [[tag_error_code]])", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT sum(\"value\") FROM \"autogen\".\"http_req_failed\" WHERE $timeFilter AND \"value\" > 0 AND (\"status\" = '0') GROUP BY time(1s), \"error\", \"error_code\", \"status\"", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "failed requests Per seconds", + "type": "stat" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 40 + }, + "id": 70, + "panels": [], + "repeat": "Measurement", + "title": "$Measurement", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 41 + }, + "id": 11, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (mean)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 41 + }, + "id": 14, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (max)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 41 + }, + "id": 15, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "median" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (med)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 41 + }, + "id": 16, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (min)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 41 + }, + "id": 12, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p90)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 41 + }, + "id": 13, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p95)", + "type": "stat" + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": false, + "text": [ + "http_req_duration" + ], + "value": [ + "http_req_duration" + ] + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "Measurement", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + }, + { + "selected": true, + "text": "http_req_duration", + "value": "http_req_duration" + }, + { + "selected": false, + "text": "http_req_blocked", + "value": "http_req_blocked" + }, + { + "selected": false, + "text": "http_req_connecting", + "value": "http_req_connecting" + }, + { + "selected": false, + "text": "http_req_looking_up", + "value": "http_req_looking_up" + }, + { + "selected": false, + "text": "http_req_receiving", + "value": "http_req_receiving" + }, + { + "selected": false, + "text": "http_req_sending", + "value": "http_req_sending" + }, + { + "selected": false, + "text": "http_req_waiting", + "value": "http_req_waiting" + } + ], + "query": "http_req_duration,http_req_blocked,http_req_connecting,http_req_looking_up,http_req_receiving,http_req_sending,http_req_waiting", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": "*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "k6influxdb", + "definition": "", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "URL", + "multi": false, + "name": "URL", + "options": [], + "query": "SHOW TAG VALUES FROM \"http_req_duration\" WITH KEY = \"name\"", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": true, + "text": "default", + "value": "default" + }, + "datasource": "k6prometheus", + "definition": "label_values(container_memory_usage_bytes{namespace=~\".+\",container_name!=\"POD\"},namespace)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(container_memory_usage_bytes{namespace=~\".+\",container_name!=\"POD\"},namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "allValue": null, + "current": { + "selected": true, + "text": "server", + "value": "server" + }, + "datasource": "k6prometheus", + "definition": "label_values(container_memory_usage_bytes{namespace=~\"$namespace\",container!=\"POD\"},container)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "container", + "options": [], + "query": { + "query": "label_values(container_memory_usage_bytes{namespace=~\"$namespace\",container!=\"POD\"},container)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "1s", + "10s", + "30s", + "5m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "k6 Load Testing Results", + "uid": "w7bagFvnk", + "version": 1 +} \ No newline at end of file diff --git a/helm/helmk6/dash1.json b/helm/helmk6/dash1.json new file mode 100644 index 0000000..d5b85bb --- /dev/null +++ b/helm/helmk6/dash1.json @@ -0,0 +1,2093 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "A dashboard for visualizing results from the k6.io load testing tool, using the InfluxDB exporter.\r\n\r\nBased on https://grafana.com/dashboards/2587\r\n\r\n", + "editable": true, + "gnetId": 4411, + "graphTooltip": 2, + "id": 1, + "iteration": 1629885613508, + "links": [], + "panels": [ + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 68, + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 66, + "links": [], + "options": { + "content": "### To choose which measurements to show, use the **Measurements** drop-down in the top left corner!\n\nK6 collects metrics for several phases during the HTTP request lifetime.\n\nThe combined delays for the application and network (send, wait, recieve) are available in this metric:\n * **http_req_duration** _( Total time for request, excluding time spent blocked (http_req_blocked), DNS lookup (http_req_looking_up) and TCP connect (http_req_connecting) time. )_\n\nThis metric can also be broken down into these metrics:\n * **http_req_tls_handshaking** _( Time spent handshaking TLS session with remote host. )_\n * **http_req_sending** _( Time spent sending data to remote host. )_\n * **http_req_waiting** _( Time spent waiting for response from remote host (a.k.a. \"time to first byte\", or \"TTFB\"). )_\n * **http_req_receiving** _( Time spent receiving response data from remote host. )_\n\nThese metrics measure delays and durations on the client:\n\n * **http_req_blocked** _( Time spent blocked (waiting for a free TCP connection slot) before initiating request. )_\n * **http_req_looking_up** _( Time spent looking up remote host name in DNS. )_\n * **http_req_connecting** _( Time spent establishing TCP connection to remote host. )_\n\n\n### View official K6.io documentation here: [https://docs.k6.io/docs/result-metrics][1]\n\n\n[1]: https://docs.k6.io/docs/result-metrics\n\n", + "mode": "markdown" + }, + "pluginVersion": "8.0.5", + "transparent": true, + "type": "text" + } + ], + "repeat": null, + "title": "Documentation", + "type": "row" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 69, + "panels": [], + "repeat": null, + "title": "K6 Test overview (all URLs)", + "type": "row" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 2 + }, + "id": 1, + "interval": ">1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Active VUs", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "vus", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "count" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Virtual Users", + "type": "gauge" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 2 + }, + "id": 17, + "interval": "1s", + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Requests per Second", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "http_reqs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests per Second", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 4, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 72, + "interval": "1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Requests per Second", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "http_reqs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests per Second", + "type": "timeseries" + }, + { + "columns": [], + "datasource": "k6influxdb", + "fontSize": "100%", + "gridPos": { + "h": 14, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 67, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "P95", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "pattern": "percentile", + "thresholds": [], + "type": "number", + "unit": "ms" + }, + { + "alias": "URL", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkUrl": "", + "pattern": "url", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "alias": "min", + "dsType": "influxdb", + "expr": "", + "format": "table", + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "hide": false, + "intervalFactor": 2, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [] + } + ], + "title": "URLs and 95p latency", + "transform": "table", + "type": "table-old" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 10, + "interval": ">1s", + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Checks Per Second", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 73, + "interval": ">1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Checks Per Second", + "type": "timeseries" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 16 + }, + "id": 71, + "interval": ">1s", + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "http_req_failed", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "failed Per Second", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 74, + "interval": ">1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "error_code" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "http_req_failed", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "failed Per Second", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 70, + "panels": [], + "repeat": "Measurement", + "title": "$Measurement", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 24 + }, + "id": 11, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (mean)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 24 + }, + "id": 14, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (max)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 24 + }, + "id": 15, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "median" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (med)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 24 + }, + "id": 16, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (min)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 24 + }, + "id": 12, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p90)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 24 + }, + "id": 13, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p95)", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "description": "Grouped by 1 sec intervals", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 27 + }, + "height": "250px", + "hiddenSeries": false, + "id": 5, + "interval": ">1s", + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 1, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "max", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "p90", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "F", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "p95", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "G", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "min", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "H", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "$Measurement (over time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "ms", + "label": "", + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "rgb(0, 234, 255)", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": "k6influxdb", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 27 + }, + "heatmap": {}, + "height": "250px", + "hideZeroBuckets": false, + "highlightCards": true, + "id": 8, + "interval": ">1s", + "legend": { + "show": false + }, + "links": [], + "reverseYBuckets": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (over time)", + "tooltip": { + "show": true, + "showHistogram": true + }, + "tooltipDecimals": null, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "ms", + "logBase": 2, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "tags": [], + "text": "http_req_duration", + "value": [ + "http_req_duration" + ] + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "Measurement", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + }, + { + "selected": true, + "text": "http_req_duration", + "value": "http_req_duration" + }, + { + "selected": false, + "text": "http_req_blocked", + "value": "http_req_blocked" + }, + { + "selected": false, + "text": "http_req_connecting", + "value": "http_req_connecting" + }, + { + "selected": false, + "text": "http_req_looking_up", + "value": "http_req_looking_up" + }, + { + "selected": false, + "text": "http_req_receiving", + "value": "http_req_receiving" + }, + { + "selected": false, + "text": "http_req_sending", + "value": "http_req_sending" + }, + { + "selected": false, + "text": "http_req_waiting", + "value": "http_req_waiting" + } + ], + "query": "http_req_duration,http_req_blocked,http_req_connecting,http_req_looking_up,http_req_receiving,http_req_sending,http_req_waiting", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": "*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "k6influxdb", + "definition": "", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "URL", + "multi": false, + "name": "URL", + "options": [], + "query": "SHOW TAG VALUES FROM \"http_req_duration\" WITH KEY = \"name\"", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "1s", + "10s", + "30s", + "5m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "k6 Load Testing Results Copy", + "uid": "SMd3Wz47k", + "version": 2 +} diff --git a/helm/helmk6/dash2.json b/helm/helmk6/dash2.json new file mode 100644 index 0000000..57d5b09 --- /dev/null +++ b/helm/helmk6/dash2.json @@ -0,0 +1,2210 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "A dashboard for visualizing results from the k6.io load testing tool, using the InfluxDB exporter.\r\n\r\nBased on https://grafana.com/dashboards/2587\r\n\r\n", + "editable": true, + "gnetId": 4411, + "graphTooltip": 2, + "id": 1, + "iteration": 1630181281917, + "links": [], + "panels": [ + { + "collapsed": true, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 68, + "panels": [ + { + "datasource": null, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 66, + "links": [], + "options": { + "content": "### To choose which measurements to show, use the **Measurements** drop-down in the top left corner!\n\nK6 collects metrics for several phases during the HTTP request lifetime.\n\nThe combined delays for the application and network (send, wait, recieve) are available in this metric:\n * **http_req_duration** _( Total time for request, excluding time spent blocked (http_req_blocked), DNS lookup (http_req_looking_up) and TCP connect (http_req_connecting) time. )_\n\nThis metric can also be broken down into these metrics:\n * **http_req_tls_handshaking** _( Time spent handshaking TLS session with remote host. )_\n * **http_req_sending** _( Time spent sending data to remote host. )_\n * **http_req_waiting** _( Time spent waiting for response from remote host (a.k.a. \"time to first byte\", or \"TTFB\"). )_\n * **http_req_receiving** _( Time spent receiving response data from remote host. )_\n\nThese metrics measure delays and durations on the client:\n\n * **http_req_blocked** _( Time spent blocked (waiting for a free TCP connection slot) before initiating request. )_\n * **http_req_looking_up** _( Time spent looking up remote host name in DNS. )_\n * **http_req_connecting** _( Time spent establishing TCP connection to remote host. )_\n\n\n### View official K6.io documentation here: [https://docs.k6.io/docs/result-metrics][1]\n\n\n[1]: https://docs.k6.io/docs/result-metrics\n\n", + "mode": "markdown" + }, + "pluginVersion": "8.0.5", + "transparent": true, + "type": "text" + } + ], + "repeat": null, + "title": "Documentation", + "type": "row" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 69, + "panels": [], + "repeat": null, + "title": "K6 Test overview (all URLs)", + "type": "row" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 2 + }, + "id": 1, + "interval": ">1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Active VUs", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "vus", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Virtual Users", + "type": "gauge" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 2 + }, + "id": 17, + "interval": "1s", + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Requests per Second", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "http_reqs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests per Second", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 4, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 72, + "interval": "1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Requests per Second", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "http_reqs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests per Second", + "type": "timeseries" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 75, + "interval": ">1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Active VUs", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "vus", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Virtual Users", + "type": "timeseries" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 10, + "interval": ">1s", + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Checks Per Second", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 73, + "interval": ">1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "linear" + ], + "type": "fill" + } + ], + "measurement": "checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Checks Per Second", + "type": "timeseries" + }, + { + "columns": [], + "datasource": "k6influxdb", + "fontSize": "100%", + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 16 + }, + "id": 67, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "P95", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "pattern": "percentile", + "thresholds": [], + "type": "number", + "unit": "ms" + }, + { + "alias": "URL", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkUrl": "", + "pattern": "url", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "alias": "min", + "dsType": "influxdb", + "expr": "", + "format": "table", + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "hide": false, + "intervalFactor": 2, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [] + } + ], + "title": "URLs and 95p latency", + "transform": "table", + "type": "table-old" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 16 + }, + "id": 71, + "interval": ">1s", + "links": [], + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "http_req_failed", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "failed Per Second", + "type": "stat" + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 74, + "interval": ">1s", + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single" + } + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "error_code" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "http_req_failed", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "failed Per Second", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": null, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 70, + "panels": [], + "repeat": "Measurement", + "title": "$Measurement", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 24 + }, + "id": 11, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (mean)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 24 + }, + "id": 14, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (max)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 24 + }, + "id": 15, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "median" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (med)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 24 + }, + "id": 16, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (min)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 24 + }, + "id": 12, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p90)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 24 + }, + "id": 13, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p95)", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "description": "Grouped by 1 sec intervals", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 27 + }, + "height": "250px", + "hiddenSeries": false, + "id": 5, + "interval": ">1s", + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 1, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "max", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "p90", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "F", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "p95", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "G", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "min", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "H", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "$Measurement (over time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "ms", + "label": "", + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "rgb(0, 234, 255)", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": "k6influxdb", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 27 + }, + "heatmap": {}, + "height": "250px", + "hideZeroBuckets": false, + "highlightCards": true, + "id": 8, + "interval": ">1s", + "legend": { + "show": false + }, + "links": [], + "reverseYBuckets": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (over time)", + "tooltip": { + "show": true, + "showHistogram": true + }, + "tooltipDecimals": null, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "ms", + "logBase": 2, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "tags": [], + "text": "http_req_duration", + "value": [ + "http_req_duration" + ] + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "Measurement", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + }, + { + "selected": true, + "text": "http_req_duration", + "value": "http_req_duration" + }, + { + "selected": false, + "text": "http_req_blocked", + "value": "http_req_blocked" + }, + { + "selected": false, + "text": "http_req_connecting", + "value": "http_req_connecting" + }, + { + "selected": false, + "text": "http_req_looking_up", + "value": "http_req_looking_up" + }, + { + "selected": false, + "text": "http_req_receiving", + "value": "http_req_receiving" + }, + { + "selected": false, + "text": "http_req_sending", + "value": "http_req_sending" + }, + { + "selected": false, + "text": "http_req_waiting", + "value": "http_req_waiting" + } + ], + "query": "http_req_duration,http_req_blocked,http_req_connecting,http_req_looking_up,http_req_receiving,http_req_sending,http_req_waiting", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": "*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "k6influxdb", + "definition": "", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "URL", + "multi": false, + "name": "URL", + "options": [], + "query": "SHOW TAG VALUES FROM \"http_req_duration\" WITH KEY = \"name\"", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "1s", + "10s", + "30s", + "5m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "k6 Load Testing Results Copy", + "uid": "gjrNqvV7z", + "version": 1 +} diff --git a/helm/helmk6/dashboard.json b/helm/helmk6/dashboard.json new file mode 100644 index 0000000..907e833 --- /dev/null +++ b/helm/helmk6/dashboard.json @@ -0,0 +1,197 @@ +{ + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.3.5", + "timeFrom": null, + "timeShift": null, + "title": "Panel Title", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Panel Title", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + + "style": "dark", + + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + + "id": null, + "uid": null, + "title": "Production Overview", + "tags": [ "templated" ], + "timezone": "browser", + "schemaVersion": 16, + "version": 0, + "refresh": "25s" + }, + "folderId": null, + "folderUid": null, + "message": "Made changes to xyz", + "overwrite": true +} + diff --git a/helm/helmk6/k6dashboard.json b/helm/helmk6/k6dashboard.json new file mode 100644 index 0000000..ecef896 --- /dev/null +++ b/helm/helmk6/k6dashboard.json @@ -0,0 +1,2230 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "A dashboard for visualizing results from the k6.io load testing tool, using the InfluxDB exporter.\r\n\r\nBased on https://grafana.com/dashboards/2587\r\n\r\n", + "editable": true, + "gnetId": 4411, + "graphTooltip": 2, + "id": 1, + "iteration": 1632125909124, + "links": [], + "panels": [ + { + "collapsed": true, + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 68, + "panels": [ + { + "content": "### To choose which measurements to show, use the **Measurements** drop-down in the top left corner!\n\nK6 collects metrics for several phases during the HTTP request lifetime.\n\nThe combined delays for the application and network (send, wait, recieve) are available in this metric:\n * **http_req_duration** _( Total time for request, excluding time spent blocked (http_req_blocked), DNS lookup (http_req_looking_up) and TCP connect (http_req_connecting) time. )_\n\nThis metric can also be broken down into these metrics:\n * **http_req_tls_handshaking** _( Time spent handshaking TLS session with remote host. )_\n * **http_req_sending** _( Time spent sending data to remote host. )_\n * **http_req_waiting** _( Time spent waiting for response from remote host (a.k.a. \"time to first byte\", or \"TTFB\"). )_\n * **http_req_receiving** _( Time spent receiving response data from remote host. )_\n\nThese metrics measure delays and durations on the client:\n\n * **http_req_blocked** _( Time spent blocked (waiting for a free TCP connection slot) before initiating request. )_\n * **http_req_looking_up** _( Time spent looking up remote host name in DNS. )_\n * **http_req_connecting** _( Time spent establishing TCP connection to remote host. )_\n\n\n### View official K6.io documentation here: [https://docs.k6.io/docs/result-metrics][1]\n\n\n[1]: https://docs.k6.io/docs/result-metrics\n\n", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 66, + "links": [], + "mode": "markdown", + "title": "", + "transparent": true, + "type": "text" + } + ], + "repeat": null, + "title": "Documentation", + "type": "row" + }, + { + "collapsed": false, + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 69, + "panels": [], + "repeat": null, + "title": "K6 Test overview (all URLs)", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 2 + }, + "hiddenSeries": false, + "id": 10, + "interval": ">1s", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 0.5, + "points": true, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Num Errors", + "color": "#BF1B00" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Checks Per Second", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 2 + }, + "id": 73, + "interval": ">1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "check" + ], + "type": "tag" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "checks", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Checks Per Second", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": true, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 12, + "y": 2 + }, + "hiddenSeries": false, + "id": 1, + "interval": ">1s", + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": true, + "min": true, + "show": true, + "total": false, + "values": true + }, + "lines": false, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Active VUs", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "vus", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Virtual Users", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 2 + }, + "id": 75, + "interval": ">1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Active VUs", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "none" + ], + "type": "fill" + } + ], + "measurement": "vus", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Virtual Users", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 9 + }, + "hiddenSeries": false, + "id": 17, + "interval": "1s", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": true, + "min": false, + "rightSide": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 1, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Requests per Second", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "http_reqs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Requests per Second", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": "0", + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 72, + "interval": "1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "Requests per Second", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "http_reqs", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Requests per Second", + "type": "gauge" + }, + { + "columns": [], + "datasource": "k6influxdb", + "fontSize": "100%", + "gridPos": { + "h": 14, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 67, + "links": [], + "pageSize": null, + "scroll": true, + "showHeader": true, + "sort": { + "col": 1, + "desc": true + }, + "styles": [ + { + "alias": "Time", + "align": "auto", + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "pattern": "Time", + "type": "hidden" + }, + { + "alias": "P95", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "link": false, + "pattern": "percentile", + "thresholds": [], + "type": "number", + "unit": "ms" + }, + { + "alias": "URL", + "align": "auto", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 2, + "link": false, + "linkUrl": "", + "pattern": "url", + "thresholds": [], + "type": "number", + "unit": "short" + } + ], + "targets": [ + { + "alias": "min", + "dsType": "influxdb", + "expr": "", + "format": "table", + "groupBy": [ + { + "params": [ + "name" + ], + "type": "tag" + } + ], + "hide": false, + "intervalFactor": 2, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "A", + "resultFormat": "table", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [] + } + ], + "title": "URLs and 95p latency", + "transform": "table", + "type": "table-old" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "fill": 0, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 16 + }, + "hiddenSeries": false, + "id": 71, + "interval": ">1s", + "legend": { + "alignAsTable": true, + "avg": true, + "current": false, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 0.5, + "points": true, + "renderer": "flot", + "seriesOverrides": [ + { + "alias": "Num Errors", + "color": "#BF1B00" + } + ], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + } + ], + "measurement": "http_req_failed", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ERRor Per Second", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 6, + "x": 6, + "y": 16 + }, + "id": 74, + "interval": ">1s", + "links": [], + "options": { + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "alias": "$tag_check", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + } + ], + "measurement": "http_req_failed", + "orderByTime": "ASC", + "policy": "default", + "refId": "C", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "sum" + } + ] + ], + "tags": [] + } + ], + "timeFrom": null, + "timeShift": null, + "title": "ERROrR Per Second", + "type": "gauge" + }, + { + "collapsed": false, + "datasource": null, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 23 + }, + "id": 70, + "panels": [], + "repeat": "Measurement", + "title": "$Measurement", + "type": "row" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 24 + }, + "id": 11, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "mean" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (mean)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 24 + }, + "id": 14, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (max)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 24 + }, + "id": 15, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "median" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (med)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 24 + }, + "id": 16, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (min)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 24 + }, + "id": 12, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p90)", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "k6influxdb", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 24 + }, + "id": 13, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "8.0.5", + "targets": [ + { + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (p95)", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "k6influxdb", + "description": "Grouped by 1 sec intervals", + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 27 + }, + "height": "250px", + "hiddenSeries": false, + "id": 5, + "interval": ">1s", + "legend": { + "alignAsTable": false, + "avg": false, + "current": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "8.0.5", + "pointradius": 1, + "points": true, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "max", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "max" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "p90", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "F", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + "90" + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "p95", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "G", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [ + 95 + ], + "type": "percentile" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + }, + { + "alias": "min", + "dsType": "influxdb", + "groupBy": [ + { + "params": [ + "$__interval" + ], + "type": "time" + }, + { + "params": [ + "null" + ], + "type": "fill" + } + ], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "H", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + }, + { + "params": [], + "type": "min" + } + ] + ], + "tags": [ + { + "key": "name", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "$Measurement (over time)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "decimals": null, + "format": "ms", + "label": "", + "logBase": 2, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "cards": { + "cardPadding": null, + "cardRound": null + }, + "color": { + "cardColor": "rgb(0, 234, 255)", + "colorScale": "sqrt", + "colorScheme": "interpolateRdYlGn", + "exponent": 0.5, + "mode": "spectrum" + }, + "dataFormat": "timeseries", + "datasource": "k6influxdb", + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 27 + }, + "heatmap": {}, + "height": "250px", + "hideZeroBuckets": false, + "highlightCards": true, + "id": 8, + "interval": ">1s", + "legend": { + "show": false + }, + "links": [], + "reverseYBuckets": false, + "targets": [ + { + "dsType": "influxdb", + "groupBy": [], + "hide": false, + "measurement": "/^$Measurement$/", + "orderByTime": "ASC", + "policy": "default", + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "value" + ], + "type": "field" + } + ] + ], + "tags": [ + { + "key": "url", + "operator": "=~", + "value": "/^$URL$/" + } + ] + } + ], + "title": "$Measurement (over time)", + "tooltip": { + "show": true, + "showHistogram": true + }, + "tooltipDecimals": null, + "type": "heatmap", + "xAxis": { + "show": true + }, + "xBucketNumber": null, + "xBucketSize": null, + "yAxis": { + "decimals": null, + "format": "ms", + "logBase": 2, + "max": null, + "min": null, + "show": true, + "splitFactor": null + }, + "yBucketBound": "auto", + "yBucketNumber": null, + "yBucketSize": null + } + ], + "refresh": false, + "schemaVersion": 30, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": { + "selected": true, + "tags": [], + "text": "http_req_duration", + "value": [ + "http_req_duration" + ] + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "Measurement", + "options": [ + { + "selected": false, + "text": "All", + "value": "$__all" + }, + { + "selected": true, + "text": "http_req_duration", + "value": "http_req_duration" + }, + { + "selected": false, + "text": "http_req_blocked", + "value": "http_req_blocked" + }, + { + "selected": false, + "text": "http_req_connecting", + "value": "http_req_connecting" + }, + { + "selected": false, + "text": "http_req_looking_up", + "value": "http_req_looking_up" + }, + { + "selected": false, + "text": "http_req_receiving", + "value": "http_req_receiving" + }, + { + "selected": false, + "text": "http_req_sending", + "value": "http_req_sending" + }, + { + "selected": false, + "text": "http_req_waiting", + "value": "http_req_waiting" + } + ], + "query": "http_req_duration,http_req_blocked,http_req_connecting,http_req_looking_up,http_req_receiving,http_req_sending,http_req_waiting", + "skipUrlSync": false, + "type": "custom" + }, + { + "allValue": "*", + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "datasource": "k6influxdb", + "definition": "", + "description": null, + "error": null, + "hide": 0, + "includeAll": true, + "label": "URL", + "multi": false, + "name": "URL", + "options": [], + "query": "SHOW TAG VALUES FROM \"http_req_duration\" WITH KEY = \"name\"", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "2021-09-20T00:08:50.069Z", + "to": "2021-09-20T16:08:50.069Z" + }, + "timepicker": { + "refresh_intervals": [ + "1s", + "10s", + "30s", + "5m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "browser", + "title": "k6 Load Testing Results", + "uid": "lenB9WN7k", + "version": 2 +} diff --git a/helm/helmk6/templates/NOTES.txt b/helm/helmk6/templates/NOTES.txt new file mode 100644 index 0000000..4eaa9db --- /dev/null +++ b/helm/helmk6/templates/NOTES.txt @@ -0,0 +1,23 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "k6.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "k6.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "k6.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "k6.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} + \ No newline at end of file diff --git a/helm/helmk6/templates/_helpers.tpl b/helm/helmk6/templates/_helpers.tpl new file mode 100644 index 0000000..e9cf59f --- /dev/null +++ b/helm/helmk6/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "k6.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "k6.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "k6.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "k6.labels" -}} +helm.sh/chart: {{ include "k6.chart" . }} +{{ include "k6.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "k6.selectorLabels" -}} +app.kubernetes.io/name: {{ include "k6.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "k6.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "k6.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/helm/helmk6/templates/configmap.yaml b/helm/helmk6/templates/configmap.yaml new file mode 100644 index 0000000..6cbd19b --- /dev/null +++ b/helm/helmk6/templates/configmap.yaml @@ -0,0 +1,42 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: k6-scripts +data: + nginx-test.js: | + import http from 'k6/http'; + import { check , sleep} from 'k6'; + export let options = { + stages: [ + { target: {{ .Values.target.virtualuser }}, duration: {{ .Values.target.duration | quote }} } + + ],insecureSkipTLSVerify: true + }; + + //const data = JSON.parse(open("/input/uploadfile/dashboard.json")); + + + export default function () { + + {{if .Values.target.fileUpload.enabled}} + const res = http.post('http://{{ .Values.target.host }}:{{ .Values.target.port }}/api/dashboards/db',JSON.stringify(data), + { headers: { 'Accept': 'application/json', + 'Authorization': 'Bearer {{ .Values.target.fileUpload.token }}', + 'Content-Type': 'application/json' + } + }); + + check(res, { 'is status 200': (r) => r.status === 200, }); + + {{else if .Values.target.nifirunflow.enabled}} + const API_TOKEN = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VybmFtZSIsImlzcyI6IlNpbmdsZVVzZXJMb2dpbklkZW50aXR5UHJvdmlkZXIiLCJhdWQiOiJTaW5nbGVVc2VyTG9naW5JZGVudGl0eVByb3ZpZGVyIiwicHJlZmVycmVkX3VzZXJuYW1lIjoidXNlcm5hbWUiLCJraWQiOjEsImV4cCI6MTYzNjA0Njg1MiwiaWF0IjoxNjM2MDE4MDUyfQ.R14PAaB9FuDRE-OcUvoQMjqLta2Z0cBN3PDvt2s4WJY"; + const responses = http.put('https://{{ .Values.target.host }}:{{ .Values.target.port }}/nifi-api/flow/process-groups/{{ .Values.target.nifirunflow.idprocessgroup }}',JSON.stringify({"id":{{ .Values.target.nifirunflow.idprocessgroup | quote }},"state":{{ .Values.target.nifirunflow.status | quote }}}),{headers: { 'Content-Type': 'application/json', "Authorization": `Bearer ${API_TOKEN}` } }); + + check(responses, { 'is status 200': (r) => r.status === 200, }); + + {{else}} + + const result = http.get('http://{{ .Values.target.host }}:{{ .Values.target.port }}'); + check(result, { 'http response status code is 200': result.status === 200, }); + {{end}} + } \ No newline at end of file diff --git a/helm/helmk6/templates/cron.yaml b/helm/helmk6/templates/cron.yaml new file mode 100644 index 0000000..354a058 --- /dev/null +++ b/helm/helmk6/templates/cron.yaml @@ -0,0 +1,39 @@ +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: k6-test +spec: + schedule: {{ .Values.conf.schedule | quote }} + jobTemplate: + spec: + template: + spec: + containers: + - name: k6 + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + env: + - name: K6_OUT + value: influxdb=http://{{ .Release.Name }}-influxdb:8086/k6 + - name: TARGET_HOSTNAME + value: nginx-service.default.svc.cluster.local + args: + - run + - /scripts/nginx-test.js + volumeMounts: + - name: scripts-vol + mountPath: /scripts + {{ if .Values.target.fileUpload.enabled }} + - name: dashboard-vol + mountPath: /input/uploadfile + {{end}} + restartPolicy: Never + volumes: + - name: scripts-vol + configMap: + name: k6-scripts + {{ if .Values.target.fileUpload.enabled }} + - name: dashboard-vol + configMap: + name: k6-dashboard + + {{ end }} \ No newline at end of file diff --git a/helm/helmk6/templates/fileupload.yaml b/helm/helmk6/templates/fileupload.yaml new file mode 100644 index 0000000..dc340fb --- /dev/null +++ b/helm/helmk6/templates/fileupload.yaml @@ -0,0 +1,207 @@ + {{if .Values.target.fileUpload.enabled}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: k6-dashboard +data: + dashboard.json: | + { + "dashboard": { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": {}, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "7.3.5", + "timeFrom": null, + "timeShift": null, + "title": "Panel Title", + "type": "gauge" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": null, + "fieldConfig": { + "defaults": { + "custom": { + "align": null, + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 2, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.3.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Panel Title", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + + "style": "dark", + + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + + "id": null, + "uid": null, + "title": "Production Overview", + "tags": [ "templated" ], + "timezone": "browser", + "schemaVersion": 16, + "version": 0, + "refresh": "25s" + }, + "folderId": null, + "folderUid": null, + "message": "Made changes to xyz", + "overwrite": true + } + + + + {{end}} diff --git a/helm/helmk6/templates/hpa.yaml b/helm/helmk6/templates/hpa.yaml new file mode 100644 index 0000000..8cbd352 --- /dev/null +++ b/helm/helmk6/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "k6.fullname" . }} + labels: + {{- include "k6.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "k6.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/helm/helmk6/templates/ingress.yaml b/helm/helmk6/templates/ingress.yaml new file mode 100644 index 0000000..69357a3 --- /dev/null +++ b/helm/helmk6/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "k6.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "k6.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/helm/helmk6/templates/serviceaccount.yaml b/helm/helmk6/templates/serviceaccount.yaml new file mode 100644 index 0000000..ecc0bc1 --- /dev/null +++ b/helm/helmk6/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "k6.serviceAccountName" . }} + labels: + {{- include "k6.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/helm/helmk6/templates/tests/test-connection.yaml b/helm/helmk6/templates/tests/test-connection.yaml new file mode 100644 index 0000000..eb56a01 --- /dev/null +++ b/helm/helmk6/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "k6.fullname" . }}-test-connection" + labels: + {{- include "k6.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "k6.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/helm/helmk6/values.yaml b/helm/helmk6/values.yaml new file mode 100644 index 0000000..27fe5b8 --- /dev/null +++ b/helm/helmk6/values.yaml @@ -0,0 +1,139 @@ +# Default values for k6. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: loadimpact/k6 + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "0.34.1" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service accdebianount should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 +service: + type: ClusterIP + port: 80 + +influxdb: + authEnabled: false + adminUser: + name: admin + pwd: changeme + architecture: standalone + database: k6 + +grafana: + enabled: true + env: { + GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin", + GF_AUTH_ANONYMOUS_ENABLED: "true", + GF_AUTH_BASIC_ENABLED: "false"} + service: + type: NodePort + port: 3000 + datasources: + datasources.yaml: + apiVersion: 1 + datasources: + # name of the datasource. Required + + # datasource type. Require + - name: k6influxdb + type: influxdb + access: proxy + database: k6 + url: http://{{ .Release.Name }}-influxdb:8086 + user: admin + password: changeme + isDefault: true + editable: true + - name: k6prometheus + type: prometheus + access: proxy + url: http://{{ .Release.Name }}-kube-prometheus-prometheus:9090 + user: admin + password: changeme + editable: true + +target: + virtualuser: 100 + duration: "15s" + host: 172.31.198.141 + port: 30490 + fileUpload: + enabled: false + token: eyJrIjoiM2xMeW5QcjczbzsRQZzRzNzIzTXpraTZUN3FYTU1GelYiLCJuIjoia2V5LXRva2VuIiwiaWQiOjF9 + nifirunflow: + enabled: false + idprocessgroup: "ea32e7d1-017c-1000-ea16-ed74a83f2fc7" + status: "RUNNING" + +conf: + schedule: "*/3 * * * *" + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 400m + memory: 1280Mi + requests: + cpu: 400m + memory: 1280Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} +