Skip to main content
Question

Math.round is not working on Rules Editor

  • November 5, 2025
  • 1 reply
  • 22 views

leezanelatto
Forum|alt.badge.img

Hello!

I have a rule that round a value, but when I put the rule in the rule editor I have the following error: “parsing: function math.round not found line: 29 column: 22-32”

 

The rule that I’m trying to create is: 

 

 events:

    $e.metadata.log_type =$log_type

    $e.metadata.event_timestamp.seconds =$log_time

 

  match:

    $log_type over 60m

 

  outcome:

  $last_event_timestamp = max($log_time)

  $min_event_timestamp = min($log_time)

  $now_ts = timestamp.now()

  $diferenca= $now_ts-$last_event_timestamp

  $time_in_minutes = math.round($diferenca/60)

  $date_event_first = timestamp.get_timestamp( $min_event_timestamp,"SECOND", "GMT")

  $date_event_last = timestamp.get_timestamp( $last_event_timestamp,"SECOND", "GMT")

  $date_event_now = timestamp.get_timestamp( $now_ts,"SECOND", "GMT")

 

  condition:

  $e and $time_in_minutes > 55

1 reply

_K_O
Forum|alt.badge.img+12
  • Bronze 5
  • November 6, 2025

Based on this post from last year, math.round is currently only available in search: 

 

I tested it in search and rule creation as well, and it still only works in Search.