Ad Widget

Collapse

When value =0 , item flips to not supported.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cybaspace
    Member
    • Jul 2005
    • 43

    #1

    When value =0 , item flips to not supported.

    Hi there!

    I am using zabbix 1.1 beta 2 (yeah I know, bit of an old beta ;-)
    It doe the job pretty well, but I have one big problem:

    On a machine with zabbix agent I have installed a script that checks other hosts. It returns '1' or '0', wich means that the host is up or down on the port I put in the script.

    When I make a userparameter that uses that script, I can see that hosts that are up, nicely return a '1' in zabbix, but the hosts that return '0' will flip to 'not supported' and therefore not be checked again.

    I can see in the agent log that if it returns '0' , that the agent returns:

    011266:20060413:121757 Sending back:ZBX_NOTSUPPORTED

    Is this an issue of my early beta and is it fixed in a later beta of zabbix or is this a new problem?

    thanks!
    Last edited by cybaspace; 13-04-2006, 13:15.
  • elkor
    Senior Member
    • Jul 2005
    • 299

    #2
    It shouldn't do that, are you sure it's actually retuning a "0" and not "0 " or something?

    can you post the script and the entries in the agentd conf file as well as the item definition here, it might help people look at your problem.

    Comment

    • cybaspace
      Member
      • Jul 2005
      • 43

      #3
      It's a rather simple script:

      /bin/netcat -vzn -w1 $1 $2 2> /tmp/checkport.tmp
      /bin/grep -c open /tmp/checkport.tmp


      the user wich runs zabbux_agentd has permissions to grep and netcat.

      maybe it's a sort of timeout?
      If I make a userparameter with simply 'echo 0'in it, it returns the value correct in zabbix...

      this is what's in zabbix_agentd.log in debug mode 4:

      ----------------
      011266:20060413:121756 In check_security()
      011266:20060413:121756 Connection from [10.80.101.179]. Allowed servers [10.80.101.179]
      011266:20060413:121756 Before read()
      011266:20060413:121756 After read() 2 [19]
      011266:20060413:121756 Got line:checkport[liffe80]
      011266:20060413:121757 Sending back:ZBX_NOTSUPPORTED
      -----------------

      Except the userparameters, the settings in zabbix_agentd.conf are default.

      thanks!
      Last edited by cybaspace; 13-04-2006, 14:24.

      Comment

      • elkor
        Senior Member
        • Jul 2005
        • 299

        #4
        what is $2 in your script.. it looks like you are only passing 1 parameter, [liffe80]


        edit: nevermind, that's $2 to netcat.... are you actually sending liffe80 or is it liffe, 80 it's weird that it's all crammed together like that in the log file

        also: doesn't the -n parameter to nc mean you need to use a numeric address?

        (sorry for the late reply had to go to a meeting)
        Last edited by elkor; 13-04-2006, 16:00.

        Comment

        • cybaspace
          Member
          • Jul 2005
          • 43

          #5
          Thanks for the reply!

          I have found a kinda strange solution for my problem.
          I have put the output of the command in a tempfile, after that cat that tempfile and presto, it worked!

          Kinda strange solution, but it did the trick!

          Thanks for the help anyway!

          Comment

          Working...