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

