Applies To:
Show VersionsBIG-IP AAM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP APM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP GTM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP Analytics
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP Link Controller
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP LTM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP PEM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP AFM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
BIG-IP ASM
- 11.6.5, 11.6.4, 11.6.3, 11.6.2, 11.6.1
Customizing IPFIX Logging with iRules
Overview: Customizing IPFIX logging with iRules
You can configure iRules® to parse incoming packets and create IPFIX logs for them.
The BIG-IP® system supports logging of any network events over the IPFIX protocol. An iRule matches any network event that you choose and creates a customized IPFIX log from the given event.
The IPFIX logs use the information model described in RFC 5102. IPFIX logs are raw, binary-encoded strings with their fields and field lengths defined by IPFIX templates. IPFIX collectors are external devices that can receive IPFIX templates and logs.
The configuration process involves creating and connecting the following configuration objects.
Object | Reason |
---|---|
Pool of IPFIX collectors | Create a pool of IPFIX collectors to which the BIG-IP system can send IPFIX log messages. |
Destination | Create a log destination to format the logs in IPFIX templates, and forward the logs to the IPFIX collectors. |
Publisher | Create a log publisher to send logs to a set of specified log destinations. |
iRule | Create an iRule that matches a network event, creates an IPFIX log to record the event, and sends the IPFIX log to the above publisher. |
Virtual Server | Create a virtual server to process network traffic, or edit an existing virtual server. Add the iRule to the virtual-server configuration so that the iRule parses all of the virtual server's network traffic. |
This illustration shows the association of the configuration objects for IPFIX logging through iRules.
Association of logging configuration objects
Task summary
Perform these tasks to configure iRules for IPFIX logging.Assembling a pool of IPFIX collectors
Creating an IPFIX log destination
A log destination of the IPFIX type specifies that log messages are sent to a pool of IPFIX collectors. Use these steps to create a log destination for IPFIX collectors.
Creating a publisher
About standard IPFIX elements
The BIG-IP® software is shipped with the latest Information Elements (IEs) published by IANA. Each standard element is built into the system. You can use a standard element in your iRules® by using its name and a ":base" extension (for example, "deltaFlowCount:base" or "observationTimeSeconds:base").
You can use this tmsh command to identify the available base IEs on the system:
list sys ipfix element
If an element is defined by IANA after the BIG-IP software is built, the element is not available in the system software. You can use a similar tmsh command, create sys ipfix element ..., to create such an element and use it in your iRules.
Writing an iRule for custom IPFIX logging
- Open an IPFIX::destination.
- Create an IPFIX::template.
- Create an IPFIX::msg (using the IPFIX::template).
- Set values for the IPFIX elements in the IPFIX::msg.
- Send the IPFIX::msg to the IPFIX::destination.
Follow these steps to create all of these components.
Adding the iRule to a virtual server
Showing IPFIX statistics
Advanced IPFIX iRule tasks
Creating customized IPFIX elements
IPFIX is a logging protocol that defines templates for each log message. Each template contains one or more IPFIX elements (also known as Information Elements [IEs]) in a specific order. Many IPFIX elements are defined by IANA; you can use the following steps to define your own.
Cleaning up memory in an IPFIX iRule
Implementation result
Now you have an implementation in which the BIG-IP® system logs messages about network events and sends the log messages to a pool of IPFIX collectors.