Package: runwhen-public-keywords
RunWhen Public CodecollectionThis repository is the primary public codecollection that is to be used within the RunWhen platform. It contains codebundles that can be used in SLIs, SLOs, and TaskSets.Please see thecontributingandcode of conductfor details on adding your contributions to this project.Documentation for each codebundle is maintained in the README.md alongside the robot code and is published athttps://docs.runwhen.com/public/v/codebundles/. Please see thereadme howtofor details on crafting a codebundle readme that can be indexed.Codebundle IndexNameSupported IntegrationsTasksDocumentationKubernetes Namespace HealthcheckKubernetes,AKS,EKS,GKE,OpenShiftGet Event Count and Score,Get Container Restarts and Score,Get NotReady Pods,Generate Namspace ScoreThis SLI uses kubectl to score namespace health. Produces a value between 0 (completely failing thet test) and 1 (fully passing the test). Looks for container restarts, events, and pods not ready.DocsKubernetes Namespace TroubleshootKubernetes,AKS,EKS,GKE,OpenShiftTrace Namespace Errors,Fetch Unready Pods,Triage Namespace,Object Condition Check,Namespace Get AllThis taskset runs general troubleshooting checks against all applicable objects in a namespace, checks error events, and searches pod logs for error entries.DocsKubernetes Run Shell CommandKubernetes,AKS,EKS,GKE,OpenShiftRunning Kubectl And Adding Stdout To ReportThis codebundle runs an arbitrary kubectl command and writes the stdout to a report. Typically used in conjunction with other codebundles.DocsKubernetes Synthetic PVC TestKubernetes,AKS,EKS,GKE,OpenShiftRun Canary JobCreates an adhoc one-shot job which mounts a PVC as a canary test, which is polled for success before being torn down.DocsKubernetes Workload MetricKubernetes,AKS,EKS,GKE,OpenShiftRunning Kubectl get and push the metricThis codebundle runs a kubectl get command that produces a value and pushes the metric. Uses jmespath for filtering and allows calculations such as count, sum, avg on specified fields.Docsargocd-healthcheck-sliargocdArgoCD Health CheckCheck the health of ArgoCD platfrom by checking the availability of its underlying Deployments and StatefulSets.Docsartifactory-ok-sliartifactoryCheck If Artifactory Endpoint Is HealthyChecks an Artifactory instance health endpoint to determine its operational status. The response is parsed to determine if the service is healthy, resulting in a metric of 1 if it is, or 0 if not.Docsaws-account-limit-sliawsGet Count Of AWS Accounts In OrganizationRetrieve the count of all AWS accounts in an organization.Docsaws-account-limit-tasksetawsGet The Recently Created AWS AccountsRetrieve all recently created AWS accounts.Docsaws-billing-costsacrosstags-tasksetawsGet All Billing Sliced By TagsCreates a report of AWS line item costs filtered to a list of tagged resourcesDocsaws-billing-tagcosts-sliawsGet All Billing Sliced By TagsMonitors AWS cost and usage data for the latest billing period. Accepts one tag for continuous monitoring.Docsaws-cloudformation-stackevents-count-sliawsFetch CloudFormation Stack EventsRetrieve the number of detected AWS CloudFormation stack events over a given historyDocsaws-cloudformation-triage-tasksetawsGet All Recent Stack EventsTriage and troubleshoot various issues with AWS CloudFormationDocsaws-cloudwatch-logquery-rowcount-zeroerror-sliawsRunning CloudWatch Log Query And Pushing 1 If No Results FoundRetrieve binary result from an AWS CloudWatch Insights query. Pushes 0 (success) if logs are found (activity) or 1 if no logs were found in the time window.Docsaws-cloudwatch-logquery-sliawsRunning CloudWatch Log Query And Pushing The Count Of ResultsRetrieve number of results from an AWS CloudWatch Insights query.Docsaws-cloudwatch-metricquery-dashboard-tasksetawsGet CloudWatch MetricQuery Insights URLCreates a URL to a AWS CloudWatch metrics dashboard with a running query.Docsaws-cloudwatch-metricquery-sliawsRunning CloudWatch Metric Query And Pushing The ResultRetrieve the result of an AWS CloudWatch Metrics Insights query.Docsaws-cloudwatch-tagmetricquery-sliawsRun CloudWatch Metric Query Across Set Of IDs And Push MetricRetrieve aggregate results from multiple AWS Cloudwatch Metrics Insights queries ran against tagged resources. This codebundle fetches a list of instance IDs filtered by tags, and uses them to run a set of AWS metric queries against the CloudWatch metrics insights API and pushes an aggregated/transformed value provided by the API as a metric.Docsaws-ec2-securitycheck-tasksetawsCheck For Untagged instances,Check For Dangling Volumes,Check For Open Routes,Check For Overused Instances,Check For Underused Instances,Check For Underused Volumes,Check For Overused VolumesPerforms a suite of security checks against a set of AWS EC2 instances. Checks include untagged instances, dangling volumes, open routes.Docsaws-s3-stalecheck-tasksetawsCreate Report For Stale BucketsIdentify stale AWS S3 buckets, based on last modified object timestamp.Docsaws-vm-triage-tasksetawsGet Max VM CPU Utilization In Last 3 Hours,Get Lowest VM CPU Credits In Last 3 Hours,Get Max VM CPU Credit Usage In Last 3 hours,Get Max VM Memory Utilization In Last 3 Hours,Get Max VM Volume Usage In Last 3 HoursTriage and troubleshoot performance and usage of an AWS EC2 instanceDocscert-manager-expirations-slicertInspect Certification Expiration DatesRetrieve number of expired TLS certificates managed by cert-manager within a given window. The metric pushed is the number of certs within the configured expiration window.Docscert-manager-healthcheck-slicertHealth Check cert-manager PodsCheck the health of pods deployed by cert-manager.Docscurl-generic-slicurlRun Curl Command and Push MetricA curl SLI for querying and extracting data from a generic curl call. Supports jq. Should prodice a single metric.Docscurl-generic-tasksetcurlRun Curl Command and Add to ReportA curl TaskSet for querying and extracting data from a generic curl call. Supports jq. Adds results to the report.Docsdatadog-metricquery-slidatadogQuery Datadog MetricsFetch the results of a datadog metric timeseries and push the extracted value as an SLI metric.Docsdatadog-system-load-slidatadogCheck Datadog System LoadRetrieve a DataDog instance's "System Load" metricDocsdiscord-sendmessage-tasksetdiscordSend Chat MessageSends a static Discord message via webhook. Contains optional configuration for including runsession info.Docsdns-latency-slidnsCheck DNS latency for Google ResolverCheck DNS latency for Google Resolver.Docselasticsearch-health-slielasticsearchCheck Elasticsearch Cluster HealthCheck Elasticsearch cluster healthDocsgcp-gcloudcli-generic-sligcpRun Gcloud CLI Command and Push metricRun arbitrary gcloud commands and parse their output for arbitrary values such as json to be submitted as a metric.Docsgcp-gcloudcli-generic-tasksetgcpRun Gcloud CLI Command and Push metricRun arbitrary gcloud commands and capture the stdout in a report.Docsgcp-opssuite-logquery-dashboard-tasksetgcpGet GCP Log Dashboard URL For Given Log QueryGenerate a link to the GCP Log Explorer.Docsgcp-opssuite-logquery-sligcpRunning GCE Logging Query And Pushing Result Count MetricRetrieve the number of results of a GCP Log Explorer query.Docsgcp-opssuite-metricquery-sligcpRunning GCP OpsSuite Metric QueryPerforms a metric query using a Google MQL statement on the Ops Suite API and pushes the result as an SLI metric.Docsgcp-opssuite-promql-sligcpRun Prometheus Instant Query Against Google Prom API EndpointPerforms a metric query using a PromQL statement on the Ops Suite API and pushes the result as an SLI metric.Docsgcp-serviceshealth-sligcpGet Number of GCP Incidents Effecting My WorkspaceThis codebundle sets up a monitor for a specific region and GCP Product, which is then periodically checked for ongoing incidents based on the history available athttps://status.cloud.google.com/incidents.jsonfiltered based on severity level.Docsgithub-actions-workflowtiming-sligithubGet Average Run Time For WorkflowMonitors the average timing of a github actions workflow file within a repo and returns the average runtime in minutes.Docsgithub-get-repos-latency-sligithubCheck GitHub Latency With Get ReposCheck GitHub latency by getting a list of repo names.Docsgithub-get-repos-latency-tasksetgithubCheck Latency When Creating a New GitHub IssueCreate a new issue in GitHub Issues.Docsgithub-status-components-sligithubGet Availability of GitHub or Individual GitHub ComponentsCheck status of the GitHub platform (https://www.githubstatus.com/) for a specified set of GitHub service components. The metric supplied is a aggregated percentage indicating the availability of the components with 1 = 100% available.Docsgithub-status-incidents-sligithubGet Number of Incidents Affecting GitHubCheck for unresolved incidents related to GitHub services, and provides a count of ongoing incidents as a metric.Docsgithub-status-maintenances-sligithubGet Scheduled and Active GitHub Maintenance WindowsRetrieve number of upcoming Github platform maintenances over a given window.Docsgitlab-availability-sligitlabCheck GitLab Server StatusCheck availability of a GitLab server.Docsgitlab-availability-tasksetgitlabCheck GitLab Server StatusTroubleshoot issues with GitLab server availability.Docsgitlab-get-repos-latency-sligitlabCheck GitLab Latency With Get ReposCheck GitLab latency by getting a list of repo names.Docsgooglechat-sendmessage-tasksetgooglechatSend Chat MessageSends a static Google Chat message via webhook. Contains optional configuration for including runsession info.Docsgrafana-health-sligrafanaCheck Grafana Server HealthCheck Grafana server health.Docsgrpc-grpcurl-unary-sligrpcRun gRPCurl Command and Push MetricA gRPC curl SLI for querying and extracting data from a generic grpcurl call.Docsgrpc-grpcurl-unary-tasksetgrpcRun gRPCurl Command and Show OutputA gRPC curl taskset for querying data from a generic grpcurl call and presenting the output.Docshello-world-tasksethelloHello World,Add One String To Report,Add Form Values To ReportBasic Hello-World TaskSetDocshttp-latency-slihttpCheck HTTP Latency to Well Known URLMeasure HTTP latency against a given URL. The returned metric is the number of seconds the request took as a float value.Docshttp-ok-slihttpChecking HTTP URL Is Available And TimelyCheck if an HTTP request against a URL fails or times out of a given latency window. A return of 1 is considered a success, while a 0 is failure.Docsjira-search-issues-latency-slijiraSearch Jira Issues By Current UserCheck Jira latency when searching issues by current user.Docsjira-search-issues-latency-tasksetjiraCreate a new Jira IssueCreate an issue in Jira.Docsk8s-cortexmetrics-ingestor-health-slik8sDetermine Cortex Ingester Ring HealthUses kubectl to query the state of a ingestor ring and determine if it's healthy. Returns 1 if healthy, 0 if unhealthy.Docsk8s-cortexmetrics-ingestor-health-tasksetk8sFetch Ingestor Ring Member List and StatusUses kubectl to query the state of a ingestor ring. Returns the json of injester id, status and timestamp.Docsk8s-daemonset-healthcheck-slik8sHealth Check DaemonsetChecks that the current state of a daemonset is healthy and returns a score of either 1 (healthy) or 0 (unhealthy).Docsk8s-decommission-workloads-tasksetk8sGenerate Decomission CommandsSearches a namespace for matching objects and provides the commands to decommission them.Docsk8s-kubectl-apiserverhealth-slik8sRunning Kubectl Check Against API ServerCheck the health of a Kubernetes API server using kubectl. Returns 1 when OK, or a 0 in the case of an unhealthy API server.Docsk8s-kubectl-eventquery-slik8sGet Number Of Matching EventsReturns the number of events with matching messages as an SLI metric.Docsk8s-kubectl-sanitycheck-tasksetk8sCheck Kubeconfig Secret Exists,Test Generic Shell Service Connectivity,Check Kubectl contexts,Test Command Chains,Test Kubectl Get PodsUsed for troubleshooting the shellservice-based kubectl serviceDocsk8s-kubectl-top-slik8sRunning Kubectl Top And Extracting Metric DataRetreieve aggregate data via kubectl top command.Docsk8s-patroni-healthcheck-slik8sDetermine Patroni HealthUses kubectl (or equivalent) to query the state of a patroni cluster and determine if it's healthy.Docsk8s-patroni-lag-slik8sMeasure Patroni Member LagMeasures the maximum replica lag across a Patroni cluster.Docsk8s-patroni-lag-tasksetk8sDetermine Patroni HealthDetects and reinitializes laggy Patroni cluster members which are unable to catchup in replication using kubectl and patronictl.Docsk8s-postgres-query-slik8sRun Postgres Query And Return Result As MetricRuns a postgres SQL query and pushes the returned query result as an SLI metric. During execution, the SQL query should be passed to a Kubernetes workload that has access to the psql binary. The workload will run the query and return the result from stdout.Docsk8s-postgres-query-tasksetk8sRun Postgres Query And Results to ReportRuns a postgres SQL query and pushes the returned result into a report. During execution, the SQL query should be passed to a Kubernetes workload that has access to the psql binary. The workload will run the query and return the results from stdout.Docsk8s-postgres-triage-tasksetk8sGet Standard Resources,Describe Custom Resources,Get Pod Logs & Events,Get Pod Resource Utilization,Get Running Configuration,Get Patroni Output,Run DB QueriesRuns multiple Kubernetes and psql commands to report on the health of a postgres cluster.Docsk8s-triage-deploymentreplicas-tasksetk8sFetch Logs,Get Related Events,Check Deployment ReplicasTriages issues related to a deployment's replicas.Docsk8s-triage-patroni-tasksetk8sGet Patroni Status,Get Pods Status,Fetch LogsTaskset to triage issues related to patroni.Docsk8s-triage-statefulset-tasksetk8sCheck StatefulSets Replicas Ready,Get Events For The StatefulSet,Get StatefulSet Logs,Get StatefulSet Manifests DumpA taskset for troubleshooting issues for StatefulSets and their related resources.Docsk8s-troubleshoot-deployment-tasksetk8sTroubleshoot Resourcing,Troubleshoot Events,Troubleshoot PVC,Troubleshoot PodsA taskset for troubleshooting general issues associated with typical kubernetes deployment resources. Supports API interactions via both the API client and Kubectl binary through RunWhen Shell Services.Docskong-ingress-health-gcp-promql-slikongGet Access Token,Get HTTP Error Rate,Get Upstream Health,Get Request Latency Rate,Generate Kong Ingress ScoreUses promql on the Ops Suite API to determine the health of a Kong managed ingress resource and pushes the result as an SLI metric. Produces a 1 for a healthy resource, or 0 for an unhealthy resource.Docsmongodb-health-gcp-promql-slimongodbGet Access Token,Get Instance Status,Get Connection Utilization Rate,Get MongoDB Member State Health,Get MongoDB Replication Lag,Get MongoDB Queue Size,Get Assertion Rate,Generate MongoDB ScoreUses promql on the Ops Suite API to determine the health of a MongoDB database instance and pushes the result as an SLI metric. Produces a 1 for a healthy resource, or 0 for an unhealthy resource.Docsmsteams-send-message-tasksetmsteamsSend a Message to an MS Teams ChannelSend a message to an MS Teams channel.Docsopsgenie-alert-tasksetopsgenieGet Opsgenie System Info,Create An AlertCreate an alert in Opsgenie.Docsping-host-availability-slipingPing host and collect packet lost percentagePing a host and retrieve packet loss percentage.Docspingdom-health-slipingdomCheck Pingdom HealthCheck health of Pingdom platform.Docsprometheus-queryinstant-transform-sliprometheusQuerying Prometheus Instance And Pushing Aggregated DataRun a PromQL query against Prometheus instant query API, perform a provided transform, and return the result.Docsprometheus-queryrange-transform-sliprometheusQuerying Prometheus Instance And Pushing Aggregated DataRun a PromQL query against Prometheus range query API, perform a provided transform, and return the result.Docsremote-http-ok-sliremoteChecking HTTP URL Is Available And TimelyCheck that a HTTP endpoint is healthy and returns in a target latency.Docsrest-basicauth-slirestRequest Data From Rest EndpointA general purpose REST SLI for querying and extracting data from a REST endpoint that uses a basic auth flow.Docsrest-explicitoauth2-basicauth-slirestRequest Data From Rest EndpointA REST SLI for querying and extracting data from a REST endpoint that needs an explicit oauth2 flow. Where the token acquisition is handled using basic auth.Docsrest-explicitoauth2-tokenheader-slirestRequest Data From Rest EndpointA REST SLI for querying and extracting data from a REST endpoint that needs an explicit oauth2 flow. Where an access token must be acquired with a bearer token.Docsrest-generic-slirestRequest Data From Rest EndpointA general purpose REST SLI for querying and extracting data from a REST endpoint that uses a implicit oauth2 flow.Docsrocketchat-sendmessage-tasksetrocketchatSend Chat MessageSends a static Rocketchat message via webhook. Contains optional configuration for including runsession info.Docsslack-sendmessage-tasksetslackSend Chat MessageSends a static Slack message via webhook. Contains optional configuration for including runsession info.Docssli-alert-threshold-slisliCheck If SLI Within Incident ThresholdAn SLI which monitors another SLI that's submitting a 0-1 health score and when that health score falls below a threshold, will immediately trigger a taskset. When this SLI detects a rate below the threshold rate it submits a 1 to denote a signal was sent before returning to 0 when the monitored SLI is healthy.Docssysdig-monitor-metric-slisysdigQuery Sysdig Metric Data And Pushing MetricQueries the Sysdig data API to fetch metric data.Docssysdig-monitor-promqlmetric-slisysdigQuerying PromQL Endpoint And Pushing Metric DataQueries the Sysdig data API with a PromQL query to fetch metric data.Docstwitter-query-tweets-slitwitterQuery TwitterQueries Twitter to count amount of tweets within a specified time range for a specific user handle.Docstwitter-query-tweets-tasksettwitterQuery TwitterQueries Twitter to fetch tweets within a specified time range for a specific user handle add them to a report.Docsuptimecom-component-ok-sliuptimecomCheck If Vault Endpoint Is HealthyCheck the status of an Uptime.com component for a given site. It compares the operational state of the component with the list of allowed states, resulting in a 1 when acceptable, and 0 when not.Docsvault-ok-slivaultCheck If Vault Endpoint Is HealthyCheck the health of a Vault server. The response code is used to determine if the service is healthy, resulting in a metric of 1 if it is, or 0 if not.Docsweb-triage-tasksetwebValidate Platform Egress,Perform Inspection On URLTroubleshoot and triage a URL to inspect it for common issues such as an expired certification, missing DNS records, etc.Docs