diff --git a/codebundles/azure-adf-health/runbook.robot b/codebundles/azure-adf-health/runbook.robot index d74dc7215..d143052f9 100755 --- a/codebundles/azure-adf-health/runbook.robot +++ b/codebundles/azure-adf-health/runbook.robot @@ -340,12 +340,13 @@ Suite Initialization ... type=string ... description=Azure resource group. ... pattern=\w* - ${LOOKBACK_PERIOD}= RW.Core.Import User Variable LOOKBACK_PERIOD + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string - ... description=The lookback period for querying failed pipelines (e.g., 1d, 7d, 30d). + ... description=The lookback window for querying failed pipelines (e.g., 1d, 7d, 30d). ... pattern=\w* ... default=7d ... example=1d + ${LOOKBACK_PERIOD}= Set Variable ${LOOKBACK_WINDOW} ${THRESHOLD_MB}= RW.Core.Import User Variable THRESHOLD_MB ... type=string ... description=The threshold for data volume in MB. diff --git a/codebundles/azure-aks-triage/.runwhen/templates/azure-aks-triage-taskset.yaml b/codebundles/azure-aks-triage/.runwhen/templates/azure-aks-triage-taskset.yaml index d0c11a11c..b6ff43783 100644 --- a/codebundles/azure-aks-triage/.runwhen/templates/azure-aks-triage-taskset.yaml +++ b/codebundles/azure-aks-triage/.runwhen/templates/azure-aks-triage-taskset.yaml @@ -21,13 +21,12 @@ spec: ref: main {% endif %} pathToRobot: codebundles/azure-aks-triage/runbook.robot + lookbackWindow: 60m configProvided: - name: AZ_RESOURCE_GROUP value: {{resource_group.name}} - name: AKS_CLUSTER value: {{match_resource.resource.name}} - - name: TIME_PERIOD_MINUTES - value: "60" - name: AZURE_RESOURCE_SUBSCRIPTION_ID value: "{{ subscription_id }}" - name: AZURE_SUBSCRIPTION_NAME diff --git a/codebundles/azure-aks-triage/runbook.robot b/codebundles/azure-aks-triage/runbook.robot index 2dbe16b8a..784319c92 100644 --- a/codebundles/azure-aks-triage/runbook.robot +++ b/codebundles/azure-aks-triage/runbook.robot @@ -130,11 +130,12 @@ Suite Initialization ... type=string ... description=The Azure AKS cluster to triage. ... pattern=\w* - ${TIME_PERIOD_MINUTES}= RW.Core.Import User Variable TIME_PERIOD_MINUTES + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time period, in minutes, to look back for activites/events. ... pattern=\w* ... default=60 + ${TIME_PERIOD_MINUTES}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} ${AZURE_RESOURCE_SUBSCRIPTION_ID}= RW.Core.Import User Variable AZURE_RESOURCE_SUBSCRIPTION_ID ... type=string ... description=The Azure Subscription ID for the resource. diff --git a/codebundles/azure-apim-health/runbook.robot b/codebundles/azure-apim-health/runbook.robot index 017b05605..1cc3a78e1 100644 --- a/codebundles/azure-apim-health/runbook.robot +++ b/codebundles/azure-apim-health/runbook.robot @@ -505,11 +505,12 @@ Suite Initialization ... type=string ... description=The APIM Instance Name ... pattern=\w* - ${TIME_PERIOD_MINUTES}= RW.Core.Import User Variable TIME_PERIOD_MINUTES + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time period, in minutes, to look back for activites/events. ... pattern=\w* ... default=60 + ${TIME_PERIOD_MINUTES}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${AZURE_RESOURCE_SUBSCRIPTION_ID}= RW.Core.Import User Variable AZURE_RESOURCE_SUBSCRIPTION_ID ... type=string ... description=The Azure Subscription ID for the resource. diff --git a/codebundles/azure-appservice-functionapp-health/.runwhen/templates/azure-appservice-function-health-taskset.yaml b/codebundles/azure-appservice-functionapp-health/.runwhen/templates/azure-appservice-function-health-taskset.yaml index 140cbe249..7784d3c9e 100755 --- a/codebundles/azure-appservice-functionapp-health/.runwhen/templates/azure-appservice-function-health-taskset.yaml +++ b/codebundles/azure-appservice-functionapp-health/.runwhen/templates/azure-appservice-function-health-taskset.yaml @@ -21,13 +21,12 @@ spec: ref: main {% endif %} pathToRobot: codebundles/azure-appservice-functionapp-health/runbook.robot + lookbackWindow: 10m configProvided: - name: AZ_RESOURCE_GROUP value: {{resource_group.name}} - name: FUNCTION_APP_NAME value: {{match_resource.resource.name}} - - name: TIME_PERIOD_MINUTES - value: "10" - name: AZURE_RESOURCE_SUBSCRIPTION_ID value: "{{ subscription_id }}" - name: AZURE_SUBSCRIPTION_NAME diff --git a/codebundles/azure-appservice-functionapp-health/runbook.robot b/codebundles/azure-appservice-functionapp-health/runbook.robot index 8a326327c..24252f97c 100755 --- a/codebundles/azure-appservice-functionapp-health/runbook.robot +++ b/codebundles/azure-appservice-functionapp-health/runbook.robot @@ -538,11 +538,12 @@ Suite Initialization ... description=The Azure Subscription ID for the resource. ... pattern=\w* ... default="" - ${TIME_PERIOD_MINUTES}= RW.Core.Import User Variable TIME_PERIOD_MINUTES + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time period, in minutes, to look back for activites/events. ... pattern=\w* ... default=10 + ${TIME_PERIOD_MINUTES}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${TIME_PERIOD_DAYS}= RW.Core.Import User Variable TIME_PERIOD_DAYS ... type=string ... description=The time period, in days, to look back for recommendations and notifications. diff --git a/codebundles/azure-appservice-plan-health/runbook.robot b/codebundles/azure-appservice-plan-health/runbook.robot index 1fdc33f24..94cc44100 100644 --- a/codebundles/azure-appservice-plan-health/runbook.robot +++ b/codebundles/azure-appservice-plan-health/runbook.robot @@ -270,11 +270,12 @@ Suite Initialization ... description=Azure subscription name. ... pattern=\w* ... default="" - ${AZURE_ACTIVITY_LOG_OFFSET}= RW.Core.Import User Variable AZURE_ACTIVITY_LOG_OFFSET + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=Time offset for activity log collection (e.g., 24h, 7d) (default: 24h) ... pattern=\w+ ... default=24h + ${AZURE_ACTIVITY_LOG_OFFSET}= Set Variable ${LOOKBACK_WINDOW} ${CPU_THRESHOLD}= RW.Core.Import User Variable CPU_THRESHOLD ... type=string ... description=CPU usage threshold percentage for high usage alerts (default: 80) diff --git a/codebundles/azure-appservice-webapp-health/.runwhen/templates/azure-appservice-webapp-health-taskset.yaml b/codebundles/azure-appservice-webapp-health/.runwhen/templates/azure-appservice-webapp-health-taskset.yaml index 92ba0e889..4e1e1d4b0 100644 --- a/codebundles/azure-appservice-webapp-health/.runwhen/templates/azure-appservice-webapp-health-taskset.yaml +++ b/codebundles/azure-appservice-webapp-health/.runwhen/templates/azure-appservice-webapp-health-taskset.yaml @@ -21,6 +21,7 @@ spec: ref: main {% endif %} pathToRobot: codebundles/azure-appservice-webapp-health/runbook.robot + lookbackWindow: 10m configProvided: - name: AZ_RESOURCE_GROUP value: {{resource_group.name}} @@ -30,8 +31,6 @@ spec: value: "{{ subscription_id }}" - name: AZURE_SUBSCRIPTION_NAME value: "{{ subscription_name }}" - - name: TIME_PERIOD_MINUTES - value: "10" secretsProvided: {% if wb_version %} {% include "azure-auth.yaml" ignore missing %} diff --git a/codebundles/azure-appservice-webapp-health/runbook.robot b/codebundles/azure-appservice-webapp-health/runbook.robot index 15247ed7e..b474c38cc 100644 --- a/codebundles/azure-appservice-webapp-health/runbook.robot +++ b/codebundles/azure-appservice-webapp-health/runbook.robot @@ -479,11 +479,12 @@ Suite Initialization ... description=The Azure Subscription ID for the resource. ... pattern=\w* ... default="" - ${TIME_PERIOD_MINUTES}= RW.Core.Import User Variable TIME_PERIOD_MINUTES + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time period, in minutes, to look back for activites/events. ... pattern=\w* ... default=10 + ${TIME_PERIOD_MINUTES}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${CPU_THRESHOLD}= RW.Core.Import User Variable CPU_THRESHOLD ... type=string ... description=The CPU % threshold in which to generate an issue. diff --git a/codebundles/azure-appservice-webapp-ops/.runwhen/templates/azure-appservice-webapp-ops-taskset.yaml b/codebundles/azure-appservice-webapp-ops/.runwhen/templates/azure-appservice-webapp-ops-taskset.yaml index 4bc2ad905..80bbb27ac 100644 --- a/codebundles/azure-appservice-webapp-ops/.runwhen/templates/azure-appservice-webapp-ops-taskset.yaml +++ b/codebundles/azure-appservice-webapp-ops/.runwhen/templates/azure-appservice-webapp-ops-taskset.yaml @@ -21,13 +21,12 @@ spec: ref: main {% endif %} pathToRobot: codebundles/azure-appservice-webapp-ops/runbook.robot + lookbackWindow: 10m configProvided: - name: AZ_RESOURCE_GROUP value: {{resource_group.name}} - name: APP_SERVICE_NAME value: {{match_resource.resource.name}} - - name: TIME_PERIOD_MINUTES - value: "10" - name: SCALE_OUT_FACTOR value: "2" - name: SCALE_IN_FACTOR diff --git a/codebundles/azure-appservice-webapp-ops/runbook.robot b/codebundles/azure-appservice-webapp-ops/runbook.robot index 6e638cec6..349792ab2 100644 --- a/codebundles/azure-appservice-webapp-ops/runbook.robot +++ b/codebundles/azure-appservice-webapp-ops/runbook.robot @@ -214,11 +214,12 @@ Suite Initialization ... description=The Azure Subscription ID for the resource. ... pattern=\w* ... default="" - ${TIME_PERIOD_MINUTES}= RW.Core.Import User Variable TIME_PERIOD_MINUTES + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time period, in minutes, to look back for activites/events. ... pattern=\w* ... default=10 + ${TIME_PERIOD_MINUTES}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${SCALE_OUT_FACTOR}= RW.Core.Import User Variable SCALE_OUT_FACTOR ... type=string ... description=The factor by which to increase the amount of instances within the given App Service Plan. diff --git a/codebundles/azure-kv-health/runbook.robot b/codebundles/azure-kv-health/runbook.robot index 211c31050..f795add86 100755 --- a/codebundles/azure-kv-health/runbook.robot +++ b/codebundles/azure-kv-health/runbook.robot @@ -303,11 +303,12 @@ Suite Initialization ... description=Interval for latency metrics (format: PT1H, PT30M, PT5M, etc.) ... default=PT1H ... example=PT5M - ${TIME_RANGE}= RW.Core.Import User Variable TIME_RANGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=integer ... description=Time range in hours to look back for metrics ... default=24 ... example=24 + ${TIME_RANGE}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${LOG_QUERY_DAYS}= RW.Core.Import User Variable LOG_QUERY_DAYS ... type=string ... description=Time range for log queries (format: 1d, 7d, 30d, etc.) diff --git a/codebundles/azure-loadbalancer-triage/.runwhen/templates/az-lb-health-taskset.yaml b/codebundles/azure-loadbalancer-triage/.runwhen/templates/az-lb-health-taskset.yaml index ef67f307f..00d6449d8 100644 --- a/codebundles/azure-loadbalancer-triage/.runwhen/templates/az-lb-health-taskset.yaml +++ b/codebundles/azure-loadbalancer-triage/.runwhen/templates/az-lb-health-taskset.yaml @@ -21,9 +21,8 @@ spec: ref: main {% endif %} pathToRobot: codebundles/azure-loadbalancer-triage/runbook.robot + lookbackWindow: 24h configProvided: - - name: AZ_HISTORY_RANGE - value: '24' - name: AZ_LB_NAME value: {{match_resource.resource.name}} - name: AZ_LB_ID diff --git a/codebundles/azure-loadbalancer-triage/runbook.robot b/codebundles/azure-loadbalancer-triage/runbook.robot index 4c943ba77..bd67db3d7 100644 --- a/codebundles/azure-loadbalancer-triage/runbook.robot +++ b/codebundles/azure-loadbalancer-triage/runbook.robot @@ -48,13 +48,14 @@ Suite Initialization ... type=string ... description=The secret containing AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, AZURE_SUBSCRIPTION_ID ... pattern=\w* - ${AZ_HISTORY_RANGE}= RW.Core.Import User Variable - ... AZ_HISTORY_RANGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable + ... LOOKBACK_WINDOW ... type=string ... description=The range of history to check for incidents in the activity log, in hours. ... pattern=\w* ... default=24 ... example=24 + ${AZ_HISTORY_RANGE}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${AZ_LB_NAME}= RW.Core.Import User Variable ... AZ_LB_NAME ... type=string diff --git a/codebundles/azure-vmss-triage/.runwhen/templates/azure-vmss-triage-taskset.yaml b/codebundles/azure-vmss-triage/.runwhen/templates/azure-vmss-triage-taskset.yaml index 3375a8f8c..9d65abb10 100644 --- a/codebundles/azure-vmss-triage/.runwhen/templates/azure-vmss-triage-taskset.yaml +++ b/codebundles/azure-vmss-triage/.runwhen/templates/azure-vmss-triage-taskset.yaml @@ -21,13 +21,12 @@ spec: ref: main {% endif %} pathToRobot: codebundles/azure-vmss-triage/runbook.robot + lookbackWindow: 60m configProvided: - name: AZ_RESOURCE_GROUP value: {{resource_group.name}} - name: VMSCALESET value: {{match_resource.resource.name}} - - name: TIME_PERIOD_MINUTES - value: "60" - name: AZURE_RESOURCE_SUBSCRIPTION_ID value: "{{ subscription_id }}" - name: AZURE_SUBSCRIPTION_NAME diff --git a/codebundles/azure-vmss-triage/runbook.robot b/codebundles/azure-vmss-triage/runbook.robot index 0ca24334b..4f1ef9764 100644 --- a/codebundles/azure-vmss-triage/runbook.robot +++ b/codebundles/azure-vmss-triage/runbook.robot @@ -82,11 +82,12 @@ Suite Initialization ... type=string ... description=The Azure Virtual Machine Scale Set to triage. ... pattern=\w* - ${TIME_PERIOD_MINUTES}= RW.Core.Import User Variable TIME_PERIOD_MINUTES + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time period, in minutes, to look back for activites/events. ... pattern=\w* ... default=60 + ${TIME_PERIOD_MINUTES}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${azure_credentials}= RW.Core.Import Secret ... azure_credentials ... type=string diff --git a/codebundles/curl-gmp-kong-ingress-inspection/runbook.robot b/codebundles/curl-gmp-kong-ingress-inspection/runbook.robot index 6714efa4c..52161fee2 100644 --- a/codebundles/curl-gmp-kong-ingress-inspection/runbook.robot +++ b/codebundles/curl-gmp-kong-ingress-inspection/runbook.robot @@ -143,12 +143,13 @@ Suite Initialization ... pattern=\w* ... example=5.* (matches any 500 error code) ... default=5.* - ${TIME_SLICE}= RW.Core.Import User Variable TIME_SLICE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=Specify the window of time used to measure the rate. ... pattern=\w* ... example=1m ... default=1m + ${TIME_SLICE}= Set Variable ${LOOKBACK_WINDOW} ${HTTP_ERROR_RATE_THRESHOLD}= RW.Core.Import User Variable HTTP_ERROR_RATE_THRESHOLD ... type=string ... description=Specify the error rate threshold that is considered unhealthy. Measured in errors/s. diff --git a/codebundles/curl-gmp-nginx-ingress-inspection/runbook.robot b/codebundles/curl-gmp-nginx-ingress-inspection/runbook.robot index 28ff08b3f..9aecc6a32 100644 --- a/codebundles/curl-gmp-nginx-ingress-inspection/runbook.robot +++ b/codebundles/curl-gmp-nginx-ingress-inspection/runbook.robot @@ -135,13 +135,13 @@ Suite Initialization ... description=The name of the ingress object in Kubernetes. ... pattern=\w* ... example=frontend-external - ${TIME_SLICE}= RW.Core.Import User Variable TIME_SLICE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The amount of time to perform aggregations over. ... pattern=\w* ... example=60m ... default=60m - Set Suite Variable ${TIME_SLICE} ${TIME_SLICE} + ${TIME_SLICE}= Set Variable ${LOOKBACK_WINDOW} ${ERROR_CODES}= RW.Core.Import User Variable ERROR_CODES ... type=string ... description=Which http status codes to look for and classify as errors. @@ -159,6 +159,7 @@ Suite Initialization Set Suite Variable ${INGRESS_HOST} ${INGRESS_HOST} Set Suite Variable ${INGRESS_SERVICE} ${INGRESS_SERVICE} Set Suite Variable ${INGRESS_OBJECT_NAME} ${INGRESS_OBJECT_NAME} + Set Suite Variable ${TIME_SLICE} ${TIME_SLICE} Set Suite Variable ... ${env} ... {"CLOUDSDK_CORE_PROJECT":"${GCP_PROJECT_ID}","GOOGLE_APPLICATION_CREDENTIALS":"./${gcp_credentials_json.key}", "KUBECONFIG":"./${kubeconfig.key}","PATH":"$PATH:${OS_PATH}"} diff --git a/codebundles/gcloud-node-preempt/.runwhen/templates/gcloud-node-preempt-taskset.yaml b/codebundles/gcloud-node-preempt/.runwhen/templates/gcloud-node-preempt-taskset.yaml index 3fe7a7773..7d1825b62 100644 --- a/codebundles/gcloud-node-preempt/.runwhen/templates/gcloud-node-preempt-taskset.yaml +++ b/codebundles/gcloud-node-preempt/.runwhen/templates/gcloud-node-preempt-taskset.yaml @@ -21,13 +21,12 @@ spec: ref: main {% endif %} pathToRobot: codebundles/gcloud-node-preempt/runbook.robot + lookbackWindow: 30m intervalStrategy: intermezzo intervalSeconds: 300 configProvided: - name: GCP_PROJECT_ID value: {{match_resource.resource.project_id}} - - name: AGE - value: '30' secretsProvided: - name: gcp_credentials_json workspaceKey: {{custom.gcp_ops_suite_sa}} \ No newline at end of file diff --git a/codebundles/gcloud-node-preempt/runbook.robot b/codebundles/gcloud-node-preempt/runbook.robot index e11a00ca8..861020f6c 100644 --- a/codebundles/gcloud-node-preempt/runbook.robot +++ b/codebundles/gcloud-node-preempt/runbook.robot @@ -49,12 +49,13 @@ Suite Initialization ... description=The GCP Project ID to scope the API to. ... pattern=\w* ... example=myproject-ID - ${AGE}= RW.Core.Import User Variable AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age, in minutes, since the preempt event. ... pattern=\d+ ... default=30 ... example=30 + ${AGE}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${OS_PATH}= Get Environment Variable PATH Set Suite Variable ${GCP_PROJECT_ID} ${GCP_PROJECT_ID} Set Suite Variable ${gcp_credentials_json} ${gcp_credentials_json} diff --git a/codebundles/gh-actions-artifact-analysis/runbook.robot b/codebundles/gh-actions-artifact-analysis/runbook.robot index f1ec5f94b..56d052659 100644 --- a/codebundles/gh-actions-artifact-analysis/runbook.robot +++ b/codebundles/gh-actions-artifact-analysis/runbook.robot @@ -90,12 +90,13 @@ Suite Initialization ... description=The GitHub Token used to access the repository. ... pattern=\w* ... default='' - ${PERIOD_HOURS}= RW.Core.Import User Variable PERIOD_HOURS + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The amount of hours to condider for a healthy last workflow run. ... pattern=\w* ... example=24 ... default=24 + ${PERIOD_HOURS}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${ISSUE_SEARCH_STRING}= RW.Core.Import User Variable ISSUE_SEARCH_STRING ... type=string ... description=A string that, if found in the analysis output, will generate an Issue. diff --git a/codebundles/gh-actions-health/runbook.robot b/codebundles/gh-actions-health/runbook.robot index 667861f11..17b776dbd 100644 --- a/codebundles/gh-actions-health/runbook.robot +++ b/codebundles/gh-actions-health/runbook.robot @@ -387,12 +387,13 @@ Suite Initialization ... pattern=^\d+$ ... example=70 ... default=70 - ${FAILURE_LOOKBACK_DAYS}= RW.Core.Import User Variable FAILURE_LOOKBACK_DAYS + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=Number of days to look back for workflow failures. Accepts partial numbers (e.g. 0.04 = 1h) ... pattern=^\d+$ ... example=1 ... default=1 + ${FAILURE_LOOKBACK_DAYS}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 ${MAX_REPOS_TO_ANALYZE}= RW.Core.Import User Variable MAX_REPOS_TO_ANALYZE ... type=string ... description=Maximum number of repositories to analyze when GITHUB_REPOS is 'ALL' (0 for unlimited) diff --git a/codebundles/gke-cluster-health/runbook.robot b/codebundles/gke-cluster-health/runbook.robot index eb806f0bb..3e3275da5 100755 --- a/codebundles/gke-cluster-health/runbook.robot +++ b/codebundles/gke-cluster-health/runbook.robot @@ -58,12 +58,13 @@ Suite Initialization ... pattern=\w* ... default=2 ... example=2 - ${NODE_HEALTH_LOOKBACK_HOURS}= RW.Core.Import User Variable NODE_HEALTH_LOOKBACK_HOURS + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time (in hours) to look back for node pool events and compute operations when checking node health. ... pattern=\w* ... default=24 ... example=24 + ${NODE_HEALTH_LOOKBACK_HOURS}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 Set Suite Variable ${GCP_PROJECT_ID} ${GCP_PROJECT_ID} Set Suite Variable ${gcp_credentials_json} ${gcp_credentials_json} Set Suite Variable diff --git a/codebundles/k8s-app-troubleshoot/.runwhen/templates/k8s-app-troubleshoot-taskset.yaml b/codebundles/k8s-app-troubleshoot/.runwhen/templates/k8s-app-troubleshoot-taskset.yaml index 476ded301..109406e14 100644 --- a/codebundles/k8s-app-troubleshoot/.runwhen/templates/k8s-app-troubleshoot-taskset.yaml +++ b/codebundles/k8s-app-troubleshoot/.runwhen/templates/k8s-app-troubleshoot-taskset.yaml @@ -20,6 +20,7 @@ spec: ref: main {% endif %} pathToRobot: codebundles/k8s-app-troubleshoot/runbook.robot + lookbackWindow: 60m configProvided: - name: NAMESPACE value: {{match_resource.resource.metadata.namespace}} @@ -31,8 +32,6 @@ spec: value: '10' - name: CREATE_ISSUES value: 'YES' - - name: LOGS_SINCE - value: 60m - name: EXCLUDE_PATTERN value: Placeholder - name: MAX_LOG_LINES diff --git a/codebundles/k8s-app-troubleshoot/runbook.robot b/codebundles/k8s-app-troubleshoot/runbook.robot index 18f6bd088..a0efb3b11 100644 --- a/codebundles/k8s-app-troubleshoot/runbook.robot +++ b/codebundles/k8s-app-troubleshoot/runbook.robot @@ -179,13 +179,14 @@ Suite Initialization ... enum=[YES,NO] ... example=YES ... default=YES - ${LOGS_SINCE}= RW.Core.Import User Variable - ... LOGS_SINCE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable + ... LOOKBACK_WINDOW ... type=string ... description=How far back to fetch logs from containers in Kubernetes. Making this too recent and running the codebundle often could cause adverse performance. ... pattern=\w* ... example=15m ... default=15m + ${LOGS_SINCE}= Set Variable ${LOOKBACK_WINDOW} ${EXCLUDE_PATTERN}= RW.Core.Import User Variable ... EXCLUDE_PATTERN ... type=string diff --git a/codebundles/k8s-cluster-node-health/.runwhen/templates/k8s-cluster-node-health-taskset.yaml b/codebundles/k8s-cluster-node-health/.runwhen/templates/k8s-cluster-node-health-taskset.yaml index eaa57c56f..11c7d3b51 100644 --- a/codebundles/k8s-cluster-node-health/.runwhen/templates/k8s-cluster-node-health-taskset.yaml +++ b/codebundles/k8s-cluster-node-health/.runwhen/templates/k8s-cluster-node-health-taskset.yaml @@ -20,13 +20,12 @@ spec: ref: main {% endif %} pathToRobot: codebundles/k8s-cluster-node-health/runbook.robot + lookbackWindow: 10m configProvided: - name: CONTEXT value: "{{cluster.context}}" - name: KUBERNETES_DISTRIBUTION_BINARY value: {{custom.kubernetes_distribution_binary}} - - name: INTERVAL - value: "10 minutes" secretsProvided: {% if wb_version %} {% include "kubernetes-auth.yaml" ignore missing %} diff --git a/codebundles/k8s-cluster-node-health/runbook.robot b/codebundles/k8s-cluster-node-health/runbook.robot index 34b6ea2b7..629756aa3 100644 --- a/codebundles/k8s-cluster-node-health/runbook.robot +++ b/codebundles/k8s-cluster-node-health/runbook.robot @@ -59,12 +59,13 @@ Suite Initialization ... pattern=\w* ... default=default ... example=my-main-cluster - ${INTERVAL}= RW.Core.Import User Variable INTERVAL + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time interval in which to look back for node events. ... pattern=\w* ... default=10 minutes ... example=4 hours, 5 minutes, etc. + ${INTERVAL}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 2 Set Suite Variable ${KUBERNETES_DISTRIBUTION_BINARY} ${KUBERNETES_DISTRIBUTION_BINARY} Set Suite Variable ${kubeconfig} ${kubeconfig} Set Suite Variable ${CONTEXT} ${CONTEXT} diff --git a/codebundles/k8s-daemonset-healthcheck/runbook.robot b/codebundles/k8s-daemonset-healthcheck/runbook.robot index 04d1950cb..c47c3a2ef 100644 --- a/codebundles/k8s-daemonset-healthcheck/runbook.robot +++ b/codebundles/k8s-daemonset-healthcheck/runbook.robot @@ -799,12 +799,13 @@ Suite Initialization ... description=The name of the DaemonSet to triage. ... pattern=\w* ... example=fluentd - ${LOG_AGE}= RW.Core.Import User Variable LOG_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age of logs to fetch from pods, used for log analysis tasks. ... pattern=\w* ... example=1h ... default=3h + ${LOG_AGE}= Set Variable ${LOOKBACK_WINDOW} ${LOG_ANALYSIS_DEPTH}= RW.Core.Import User Variable LOG_ANALYSIS_DEPTH ... type=string ... description=The depth of log analysis to perform - basic, standard, or comprehensive. diff --git a/codebundles/k8s-deployment-healthcheck/.runwhen/templates/k8s-deployment-health-taskset.yaml b/codebundles/k8s-deployment-healthcheck/.runwhen/templates/k8s-deployment-health-taskset.yaml index 6ae116d38..04436698d 100644 --- a/codebundles/k8s-deployment-healthcheck/.runwhen/templates/k8s-deployment-health-taskset.yaml +++ b/codebundles/k8s-deployment-healthcheck/.runwhen/templates/k8s-deployment-health-taskset.yaml @@ -20,6 +20,7 @@ spec: ref: main {% endif %} pathToRobot: codebundles/k8s-deployment-healthcheck/runbook.robot + lookbackWindow: 10m configProvided: - name: NAMESPACE value: {{match_resource.resource.metadata.namespace}} @@ -33,8 +34,6 @@ spec: value: "30m" - name: CONTAINER_RESTART_THRESHOLD value: "4" - - name: LOG_AGE - value: "10m" secretsProvided: {% if wb_version %} {% include "kubernetes-auth.yaml" ignore missing %} diff --git a/codebundles/k8s-deployment-healthcheck/runbook.robot b/codebundles/k8s-deployment-healthcheck/runbook.robot index 4c139ae30..c92cc38db 100755 --- a/codebundles/k8s-deployment-healthcheck/runbook.robot +++ b/codebundles/k8s-deployment-healthcheck/runbook.robot @@ -55,13 +55,13 @@ Suite Initialization ... pattern=\d+ ... example=100 ... default=100 - ${LOG_AGE}= RW.Core.Import User Variable LOG_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age of logs to fetch from pods, used for log analysis tasks. ... pattern=\w* ... example=10m ... default=10m - + ${LOG_AGE}= Set Variable ${LOOKBACK_WINDOW} ${LOG_ANALYSIS_DEPTH}= RW.Core.Import User Variable LOG_ANALYSIS_DEPTH ... type=string ... description=The depth of log analysis to perform - basic, standard, or comprehensive. diff --git a/codebundles/k8s-jaeger-http-query/.runwhen/templates/k8s-jaeger-http-query-taskset.yaml b/codebundles/k8s-jaeger-http-query/.runwhen/templates/k8s-jaeger-http-query-taskset.yaml index f14b46f92..d2eadd979 100644 --- a/codebundles/k8s-jaeger-http-query/.runwhen/templates/k8s-jaeger-http-query-taskset.yaml +++ b/codebundles/k8s-jaeger-http-query/.runwhen/templates/k8s-jaeger-http-query-taskset.yaml @@ -20,6 +20,7 @@ spec: ref: main {% endif %} pathToRobot: codebundles/k8s-jaeger-http-query/runbook.robot + lookbackWindow: 5m configProvided: - name: KUBERNETES_DISTRIBUTION_BINARY value: {{custom.kubernetes_distribution_binary}} @@ -27,8 +28,6 @@ spec: value: {{match_resource.resource.metadata.namespace}} - name: CONTEXT value: {{context}} - - name: LOOKBACK - value: 5m - name: SERVICE_EXCLUSIONS value: jaeger-all-in-one secretsProvided: diff --git a/codebundles/k8s-jaeger-http-query/runbook.robot b/codebundles/k8s-jaeger-http-query/runbook.robot index 6c527465a..d6fb06d3f 100644 --- a/codebundles/k8s-jaeger-http-query/runbook.robot +++ b/codebundles/k8s-jaeger-http-query/runbook.robot @@ -69,12 +69,13 @@ Suite Initialization ... pattern=\w* ... example=jaeger-all-in-one ... default=none - ${LOOKBACK}= RW.Core.Import User Variable LOOKBACK + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age to query for traces. Defaults to 5m. ... pattern=\w* ... example=1h ... default=5m + ${LOOKBACK}= Set Variable ${LOOKBACK_WINDOW} ${KUBERNETES_DISTRIBUTION_BINARY}= RW.Core.Import User Variable KUBERNETES_DISTRIBUTION_BINARY ... type=string ... description=Which binary to use for Kubernetes CLI commands. diff --git a/codebundles/k8s-namespace-healthcheck/.runwhen/templates/k8s-namespace-healthcheck-taskset.yaml b/codebundles/k8s-namespace-healthcheck/.runwhen/templates/k8s-namespace-healthcheck-taskset.yaml index b9268ebc5..4fc5f87cc 100644 --- a/codebundles/k8s-namespace-healthcheck/.runwhen/templates/k8s-namespace-healthcheck-taskset.yaml +++ b/codebundles/k8s-namespace-healthcheck/.runwhen/templates/k8s-namespace-healthcheck-taskset.yaml @@ -20,6 +20,7 @@ spec: ref: main {% endif %} pathToRobot: codebundles/k8s-namespace-healthcheck/runbook.robot + lookbackWindow: 30m configProvided: - name: KUBERNETES_DISTRIBUTION_BINARY value: {{custom.kubernetes_distribution_binary}} @@ -29,8 +30,6 @@ spec: value: {{context}} - name: ANOMALY_THRESHOLD value: "3.0" - - name: EVENT_AGE - value: "30m" secretsProvided: {% if wb_version %} {% include "kubernetes-auth.yaml" ignore missing %} diff --git a/codebundles/k8s-namespace-healthcheck/runbook.robot b/codebundles/k8s-namespace-healthcheck/runbook.robot index f46b809cf..7b803f577 100644 --- a/codebundles/k8s-namespace-healthcheck/runbook.robot +++ b/codebundles/k8s-namespace-healthcheck/runbook.robot @@ -587,12 +587,13 @@ Suite Initialization ... enum=[kubectl,oc] ... example=kubectl ... default=kubectl - ${EVENT_AGE}= RW.Core.Import User Variable EVENT_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The time window in minutes as to when the event was last seen. ... pattern=((\d+?)m)? ... example=30m ... default=30m + ${EVENT_AGE}= Set Variable ${LOOKBACK_WINDOW} ${CONTAINER_RESTART_AGE}= RW.Core.Import User Variable CONTAINER_RESTART_AGE ... type=string ... description=The time window (in (h) hours or (m) minutes) as search for container restarts. diff --git a/codebundles/k8s-podresources-health/runbook.robot b/codebundles/k8s-podresources-health/runbook.robot index 9dc2e2afe..34b1ed631 100644 --- a/codebundles/k8s-podresources-health/runbook.robot +++ b/codebundles/k8s-podresources-health/runbook.robot @@ -232,12 +232,13 @@ Suite Initialization ... pattern=^\d+$ ... example=25 ... default=25 - ${RESTART_AGE}= RW.Core.Import User Variable RESTART_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age (in minutes) to consider when looking for container restarts. ... pattern=^\d+$ ... example=10 ... default=10 + ${RESTART_AGE}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 Set Suite Variable ${kubeconfig} ${kubeconfig} Set Suite Variable ${CONTEXT} ${CONTEXT} Set Suite Variable ${NAMESPACE} ${NAMESPACE} diff --git a/codebundles/k8s-postgres-healthcheck/runbook.robot b/codebundles/k8s-postgres-healthcheck/runbook.robot index 02a0493e2..f7f29e83c 100644 --- a/codebundles/k8s-postgres-healthcheck/runbook.robot +++ b/codebundles/k8s-postgres-healthcheck/runbook.robot @@ -282,13 +282,14 @@ Suite Initialization ... pattern=\w* ... example=postgresql.acid.zalan.do ... default= - ${BACKUP_MAX_AGE}= RW.Core.Import User Variable - ... BACKUP_MAX_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable + ... LOOKBACK_WINDOW ... type=string ... description=The maximum age (in hours) of the last backup before an issue is generated. ... pattern=\w* ... example=26 ... default=26 + ${BACKUP_MAX_AGE}= RW.Core.Normalize Lookback Window Str ${LOOKBACK_WINDOW} 1 Set Suite Variable ${kubeconfig} ${kubeconfig} Set Suite Variable ${KUBERNETES_DISTRIBUTION_BINARY} ${KUBERNETES_DISTRIBUTION_BINARY} Set Suite Variable ${CONTEXT} ${CONTEXT} diff --git a/codebundles/k8s-stacktrace-health/.runwhen/templates/k8s-stacktrace-health-taskset.yaml b/codebundles/k8s-stacktrace-health/.runwhen/templates/k8s-stacktrace-health-taskset.yaml index db3be2923..31602d0c4 100644 --- a/codebundles/k8s-stacktrace-health/.runwhen/templates/k8s-stacktrace-health-taskset.yaml +++ b/codebundles/k8s-stacktrace-health/.runwhen/templates/k8s-stacktrace-health-taskset.yaml @@ -20,6 +20,7 @@ spec: ref: main {% endif %} pathToRobot: codebundles/k8s-stacktrace-health/runbook.robot + lookbackWindow: 3h configProvided: - name: NAMESPACE value: {{match_resource.resource.metadata.namespace}} @@ -33,8 +34,6 @@ spec: value: {{match_resource.kind | lower}} - name: LOG_LINES value: "100" - - name: LOG_AGE - value: "3h" - name: LOG_SIZE value: "2097152" - name: IGNORE_CONTAINERS_MATCHING diff --git a/codebundles/k8s-stacktrace-health/runbook.robot b/codebundles/k8s-stacktrace-health/runbook.robot index 286a979e6..ed3fd5d0b 100755 --- a/codebundles/k8s-stacktrace-health/runbook.robot +++ b/codebundles/k8s-stacktrace-health/runbook.robot @@ -62,12 +62,13 @@ Suite Initialization ... pattern=\d+ ... example=100 ... default=2000 - ${LOG_AGE}= RW.Core.Import User Variable LOG_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age of logs to fetch from pods, used for log analysis tasks. ... pattern=\w* ... example=1h ... default=15m + ${LOG_AGE}= Set Variable ${LOOKBACK_WINDOW} ${LOG_SIZE}= RW.Core.Import User Variable LOG_SIZE ... type=string ... description=The maximum size of logs in bytes to fetch from pods, used for log analysis tasks. Defaults to 2MB. diff --git a/codebundles/k8s-statefulset-healthcheck/runbook.robot b/codebundles/k8s-statefulset-healthcheck/runbook.robot index 5276438b6..83de3d1bb 100644 --- a/codebundles/k8s-statefulset-healthcheck/runbook.robot +++ b/codebundles/k8s-statefulset-healthcheck/runbook.robot @@ -811,12 +811,13 @@ Suite Initialization ... description=The name of the StatefulSet to triage. ... pattern=\w* ... example=mysql-primary - ${LOG_AGE}= RW.Core.Import User Variable LOG_AGE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable LOOKBACK_WINDOW ... type=string ... description=The age of logs to fetch from pods, used for log analysis tasks. ... pattern=\w* ... example=1h ... default=3h + ${LOG_AGE}= Set Variable ${LOOKBACK_WINDOW} ${LOG_ANALYSIS_DEPTH}= RW.Core.Import User Variable LOG_ANALYSIS_DEPTH ... type=string ... description=The depth of log analysis to perform - basic, standard, or comprehensive. diff --git a/codebundles/k8s-tail-logs-dynamic/runbook.robot b/codebundles/k8s-tail-logs-dynamic/runbook.robot index db09fa983..00b4b7988 100644 --- a/codebundles/k8s-tail-logs-dynamic/runbook.robot +++ b/codebundles/k8s-tail-logs-dynamic/runbook.robot @@ -103,13 +103,14 @@ Suite Initialization ... enum=[kubectl,oc] ... example=kubectl ... default=kubectl - ${LOGS_SINCE}= RW.Core.Import User Variable - ... LOGS_SINCE + ${LOOKBACK_WINDOW}= RW.Core.Import User Variable + ... LOOKBACK_WINDOW ... type=string ... description=How far back to fetch logs from containers in Kubernetes. Making this too recent and running the codebundle often could cause adverse performance. ... pattern=\w* ... example=30m ... default=30m + ${LOGS_SINCE}= Set Variable ${LOOKBACK_WINDOW} ${EXCLUDE_PATTERN}= RW.Core.Import User Variable ... EXCLUDE_PATTERN ... type=string