INFO
工作流链接:workflow。
此工作流演示如何仅在指定营业时间内执行动作。
说明:
- 触发器:由告警或手动激活。
- 动作:检查当前时间是否在
America/New_York时区的营业时间内。如果是,则将businesshours字段设置为true来增强告警。
yaml
workflow:
id: businesshours
description: demonstrate how to do smth only when it's business hours
triggers:
- type: alert
- type: manual
actions:
- name: dismiss-alert
if: "keep.is_business_hours(timezone='America/New_York')"
provider:
type: mock
with:
enrich_alert:
- key: businesshours
value: "true"