Skip to main content

cloudwatch

Query AWS CloudWatch logs (groups/streams/tail/Logs Insights), metrics, alarms and dashboards through the `datus cloudwatch` CLI

Datos de origen

Repositorio
Datus-ai/Datus-Plugins
Última actividad en el origen
15 de julio de 2026 a las 03:06
Idioma detectado de SKILL.md
inglés
Estrellas
0
Forks
1

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
cloudwatch
description
Query AWS CloudWatch logs (groups/streams/tail/Logs Insights), metrics, alarms and dashboards through the `datus cloudwatch` CLI
# CloudWatch `datus cloudwatch` reads AWS CloudWatch through boto3. Global usage: ``` datus cloudwatch [--profile <env>] <group> <subcommand> [args...] ``` `--profile` (before the group) selects the configured environment; add `-o json` to any command for machine-readable output (tables show a curated subset). Everything here is read-only except `alarms set-state`. ## Logs ``` datus cloudwatch logs groups [-p /aws/glue] [--limit N] datus cloudwatch logs streams <group> [--order-by LastEventTime|LogStreamName] [--limit N] datus cloudwatch logs get <group> <stream> [--limit N] [--start-from-head] datus cloudwatch logs tail <group> [--filter 'ERROR'] [--since 15m] [--follow] [--limit N] datus cloudwatch logs insights <group>... -q '<query>' --start -1h [--end now] [--limit N] ``` - `tail --follow` polls for new events until interrupted; `--since` takes `30s/15m/2h/1d`. `--filter` uses CloudWatch **filter pattern** syntax. - `insights` runs a Logs Insights query and **waits** for results (exit 1 if the query does not reach `Complete`). `--start`/`--end` accept ISO 8601, `now`, or relative `-1h/-30m/-2d`. Example query: `fields @timestamp, @message | filter @message like /ERROR/ | sort @timestamp desc | limit 20`. - Glue job logs live under `/aws-glue/jobs/output` and `/aws-glue/jobs/error`. ## Metrics ``` datus cloudwatch metrics list [--namespace AWS/Lambda] [--name Errors] datus cloudwatch metrics get --namespace AWS/Lambda --name Errors --stat Sum \ --start -1h [--end now] [--period 300] [-d FunctionName=my-fn] ``` `--stat` is one of Average/Sum/Minimum/Maximum/SampleCount; `-d Name=Value` adds a dimension (repeatable). ## Alarms ``` datus cloudwatch alarms list [-p prefix] [--state ALARM] datus cloudwatch alarms get <name> datus cloudwatch alarms history <name> [--limit N] datus cloudwatch alarms set-state <name> --state ALARM|OK|INSUFFICIENT_DATA [--reason TEXT] ``` `set-state` is for testing composite alarms or temporary suppression — it does not change the alarm definition and the next evaluation overwrites it. ## Dashboards ``` datus cloudwatch dashboards list [-p prefix] datus cloudwatch dashboards get <name> ``` ## Exit codes `0` success · `1` runtime/API error (also: an insights query that did not complete) · `2` usage · `3` profile/config error.
Ver en GitHub