Ad Widget

Collapse

Force agent to push data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KaeruCT
    Junior Member
    • Nov 2016
    • 1

    #1

    Force agent to push data

    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):
    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
    I already thought of restarting the agent, but that seems a bit hacky to me.

    Thanks for any suggestions you can give me.
  • vso
    Zabbix developer
    • Aug 2016
    • 190

    #2
    Zabbix sender could do the trick, depending on your needs.

    Comment

    Working...