Ad Widget

Collapse

After upgrading from 6.4 to 7 MACRO is not accepted in Custom intervals value field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gbmadmin
    Junior Member
    • Mar 2020
    • 18

    #1

    After upgrading from 6.4 to 7 MACRO is not accepted in Custom intervals value field

    I have a few items with the custom interval value set to a MACRO (both flexible and scheduling). They were working fine in 6.4, but after upgrading to 7 the item's status switches to 'Not supported' and it's not run anymore.

    The error shown is: Invalid scheduling interval "{$INVERTER_CHECK}". A similar error is thrown if the flexible option is selected.

    Now, I am 100% sure the problem is due to putting MACRO in the value field, because if I substitute the macro {$INVERTER_CHECK} with the actual value the error goes away and the item is executed normally (like it was in v.6.4, but WITH THE MACRO in the value field)

    Example
    Macro is definined like this:
    Code:
    {$INVERTER_CHECK} = 1-7,05:50-21:00
    Custom intervals
    Code:
    Type = Flexible
    Interval = 60
    Period = 1-7,05:50-21:00
    runs OK
    but
    Code:
    Type = Flexible
    Interval = 60
    Period = {$INVERTER_CHECK}
    throws Invalid scheduling interval "{$INVERTER_CHECK}" error

    I searched the release notes but didn't find any reference to this. Maybe I am missing something in the update, otherwise it looks like a bug to me.

    Thanks for your help!
    Last edited by gbmadmin; 02-08-2024, 15:37.
  • gbmadmin
    Junior Member
    • Mar 2020
    • 18

    #2
    A quick BTTT after one week

    As anyone experienced a similar situation? I mean, having a MACRO value in a custom interval and getting the error after upgrading from 6.4 to 7.0 ? I tried to find the source of the error but the source code is too complex to find it.

    MACRO value looks good to me, so the error shuldn't be thrown in zbx_user_macro_parse()


    Maybe something in src/libs/zbxexpr/interval.c ?

    But again I couldn't find any recent committed change to justify the error. Any help will be highly appreciated, thanks!


    Comment

    Working...