Zabbix 5 API 调用以启用或禁用主机
Zabbix 5 API call to enable or disable host
我正在尝试在有特定触发器时启用或禁用。任何人都可以给我提示吗?
我知道当触发器被触发时,我可以对 运行 某些命令或脚本使用“操作”。
我几乎不知道从哪里开始做这件事。
来自Action - Operations documentation:
With remote commands you can define that a certain pre-defined command
is automatically executed on the monitored host upon some condition.
并且:
Configuring an action for remote commands is similar to that for
sending a message, the only difference being that Zabbix will execute
a command instead of sending a message.
Remote commands can be executed by Zabbix server, proxy or agent.
Remote commands on Zabbix agent can be executed directly by Zabbix
server or through Zabbix proxy.
另外,页面中有示例。
我正在尝试在有特定触发器时启用或禁用。任何人都可以给我提示吗? 我知道当触发器被触发时,我可以对 运行 某些命令或脚本使用“操作”。 我几乎不知道从哪里开始做这件事。
来自Action - Operations documentation:
With remote commands you can define that a certain pre-defined command is automatically executed on the monitored host upon some condition.
并且:
Configuring an action for remote commands is similar to that for sending a message, the only difference being that Zabbix will execute a command instead of sending a message.
Remote commands can be executed by Zabbix server, proxy or agent. Remote commands on Zabbix agent can be executed directly by Zabbix server or through Zabbix proxy.
另外,页面中有示例。