Skip to content

Instantly share code, notes, and snippets.

@boristane
Forked from m-makuch/index.yml
Last active December 5, 2022 01:13
Show Gist options
  • Select an option

  • Save boristane/581290d724507cf560339abb87afc2fb to your computer and use it in GitHub Desktop.

Select an option

Save boristane/581290d724507cf560339abb87afc2fb to your computer and use it in GitHub Desktop.
baselime shared template
version: 0.0.21
service: bar-test
description: coolest templates in the world
provider: aws
variables:
env:
default: prod
level:
default: ERROR
duration:
description: The description here
default: 50mins
threshold:
default: 10
lambda-errors:
type: query
properties:
name: Events with LogLevel ERROR
description: Count of the number of events with LogLevel ERROR
parameters:
calculations:
- COUNT
datasets:
- logs
namespaces:
- my-{{env}}-funtion
filters:
- LogLevel = {{level}}
groupBy:
limit: 10
orderBy: COUNT
type: string
value: namespace
lambda-invocations-durations:
type: query
properties:
name: Duration of lambda invocations
description: Statistics on the duration of lambda invocations across the application
parameters:
calculations:
- MAX(@duration)
- P99(@duration)
datasets:
- logs
filters:
- "@type = REPORT"
groupBy:
limit: 5
orderBy: P99(@duration)
type: string
value: namespace
new-alert:
type: alert
properties:
channels:
- type: slack
targets:
- baselime-alerts
parameters:
window: {{ duration }}
threshold: "> {{threshold}}"
frequency: {{ duration }}
query: !ref lambda-invocations-durations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment