Ad Widget

Collapse

Zabbix remote commands not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kfadia
    Junior Member
    • Jul 2016
    • 14

    #1

    Zabbix remote commands not working

    hi

    I've tried Zabbix remote commands for both windows and linux hosts... It turns out that actions getting triggered, i can check in frontend but in logs zabbix agent never receives any commands to run.

    enabled Remote Commands to 1 in zabbix agent conf.

    I need to restart a webservice when HTTP 200 fails for that server. Trigger is all set and working fine. but there seems to be no communication between server and agent about command

    Any help will be thankful. if need more information let me know

    Thanks
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by kfadia
    Any help will be thankful. if need more information let me know
    If it is still not working it means that in agent setting still you've not changed EnableRemoteCommands=1
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      And on https://www.zabbix.com/documentation...remote_command
      in the middle of the page is :

      "Remote commands do not work with active Zabbix agents."
      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
      https://kloczek.wordpress.com/
      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
      My zabbix templates https://github.com/kloczek/zabbix-templates

      Comment

      • kfadia
        Junior Member
        • Jul 2016
        • 14

        #4
        Originally posted by kloczek
        If it is still not working it means that in agent setting still you've not changed EnableRemoteCommands=1
        Ohh no I had enabled it...

        the issue seemed to be, I am running Zabbix Agent in active mod. So hadn't open port 10050 on agent machine. Once i allowed it in firewall it commands started working fine.

        This step is critical for both Windows/Linux machines. as Active agent don't need to worry about firewall.

        Comment

        • kfadia
          Junior Member
          • Jul 2016
          • 14

          #5
          Originally posted by kloczek
          And on https://www.zabbix.com/documentation...remote_command
          in the middle of the page is :

          "Remote commands do not work with active Zabbix agents."
          yup learned that Hard-way... should include this in Zabbix Documentation.

          Comment

          • AlanDBA
            Junior Member
            • Jan 2014
            • 10

            #6
            Originally posted by kfadia
            hi

            I've tried Zabbix remote commands for both windows and linux hosts... It turns out that actions getting triggered, i can check in frontend but in logs zabbix agent never receives any commands to run.

            enabled Remote Commands to 1 in zabbix agent conf.

            I need to restart a webservice when HTTP 200 fails for that server. Trigger is all set and working fine. but there seems to be no communication between server and agent about command

            Any help will be thankful. if need more information let me know

            Thanks
            Did you manage to execute actions on active agents?
            What is your network scenario?
            Theres is a firewall between your zabbix server and the monitored host?
            Does your host has a public ip?

            Comment

            • kfadia
              Junior Member
              • Jul 2016
              • 14

              #7
              NO I made it to work in Passive//Active mode... have both

              Server= and ServerActive= pointing to same zabbix server...

              No there's no firewall but both zabbix server and agent are in two different AWS accounts, so had to modify Security Group and windows Firewall. Open inbound port 10050 on windows agent firewall, i think this turns active agent to passive agent.

              Comment

              Working...