community.general.uptimerobot 模块 – 暂停和启动 Uptime Robot 监控
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible
包,您可能已经安装了这个集合。它不包含在 ansible-core
中。要检查是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用:ansible-galaxy collection install community.general
。您需要其他要求才能使用此模块,请参阅 要求 了解详细信息。
要在 playbook 中使用它,请指定:community.general.uptimerobot
。
概要
此模块将允许您启动和暂停 Uptime Robot 监控
要求
在执行此模块的主机上需要以下要求。
有效的 Uptime Robot API 密钥
参数
参数 |
注释 |
---|---|
Uptime Robot API 密钥。 |
|
要检查的监视器的 ID。 |
|
定义监视器是应该运行还是暂停。 选择
|
属性
属性 |
支持 |
描述 |
---|---|---|
支持: 无 |
可以在 |
|
支持: 无 |
当处于 diff 模式时,将返回有关已更改内容(或可能需要在 |
注释
注意
尚未实现对添加和删除监视器和警报联系人的支持。
示例
- name: Pause the monitor with an ID of 12345
community.general.uptimerobot:
monitorid: 12345
apikey: 12345-1234512345
state: paused
- name: Start the monitor with an ID of 12345
community.general.uptimerobot:
monitorid: 12345
apikey: 12345-1234512345
state: started