Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions codebundles/aws-account-cost-health/SKILL-TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
name: aws-account-cost-health
kind: skill-template
description: AWS Account Cost Report: Generates historical cost breakdown reports by service using the AWS Cost Explorer API.... Use when triaging or monitoring AWS, Cost, Management workloads with skill templa...
runtime:
runbook: runbook.robot
executor: worker
entrypoint: /home/runwhen/robot-runtime/runrobot.sh
base_image: rw-base-runtime
platforms: [AWS, Cost, Management, Cost, Reporting, Trend, Analysis, Reserved, Instances, Savings, Plans]
resource_types: [aws_resource]
access: read-only
---

# AWS Account Cost Report

## Summary

This codebundle monitors AWS account cost trends using the Cost Explorer API and provides Reserved Instance and Savings Plans purchase recommendations.

See [README.md](README.md) for additional context.

## Tools

### Generate AWS Cost Report By Service for Account `${AWS_ACCOUNT_NAME}`

Generates a detailed cost breakdown report for the configured lookback period showing actual spending by AWS service. Includes period-over-period comparison and raises an issue if cost increase exceeds configured threshold.

- **Robot task name**: <code>Generate AWS Cost Report By Service for Account `${AWS_ACCOUNT_NAME}`</code>
- **Robot file**: `runbook.robot`
- **Underlying script**: `aws_cost_report.sh`
- **Tags**: `AWS`, `Cost`, `Analysis`, `Cost`, `Management`, `Reporting`, `Trend`, `Analysis`, `access:read-only`, `data:config`
- **Reads**: `AWS_ACCOUNT_NAME`, `TIMEOUT_SECONDS`
- **Writes**: `aws_cost_trend_issues.json`
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


### Analyze AWS Reserved Instance and Savings Plans Recommendations for Account `${AWS_ACCOUNT_NAME}`

Queries AWS Cost Explorer for Reserved Instance and Savings Plans purchase recommendations. Calculates potential savings from commitments for EC2, RDS, ElastiCache, and Compute Savings Plans.

- **Robot task name**: <code>Analyze AWS Reserved Instance and Savings Plans Recommendations for Account `${AWS_ACCOUNT_NAME}`</code>
- **Robot file**: `runbook.robot`
- **Underlying script**: `aws_ri_recommendations.sh`
- **Tags**: `AWS`, `Cost`, `Analysis`, `Reserved`, `Instances`, `Savings`, `Plans`, `access:read-only`, `data:config`
- **Reads**: `AWS_ACCOUNT_NAME`, `TIMEOUT_SECONDS`
- **Writes**: `aws_ri_issues.json`
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


## Inputs

| Name | Type | Description | Default | Required |
|---|---|---|---|---|
| `AWS_REGION` | string | AWS Region for Cost Explorer API calls | `us-east-1` | no |
| `AWS_ACCOUNT_NAME` | string | AWS account name or alias for display purposes | `""` | no |
| `COST_ANALYSIS_LOOKBACK_DAYS` | string | Number of days to look back for cost analysis (default: 30) | `30` | no |
| `COST_INCREASE_THRESHOLD` | string | Percentage threshold for cost increase alerts. An issue will be raised if period-over-period cost increase exceeds this value (e.g., 10 for 10% increase). | `10` | no |
| `OUTPUT_FORMAT` | string | Output format for cost report: table, csv, json, or all (default: table) | `table` | no |
| `COST_BUDGET` | string | Budget threshold in USD for the analysis period. An issue will be raised if total costs exceed this value. Set to 0 to disable (default: 0). | `0` | no |
| `COST_CONCENTRATION_THRESHOLD` | string | Maximum percentage of total cost that any single service should represent. An issue will be raised if exceeded (default: 25). | `25` | no |
| `TIMEOUT_SECONDS` | string | Timeout in seconds for tasks (default: 600 = 10 minutes). | `600` | no |

## Secrets

_No secrets imported in Robot source._

## Outputs

- `aws_cost_trend_issues.json`
- `aws_ri_issues.json`

## How to invoke

### Production (RunWhen runner / worker)

The platform **runner** schedules work on a location **worker**. The worker
image (`rw-base-runtime`) executes Robot via `runrobot.sh` with
`RW_PATH_TO_ROBOT` set to the bound path under `/home/runwhen/collection/`.

- **Runbook**: `codebundles/aws-account-cost-health/runbook.robot`

### Local development (devcontainer only)

`ro` is a dev-time wrapper in `codecollection-devtools` — not the enterprise runtime.

```bash
cd codebundles/aws-account-cost-health
export AWS_REGION=...
export AWS_ACCOUNT_NAME=...
export COST_ANALYSIS_LOOKBACK_DAYS=...
export COST_INCREASE_THRESHOLD=...
export OUTPUT_FORMAT=...
export COST_BUDGET=...
ro runbook.robot
```

