IPFIX::destination¶
Description¶
Provides the ability to open and close IPFIX logging destinations in
the context of an iRule, as well as the ability to send IPFIX messages
to the IPFIX logging destinations.
Syntax¶
IPFIX::destination open -publisher LOG_PUBLISHER
IPFIX::destination close IPFIX_DESTINATION
IPFIX::destination send IPFIX_DESTINATION IPFIX_MESSAGE
IPFIX::destination open -publisher LOG_PUBLISHER¶
- Returns an IPFIX_DESTINATION object that allows the user to send messages to the specified LOG_PUBLISHER via the IPFIX::destination send command.
- It is recommended to store the resulting IPFIX_DESTINATION object in a static variable so that it is accessible for all instances of the rule. If the IPFIX_DESTINATION object is not stored statically, it will be opened each time the rule is executed and a new IPFIX_DESTINATION object will be generated each time.
- The LOG_PUBLISHER is a reference to a log publisher configured on the BIGIP that includes a netflow or IPFIX logging destination. e.g. /Common/my_log_publisher
IPFIX::destination send IPFIX_DESTINATION IPFIX_MESSAGE¶
- Causes the provided IPFIX_MESSAGE to be sent to the specified IPFIX_DESTINATION. The IPFIX_MESSAGE object is created via the IPFIX::msg create command, and the IPFIX_DESTINATION is created vi the IPFIX::destination open command.
Valid During¶
ANY_EVENT
Examples¶
when RULE_INIT {
set static::http_track_dest ""
set static::http_track_tmplt ""
}
when CLIENT_ACCEPTED {
if { $static::http_track_dest == "" } {
# open the logging destination if it has not been, opened yet
set static::http_track_dest [IPFIX::destination open -publisher /common/ipfix_publisher]
}
if { $static::http_track_tmplt == "" } {
# if the template has not been created yet, create the template
set static::http_track_tmplt [IPFIX::template create "flowStartSeconds sourceIPv4Address \
tcpSourcePort destinationIPv4Address \
tcpDestinationPort" ]
}
}
when HTTP_REQUEST {
# create a new message for this request
set msg [IPFIX::msg create $static::http_track_tmplt]
#set information in the message from the http request
IPFIX::msg set $msg flowStartSeconds [clock seconds]
IPFIX::msg set $msg sourceIPv4Address [IP::client_addr]
IPFIX::msg set $msg tcpSourcePort [TCP::client_port]
}
when HTTP_RESPONSE_RELEASE {
# set information in the message from the response
IPFIX::msg set $msg destinationIPv4Address [IP::server_addr]
IPFIX::msg set $msg tcpDestinationPort [TCP::server_port]
# send the message
IPFIX::destination send $static::http_track_dest $msg
}
Change Log¶
@BIGIP-11.5.0
- First introduced the command.
The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.