Ad Widget

Collapse

PATCH:fuzzytime not correct

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tapto
    Junior Member
    • Nov 2006
    • 28

    #1

    PATCH:fuzzytime not correct

    Posted this in wrong forum ?

    Problem fuzzytime dont work with parameter oter than 0, and
    debug logging dosn't work with fuzzytime.


    diff -Naur zabbix-1.1.3.orig/src/zabbix_server/evalfunc.c zabbix-1.1.3/src/zabbix_server/evalfunc.c
    --- zabbix-1.1.3.orig/src/zabbix_server/evalfunc.c 2006-10-23 13:23:21.000000000 +0200
    +++ zabbix-1.1.3/src/zabbix_server/evalfunc.c 2006-11-12 09:30:32.000000000 +0100
    @@ -1078,8 +1078,8 @@
    else if(strcmp(function,"fuzzytime")==0)
    {
    now=time(NULL);
    - fuzlow=(int)(now+atoi(parameter));
    - fuzhig=(int)(now-atoi(parameter));
    + fuzlow=(int)(now-atoi(parameter));
    + fuzhig=(int)(now+atoi(parameter));

    if(item->lastvalue_null==1)
    {
    @@ -1087,7 +1087,6 @@
    }
    else
    {
    - zabbix_log( LOG_LEVEL_DEBUG, "In evaluate_FUNCTION() fuzzytime [%s] [%s]",value,item->lastvalue);

    if((item->lastvalue>=fuzlow)&&(item->lastvalue<=fuzhig))
    {
    @@ -1097,6 +1096,9 @@
    {
    strcpy(value,"0");
    }
    +
    + zabbix_log( LOG_LEVEL_DEBUG, "In evaluate_FUNCTION() fuzzytime (%s) (%s)",value,item->lastvalue_str);
    +
    }
    }
    else if(strcmp(function,"logseverity")==0)
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Thanks for reporting this and for the patch! Fixed.

    Please do not duplicate your posts, one post per issue please.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    Working...