### Standalone scripts (no Robot)


Set the input variables above, then run the matching script:

```bash
cd codebundles/aws-account-cost-health
export AWS_REGION=...
export AWS_ACCOUNT_NAME=...
export COST_ANALYSIS_LOOKBACK_DAYS=...
export COST_INCREASE_THRESHOLD=...
bash aws_cost_report.sh
bash aws_ri_recommendations.sh
```

## Source files

- `runbook.robot` — orchestrates tools and raises issues
- `aws_cost_report.sh` — Bash helper script `aws_cost_report.sh`.
- `aws_ri_recommendations.sh` — Bash helper script `aws_ri_recommendations.sh`.
82 changes: 82 additions & 0 deletions codebundles/aws-cloudwatch-overused-ec2/SKILL-TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
name: aws-cloudwatch-overused-ec2
kind: skill-template
description: Queries AWS CloudWatch for a list of EC2 instances with a high amount of resource utilization, raising issues when... Use when triaging or monitoring AWS, CloudWatch workloads with skill template `...
runtime:
runbook: runbook.robot
executor: worker
entrypoint: /home/runwhen/robot-runtime/runrobot.sh
base_image: rw-base-runtime
platforms: [AWS, CloudWatch]
resource_types: [ec2_instance]
access: read-only
---

# AWS CloudWatch Overutlized EC2 Inspection

## Summary

This taskset can be used to check a fleet of EC2 instance and return the list of instances which are classified as overutilized.

See [README.md](README.md) for additional context.

## Tools

### Check For Overutilized Ec2 Instances

Fetches CloudWatch metrics for a list of EC2 instances and raises issues if they're over-utilized based on a configurable threshold.

- **Robot task name**: <code>Check For Overutilized Ec2 Instances</code>
- **Robot file**: `runbook.robot`
- **Tags**: `cloudwatch`, `metrics`, `ec2`, `utilization`, `data:config`
- **Reads**: `AWS_DEFAULT_REGION`, `UTILIZATION_THRESHOLD`
- **Writes**: —
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


## Inputs

| Name | Type | Description | Default | Required |
|---|---|---|---|---|
| `AWS_DEFAULT_REGION` | string | The AWS region to scope API requests to. | `us-west-1` | no |
| `UTILIZATION_THRESHOLD` | string | The threshold at which an instance is determined as overutilized. | `0.8` | no |

## Secrets

| Name | Description | Required |
|---|---|---|
| `aws_credentials` | AWS credentials from the workspace (from aws-auth block; e.g. aws:access_key@cli, aws:irsa@cli). | yes |

## Outputs

_See Robot run output and platform report artifacts._

## How to invoke

### Production (RunWhen runner / worker)

The platform **runner** schedules work on a location **worker**. The worker
image (`rw-base-runtime`) executes Robot via `runrobot.sh` with
`RW_PATH_TO_ROBOT` set to the bound path under `/home/runwhen/collection/`.

- **Runbook**: `codebundles/aws-cloudwatch-overused-ec2/runbook.robot`

### Local development (devcontainer only)

`ro` is a dev-time wrapper in `codecollection-devtools` — not the enterprise runtime.

```bash
cd codebundles/aws-cloudwatch-overused-ec2
export AWS_DEFAULT_REGION=...
export UTILIZATION_THRESHOLD=...
ro runbook.robot
```

### Standalone scripts (no Robot)


_No standalone shell scripts in this bundle._

## Source files

- `runbook.robot` — orchestrates tools and raises issues
142 changes: 142 additions & 0 deletions codebundles/aws-eks-health/SKILL-TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
---
name: aws-eks-health
kind: skill-template
description: Checks the health status of an EKS cluster including node groups, add-ons, and Fargate profiles. Use when triaging or monitoring AWS, EKS, Fargate workloads with skill template `aws-eks-health`.
runtime:
runbook: runbook.robot
executor: worker
entrypoint: /home/runwhen/robot-runtime/runrobot.sh
base_image: rw-base-runtime
platforms: [AWS, EKS, Fargate]
resource_types: [eks_cluster]
access: read-only
---

# AWS EKS Cluster Health

## Summary

Comprehensive health checks for Amazon EKS clusters in a given AWS region.

See [README.md](README.md) for additional context.

## Tools

### Check EKS Cluster `${EKS_CLUSTER_NAME}` Health in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`

Checks overall EKS cluster health including status, configuration, add-ons, and node group summary.

- **Robot task name**: <code>Check EKS Cluster `${EKS_CLUSTER_NAME}` Health in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`</code>
- **Robot file**: `runbook.robot`
- **Underlying script**: `check_eks_cluster_health.sh`
- **Tags**: `EKS`, `Cluster`, `Health`, `AWS`, `Kubernetes`, `access:read-only`, `data:config`
- **Reads**: `AWS_REGION`, `EKS_CLUSTER_NAME`
- **Writes**: `eks_cluster_health.json`
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


### Check Fargate Profile Health for EKS Cluster `${EKS_CLUSTER_NAME}` in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`

