Ad Widget

Collapse

Zabbix Agent problems with scripts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • motarion
    Junior Member
    • May 2010
    • 19

    #1

    Zabbix Agent problems with scripts

    Hi all !

    I got a problem with Zabbix Agent. I wrote an SH script to check the hard raid status on a Dell Host.

    When I manually run the script on the Dell Host, it gives me the good value (1 for the instance). When I do a Zabbix Get from the Zabbix Server, I got 0 as the value. But I should have 1 because one hard drive is broken.

    Yes I use the good key to run the correct script. I also changed the script to just "echo 777" and the value is correctly retrieved by Zabbix Get.

    Zabbix Get and Zabbix Agent are not the same version, and worse not the same major realease. But it should be compatible as I could see in the documentation.

    I don't understant WHY a more complex script gives a bad information through Zabbix Get but not a very simple ECHO.

    If any one has some clue on that I'll be glad to hear it !

    Thank you for your time !

    For information:
    Zabbix Get is version 2.0.5
    Zabbix Agent is version 1.8.3
  • dale
    Junior Member
    • Oct 2011
    • 26

    #2
    Perhaps you are testing it on the command line as user root and running it through zabbix agent as user zabbix. Try adding something like 'id > /tmp/test' to the script and check the output in /tmp/test.

    Comment

    Working...