Ad Widget

Collapse

Bug : Zabbix-1.1beta6 - item "Update interval"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SAT QPass
    Member
    • Oct 2005
    • 61

    #1

    Bug : Zabbix-1.1beta6 - item "Update interval"

    This is not really a bug, but an issue, and not serious as that, I apologize for the "bug" misnomer. I have provided a patch to the items.php file which addresses this....

    The php code on the frontend allows for a value of 99999 (or slightly more than 1 day). I had used it at one point (previous beta) and subsequently deleted. I have since dropped my tables and recreated them from scratch from the zabbix schema file.

    I had opted to bring such a data point today in 1.1beta6 (schema creation was 1.1beta5) and found that it no longer accepts a value of 99999.

    Code from the frontend which suggests it is possible....

    Code:
    Update&nbsp;interval&nbsp;(in&nbsp;sec)</td>
    <td class="form_row_r">
    <input class="biginput" name="delay" size="5" value="99999"/>
    What the database schema reports.... (this is from 1.1beta6 which is still wrong)...

    Code:
    CREATE TABLE items (
            itemid          int(4) NOT NULL auto_increment,
            type            int(4) DEFAULT '0' NOT NULL,
            snmp_community  varchar(64) DEFAULT '' NOT NULL,
            snmp_oid        varchar(255) DEFAULT '' NOT NULL,
            snmp_port       int(4) DEFAULT '161' NOT NULL,
            hostid          int(4) NOT NULL,
            description     varchar(255) DEFAULT '' NOT NULL,
            key_            varchar(64) DEFAULT '' NOT NULL,
    [COLOR=Red]        delay           int(4) DEFAULT '0' NOT NULL,[/COLOR]
            history         int(4) DEFAULT '90' NOT NULL,
            trends          int(4) DEFAULT '365' NOT NULL,
    -- lastdelete is not longer required
    --      lastdelete      int(4) DEFAULT '0' NOT NULL,
            nextcheck       int(4) DEFAULT '0' NOT NULL,
            lastvalue       varchar(255) DEFAULT NULL,
            lastclock       int(4) DEFAULT NULL,
            prevvalue       varchar(255) DEFAULT NULL,
            status          int(4) DEFAULT '0' NOT NULL,
            value_type      int(4) DEFAULT '0' NOT NULL,
            trapper_hosts   varchar(255) DEFAULT '' NOT NULL,
            units           varchar(10)     DEFAULT '' NOT NULL,
            multiplier      int(4)  DEFAULT '0' NOT NULL,
            delta           int(1)  DEFAULT '0' NOT NULL,
            prevorgvalue    double(16,4)  DEFAULT NULL,
            snmpv3_securityname     varchar(64) DEFAULT '' NOT NULL,
            snmpv3_securitylevel    int(1) DEFAULT '0' NOT NULL,
            snmpv3_authpassphrase   varchar(64) DEFAULT '' NOT NULL,
            snmpv3_privpassphrase   varchar(64) DEFAULT '' NOT NULL,
    
            formula         varchar(255) DEFAULT '0' NOT NULL,
            error           varchar(128) DEFAULT '' NOT NULL,
    
            lastlogsize     int(4) DEFAULT '0' NOT NULL,
            logtimefmt      varchar(64) DEFAULT '' NOT NULL,
    
            PRIMARY KEY     (itemid),
            UNIQUE          shortname (hostid,key_),
    --      KEY             (hostid),
            KEY             (nextcheck),
            KEY             (status)
    ) type=InnoDB;
    Last edited by SAT QPass; 15-02-2006, 00:53. Reason: Mis-stated trigger when I meant item and it is not a "bug" but an issue. I have submitted a patch.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    The de;ay is currently limited to 65535 seconds, items.php

    "delay"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535),'isset({save})&&{type}!=2'),

    As for the upgrade patch, it shoudn't contain the '-'. It is a known issue which is already fixed.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • SAT QPass
      Member
      • Oct 2005
      • 61

      #3
      Originally posted by Alexei
      The de;ay is currently limited to 65535 seconds, items.php

      "delay"=> array(T_ZBX_INT, O_OPT, NULL, BETWEEN(0,65535),'isset({save})&&{type}!=2'),

      As for the upgrade patch, it shoudn't contain the '-'. It is a known issue which is already fixed.
      May I ask what the reason for this limit is? 18.2 hours seems particularly arbitrary. Is there a reason this could not be increased to a full 24 hours?

      Comment

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

        #4
        Sure, it can be increased!
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • SAT QPass
          Member
          • Oct 2005
          • 61

          #5
          Originally posted by Alexei
          Sure, it can be increased!
          I have attached the patch to items.php.
          Code:
          --- items.php   2006-02-07 05:04:32.000000000 -0800
          +++ items_delay_86400.php       2006-02-14 14:32:50.000000000 -0800
          @@ -52,7 +52,7 @@
                          "description"=> array(T_ZBX_STR, O_OPT,  NULL,  NOT_EMPTY,'isset({save})'),
                          "key"=>         array(T_ZBX_STR, O_OPT,  NULL,  NOT_EMPTY,'isset({save})'),
                          "host"=>        array(T_ZBX_STR, O_OPT,  NULL,  NOT_EMPTY,'isset({save})'),
          -               "delay"=>       array(T_ZBX_INT, O_OPT,  NULL,  BETWEEN(0,65535),'isset({save})&&{type}!=2'),
          +               "delay"=>       array(T_ZBX_INT, O_OPT,  NULL,  BETWEEN(0,86400),'isset({save})&&{type}!=2'),
                          "history"=>     array(T_ZBX_INT, O_OPT,  NULL,  BETWEEN(0,65535),'isset({save})'),
                          "status"=>      array(T_ZBX_INT, O_OPT,  NULL,  BETWEEN(0,65535),'isset({save})'),
                          "type"=>        array(T_ZBX_INT, O_OPT,  NULL,  IN("0,1,2,3,4,5,6,7"),'isset({save})'),

          Comment

          • elkor
            Senior Member
            • Jul 2005
            • 299

            #6
            Originally posted by SAT QPass
            May I ask what the reason for this limit is? 18.2 hours seems particularly arbitrary. Is there a reason this could not be increased to a full 24 hours?
            somebody failed to whip out their hex calculator ;-)

            Comment

            • SAT QPass
              Member
              • Oct 2005
              • 61

              #7
              Originally posted by elkor
              somebody failed to whip out their hex calculator ;-)
              I am suitably shamed. However, I still needed 24 hours

              Comment

              • bbrendon
                Senior Member
                • Sep 2005
                • 870

                #8
                Is > 65535 going to be allowed in beta8? I have some 86400's ...and i just ran into this while editing some of my items. According to the thread, the datatype is plenty. If you want to limit us to 65535 then use unsigned int(2)

                I'm on beta7.
                Last edited by bbrendon; 27-02-2006, 03:08.
                Unofficial Zabbix Expert
                Blog, Corporate Site

                Comment

                Working...