Functions
to_utc
Overview
Development
Deployment
- Configuration
- Authentication
- Provision
- Secret Manager
- Docker
- Kubernetes
- AWS ECS
- Specifications
Providers
- Overview
- Fingerprints
- Adding a New Provider
- Getting Started
- What is a Provider?
- Supported Providers
Workflows
Keep API
- GETRoot
- providers
- actions
- healthcheck
- topology
- alerts
- deduplications
- maintenance
- incidents
- settings
- workflows
- whoami
- pusher
- status
- rules
- preset
- enrichment
- auth
- metrics
- users
- groups
- mappings
- dashboard
- tags
Keep CLI
Functions
to_utc
Input
datetime.datetime | str
Output
datetime.datetime - utc converted
Example
actions:
- name: trigger-slack
condition:
- type: threshold
# datetime_compare(t1, t2) compares t1-t2 and returns the diff in hours
# utcnow() returns the local machine datetime in UTC
# to_utc() converts a datetime to UTC
value: keep.datetime_compare(keep.utcnow(), keep.to_utc("{{ steps.this.results[0][0] }}"))
compare_to: 1 # hours
compare_type: gt # greater than