Ad Widget

Collapse

active check numeric item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ad@kbc-clearing.com
    Member
    • Sep 2005
    • 77

    #1

    active check numeric item

    We are using zabbix stable 1.1.1.
    We are doing some tests with active checks with a win32 agent.
    It works fine for character items, but not for numerical items.

    Because we want to display the items in a graph, we need numerical items.

    Anyone knows how to solve this ?
  • erisan500
    Senior Member
    Zabbix Certified Specialist
    • Aug 2005
    • 285

    #2
    Would be helpfull ofcourse if you specified your item settings.

    Just saying "It doesn't work" doesn't help us to solve your problem.

    Greetings
    EriSan
    Zabbix Certified Specialist

    Comment

    • ad@kbc-clearing.com
      Member
      • Sep 2005
      • 77

      #3
      Thanks for your quick reply.
      Some more details :

      The item settings are:
      desc : test
      type : zabbix agent (active)
      key : test
      type of information : character
      update interval : 10
      status : monitored

      The key "test" is defined as a userparameter in the agent.
      It is an awk script that extracts a jobstep from a job-report.
      This jobstep is a numerical item (e.g. 4).
      If I set the "type of information" of the item to character, then the item is refreshed every 10 seconds (I am looking into Latest data).
      If I set the "type of information" of the item to numerical, then the item is not refreshed anymore. (last check doesn't change).

      By the way: I found out that numeric calculations in triggers are possible with character items.
      e.g. "{host:test.last(0)} * 6 > 10 " works !
      So the character is translated to numeric when evaluating the trigger.

      Comment

      • ad@kbc-clearing.com
        Member
        • Sep 2005
        • 77

        #4
        Just checked the log file on the server.
        Found an interesting message :
        031364:20060829:110445 Type of received value [4] is not suitable for [test@host]

        We get this message when the type of the item is numerical.
        When the type of the item is character, then no problem.

        The server apparantly is not able to convert the value "4" to a numerical item.

        Comment

        • erisan500
          Senior Member
          Zabbix Certified Specialist
          • Aug 2005
          • 285

          #5
          make sure that the output of your script does NOT contains a LF or CR.


          Greetings
          EriSan
          Zabbix Certified Specialist

          Comment

          • ad@kbc-clearing.com
            Member
            • Sep 2005
            • 77

            #6
            Oke, that was a good idea !

            I noticed that there was a CRLF in the output of the awk-script (I used the print statement; changed it to printf).
            To test, I redirected the output to a file, to check if there are no 'hidden' characters (checked it with a hex-viewer).
            I am using a lot of userparameters with this script; all are numeric with "passive check". They all work fine.
            The one I am testing now is with an active check.

            Still I get the same errormessage in the logfile of the server
            "
            018787:20060829:180146 Type of received value [4
            ] is not suitable for [verslag[USAwachten]@WS-XP]
            "
            Notice the newline after the 4. That indicates that there is a "hidden" character after the 4; but I am sure that the output of the "print" statement in the awk-script does not contain a crlf.

            Could it be an unwanted feature of the windows-tcp-socket between the agent and the server ?
            Wouldn't it be easier if the zabbix-server would strip trailing spaces/cr/lf with numerical items in active checks ?

            Comment

            Working...