Hello,
I need to force the Zabbix agent to send the data to the Zabbix server, on demand.
I am using active checks because my machines are behind a firewall, however, I need to open the port on the firewall and then close it (don't ask why...) after the agent has finished.
I wonder if it's possible to have a script like this (pseudocode):
I already thought of restarting the agent, but that seems a bit hacky to me.
Thanks for any suggestions you can give me.
I need to force the Zabbix agent to send the data to the Zabbix server, on demand.
I am using active checks because my machines are behind a firewall, however, I need to open the port on the firewall and then close it (don't ask why...) after the agent has finished.
I wonder if it's possible to have a script like this (pseudocode):
Code:
# set up firewall stuff before sending data iptables -A OUTPUT -p tcp -d zabbix.server.lan --dport 10050 -j ACCEPT ./zabbix_agent --force-send # undo firewall stuff after the agent has sent the data iptables -D OUTPUT -p tcp -d zabbix.server.lan --dport 10050 -j ACCEPT
Thanks for any suggestions you can give me.
Comment