2020-10-24 15:27:02 +02:00
|
|
|
# awslogs
|
|
|
|
|
2021-05-20 16:13:41 -04:00
|
|
|
> CLI um Log-Gruppen, Streams und Events von Amazon CloudWatch Logs abzurufen.
|
2021-04-24 13:09:56 +02:00
|
|
|
> Weitere Informationen: <https://github.com/jorgebastida/awslogs>.
|
2020-10-24 15:27:02 +02:00
|
|
|
|
2021-03-25 17:42:04 +01:00
|
|
|
- Liste alle Log-Gruppen auf:
|
2020-10-24 15:27:02 +02:00
|
|
|
|
|
|
|
`awslogs groups`
|
|
|
|
|
2021-10-22 17:03:00 +02:00
|
|
|
- Liste alle bestehenden Streams einer angegebenen Loggruppe auf:
|
2020-10-24 15:27:02 +02:00
|
|
|
|
|
|
|
`awslogs streams {{/var/log/syslog}}`
|
|
|
|
|
2021-10-22 17:03:00 +02:00
|
|
|
- Rufe alle Logs für jegliche Streams in der angegebenen Log-Gruppe für die letzten 1 bis 2 Stunden ab:
|
2020-10-24 15:27:02 +02:00
|
|
|
|
|
|
|
`awslogs get {{/var/log/syslog}} --start='{{2h ago}}' --end='{{1h ago}}'`
|
|
|
|
|
2021-05-20 16:13:41 -04:00
|
|
|
- Rufe alle Logs für einen bestimmten CloudWatch-Logs Filter-Ausdruck ab:
|
2020-10-24 15:27:02 +02:00
|
|
|
|
2021-03-25 17:42:04 +01:00
|
|
|
`awslogs get {{/aws/lambda/meine_lambda_gruppe}} --filter-pattern='{{ERROR}}'`
|
2020-10-24 15:27:02 +02:00
|
|
|
|
2021-03-25 17:42:04 +01:00
|
|
|
- Beobachte Logs für jegliche Streams in der angegebenen Log-Gruppe:
|
2020-10-24 15:27:02 +02:00
|
|
|
|
|
|
|
`awslogs get {{/var/log/syslog}} ALL --watch`
|