This forum is for all security enthusiasts to discuss Fortinet's latest & evolving technologies and to connect & network with peers in the cybersecurity hemisphere. Share and learn on a broad range of topics like best practices, use cases, integrations and more. For support specific questions/resources, please visit the Support Forum or the Knowledge Base.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
<collectAndSetAttrFromAnotherEvent AnotherEventType="Cisco-IronPort-Mail-From">
<when test="$ironportMailMID = $AnotherEvent.ironportMailMID">
<setEventAttribute attr="receiverMailAddr">$AnotherEvent.receiverMailAddr</setEventAttribute>
</when>
</collectAndSetAttrFromAnotherEvent>
In your case, you would want to retrieve the last time the interface went up or down and calculate the time between the two events. So you would want to use a function like calculateMSec once you assign the event receive time from the other event to a temp variable.
Example
<when test='$eventType IN "PH_DEV_MON_INTF_OPER_DOWN_TO_UP,PH_DEV_MON_INTF_OPER_DOWN_TO_UP"'>
<collectAndSetAttrFromAnotherEvent AnotherEventType="PH_DEV_MON_INTF_OPER_DOWN_TO_UP OR PH_DEV_MON_INTF_OPER_DOWN_TO_UP">
<when test="$intfName = $AnotherEvent.intfName">
<setEventAttribute attr="_lastChanged">$AnotherEvent.phRecvTime</setEventAttribute>
<setEventAttribute attr="durationMSec">calculateMSec($_lastChanged)</setEventAttribute>
</when>
</collectAndSetAttrFromAnotherEvent>
</when>
This example code is untested. It is only provided as an example. Please use at your own risk.
Word of advice
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.