Checks the health status of all Fargate profiles for the EKS cluster.

- **Robot task name**: <code>Check Fargate Profile Health for EKS Cluster `${EKS_CLUSTER_NAME}` in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`</code>
- **Robot file**: `runbook.robot`
- **Underlying script**: `check_eks_fargate_cluster_health_status.sh`
- **Tags**: `EKS`, `Fargate`, `Cluster`, `Health`, `AWS`, `Kubernetes`, `Pods`, `access:read-only`, `data:config`
- **Reads**: `AWS_REGION`, `EKS_CLUSTER_NAME`
- **Writes**: `eks_fargate_health.json`
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


### Check Kubernetes Version Support for EKS Cluster `${EKS_CLUSTER_NAME}` in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`

Checks whether the EKS cluster is running a deprecated or extended-support Kubernetes version and estimates cost impact. AWS charges a $0.60/hr/cluster surcharge for versions in extended support (7x standard cost).

- **Robot task name**: <code>Check Kubernetes Version Support for EKS Cluster `${EKS_CLUSTER_NAME}` in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`</code>
- **Robot file**: `runbook.robot`
- **Underlying script**: `check_eks_version_support.sh`
- **Tags**: `EKS`, `Version`, `Deprecation`, `Cost`, `AWS`, `Kubernetes`, `access:read-only`, `data:config`
- **Reads**: `AWS_REGION`, `EKS_CLUSTER_NAME`
- **Writes**: `eks_version_support.json`
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


### Check Node Group Health for EKS Cluster `${EKS_CLUSTER_NAME}` in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`

Checks the health and scaling status of all managed node groups for the EKS cluster.

- **Robot task name**: <code>Check Node Group Health for EKS Cluster `${EKS_CLUSTER_NAME}` in Account `${AWS_ACCOUNT_NAME}` Region `${AWS_REGION}`</code>
- **Robot file**: `runbook.robot`
- **Underlying script**: `check_eks_nodegroup_health.sh`
- **Tags**: `AWS`, `EKS`, `Node`, `Health`, `Kubernetes`, `Nodes`, `access:read-only`, `data:config`
- **Reads**: `AWS_REGION`, `EKS_CLUSTER_NAME`
- **Writes**: `eks_nodegroup_health.json`
- **Issues raised**: issues reported via `RW.Core.Add Issue` when checks fail


## Inputs

| Name | Type | Description | Default | Required |
|---|---|---|---|---|
| `AWS_REGION` | string | AWS Region | — | yes |
| `EKS_CLUSTER_NAME` | string | The name of the EKS cluster to check. | — | yes |
| `AWS_ACCOUNT_NAME` | string | AWS account name or alias for display purposes. | `Unknown` | no |

## Secrets

| Name | Description | Required |
|---|---|---|
| `aws_credentials` | AWS credentials from the workspace (from aws-auth block; e.g. aws:access_key@cli, aws:irsa@cli). | yes |

## Outputs

- `eks_cluster_health.json`
- `eks_fargate_health.json`
- `eks_version_support.json`
- `eks_nodegroup_health.json`

## How to invoke

### Production (RunWhen runner / worker)

The platform **runner** schedules work on a location **worker**. The worker
image (`rw-base-runtime`) executes Robot via `runrobot.sh` with
`RW_PATH_TO_ROBOT` set to the bound path under `/home/runwhen/collection/`.

- **Runbook**: `codebundles/aws-eks-health/runbook.robot`

### Local development (devcontainer only)

`ro` is a dev-time wrapper in `codecollection-devtools` — not the enterprise runtime.

```bash
cd codebundles/aws-eks-health
export AWS_REGION=...
export EKS_CLUSTER_NAME=...
export AWS_ACCOUNT_NAME=...
ro runbook.robot
```

### Standalone scripts (no Robot)


Set the input variables above, then run the matching script:

```bash
cd codebundles/aws-eks-health
export AWS_REGION=...
export EKS_CLUSTER_NAME=...
export AWS_ACCOUNT_NAME=...
bash check_eks_cluster_health.sh
bash check_eks_fargate_cluster_health_status.sh
bash check_eks_nodegroup_health.sh
bash check_eks_version_support.sh
```

## Source files

- `runbook.robot` — orchestrates tools and raises issues
- `check_eks_cluster_health.sh` — Bash helper script `check_eks_cluster_health.sh`.
- `check_eks_fargate_cluster_health_status.sh` — Bash helper script `check_eks_fargate_cluster_health_status.sh`.
- `check_eks_nodegroup_health.sh` — Bash helper script `check_eks_nodegroup_health.sh`.
- `check_eks_version_support.sh` — Bash helper script `check_eks_version_support.sh`.
Loading
Loading