Ad Widget

Collapse

Strange behavior of {{HOSTNAME}:{TRIGGER.KEY}.last(0)}

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Umair
    Member
    • Feb 2007
    • 86

    #1

    Strange behavior of {{HOSTNAME}:{TRIGGER.KEY}.last(0)}

    I have defined an ITEM which is returning a string that is too long to be contained in CHARACTER.

    So, i am using TEXT to store the string returned.
    The LATEST DATA shows the complete string which is returned form the Agent.


    PROBLEM :

    When i write the following command in ACTION to send an email.

    {{HOSTNAME}:{TRIGGER.KEY}.last(0)}

    It returns only the first line of the String.
    Strange...!!

    I tried changing the ITEM return value to LOG, so that it could support more text.

    Now, when the email was sent, it showed me an incomplete part of the string...
    only the first 4 lines....
    It did not show me the complete string.

    Any cluses as how i can get the full string returned by the ITEM in the Email Body ?

    --
    Regards
    Umair
  • Umair
    Member
    • Feb 2007
    • 86

    #2
    In Reference to the command (which i am using in ACTION as a content of my email):

    {{HOSTNAME}:{TRIGGER.KEY}.last(0)}

    with last(0) :

    I did some research of my own and found that this command returns a fixed string of length 255 characters. (i only used it in the email body)
    Is this some sort of an implication or a bug ?

    Our scenario involves reporting back the exceptions which would have been raised if a process dies.
    If i am getting some response from a code, i would definitely want to see the whole message in the email instead of the defined 255 characters.

    Is this a Bug ???
    Last edited by Umair; 29-06-2007, 10:57.

    Comment

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

      #3
      I would call it a limitation not a bug
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • Umair
        Member
        • Feb 2007
        • 86

        #4
        awwww...

        Umm, dont you think this limitation is kind of a drawback ?
        Like in our sceanrio, we can do nothing except trim down our exceptions.

        can it be changed ??
        i mean by changing the DB Field's size ?? (If that is the only thing which requires change).

        Comment

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

          #5
          Originally posted by Umair
          Umm, dont you think this limitation is kind of a drawback ?
          Yes, I do think so! It will be addressed in one of future releases.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • Umair
            Member
            • Feb 2007
            • 86

            #6
            Alexei, Has this problem also been solved in 1.4.1 ??

            Comment

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

              #7
              No, it wasn't.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              • radamand
                Member
                • Aug 2008
                • 89

                #8
                very easy fix, im surprised a dev hasn't mentioned it.

                change the field type of "lastvalue" & "prevvalue" in zabbix.items from varchar(255) to Text.

                Comment

                • jjochum
                  Junior Member
                  • Jun 2009
                  • 2

                  #9
                  Originally posted by radamand
                  very easy fix, im surprised a dev hasn't mentioned it.

                  change the field type of "lastvalue" & "prevvalue" in zabbix.items from varchar(255) to Text.
                  didn't work for me. however, I made a patch for src/libs/zbxserver/evalfunc.c.

                  Comment

                  Working...