输入
- message:要打印到控制台的告警消息。
输出
此 Provider 没有输出。
身份验证参数
此 Provider 不需要身份验证。
连接 Provider
此 Provider 不需要任何连接。
注意事项
暂无信息,欢迎使用页面底部的"编辑此页面"链接进行贡献。
相关链接
暂无信息,欢迎使用页面底部的"编辑此页面"链接进行贡献。
示例
python
config = {
"description": "Console Output Provider",
"authentication": {},
}
provider = ProvidersFactory.get_provider(
provider_id='mock', provider_type="console", provider_config=config
)
provider.notify(
message="Simple alert showing context with name: {name}".format(
name="John Doe"
)
)
在工作流中
此提供商可用于工作流。
作为"步骤"来查询数据,示例:
yaml
steps:
- name: Query console
provider: console
config: "{{ provider.my_provider_name }}"
with:
message: {value}
logger: {value}
severity: {value}作为"操作"来进行更改或更新数据,示例:
yaml
actions:
- name: Query console
provider: console
config: "{{ provider.my_provider_name }}"
with:
message: {value} # 要打印到控制台的消息
logger: {value} # 是否使用记录器
severity: {value} # 如果 logger 为 True,则为消息的严重程度请查看以下工作流示例:
- aks_basic.yml
- change.yml
- complex-conditions-cel.yml
- console_example.yml
- consts_and_dict.yml
- eks_advanced.yml
- eks_basic.yml
- fluxcd_example.yml
- gke.yml
- ifelse.yml
- incident-enrich.yaml
- incident_example.yml
- inputs_example.yml
- multi-condition-cel.yml
- mustache-paths-example.yml
- openshift_basic.yml
- openshift_monitoring_and_remediation.yml
- openshift_pod_restart.yml
- pattern-matching-cel.yml
- severity_changed.yml
- webhook_example.yml
- webhook_example_foreach.yml