Ad Widget

Collapse

Problem with "Remote commands".

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • steve
    Junior Member
    • Nov 2006
    • 24

    #1

    Problem with "Remote commands".

    Hy guys.
    I have a problem with the execution of the remote actions. In particular I cannot restart the service ssh. I precise that the user zabbix has all privileges to restart the service (I have tried as user zabbix from command line) and that I have modified the configuration file “/etc/sudoers” inserting the line
    “zabbix ALL= (ALL) NOPASSWD: ALL”.

    These are the parts in the log files of zabbix_server and zabbix_agentd (Debug Level =4) relative to the execution of the remote command.

    zabbix_agentd.log
    ...
    ...
    ...
    008085:20070105:112920 Got line:system.run['sudo /etc/init.d/ssh restart',nowait]
    008085:20070105:112920 RUN_COMMAND cmd = 'system.run['sudo /etc/init.d/ssh restart',nowait]'
    008085:20070105:112920 RUN_COMMAND flag = 'nowait'
    008085:20070105:112920 Run remote command ''sudo /etc/init.d/ssh restart''
    008085:20070105:112920 RUN_COMMAND to be started as NOWAIT
    008085:20070105:112920 Sending back:1
    ...
    ...
    ...


    zabbix_server.log
    ...
    ...
    ...
    008102:20070105:112920 get_value_agent: host[localhost] ip[127.0.0.1] key [system.run['sudo /etc/init.d/ssh restart',nowait]]
    008102:20070105:112920 Sending [system.run['sudo /etc/init.d/ssh restart',nowait]
    ]
    008102:20070105:112920 Type of received value [1] is not sutable for [system.run['sudo /etc/init.d/ssh restart',nowait]@localhost] having type [538976288]
    008102:20070105:112920 Returning NOTSUPPORTED
    008102:20070105:112920 run_remote_command [result:-2]
    008102:20070105:112920 get_next_command START [command_list: '']
    008102:20070105:112920 Result get_next_command [EOL]
    008102:20070105:112920 Run remote commands END
    ...
    ...
    ...

    Is there someone that knows what is the problem?
    Thanks for the help.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    What is your version of ZABBIX?
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • steve
      Junior Member
      • Nov 2006
      • 24

      #3
      I have installed version 1.1.3 of Zabbix on Ubuntu 6.0.6 LTS.

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Thanks for the details. It seems that the script was executed while ZABBIX server didn't accept the return value '1' and changed status of the item to UNSUPPORTED. It seems to be a bug.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • steve
          Junior Member
          • Nov 2006
          • 24

          #5
          I have another question for you, Alexei. If the script has been executed, why the service has not been restarted?
          And if it is a bug, it means that i can't use remote actions to restart any service or I can't restart only sshd?
          Is it possible to use a custom script that returns a value that zabbix is able to understand? If yes could you tell where i can find it?
          Thanks.

          Comment

          Working...