F5 LTM
  • 15 Nov 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

F5 LTM

  • Dark
    Light

Article summary

F5® BIG-IP® Local Traffic Manager™ (LTM) delivers applications to users in a reliable, secure, and optimized way. Events from LTM can be forwarded to DataBee via telemetry streaming.

Integration Method: HTTP Collector

Tables: HTTP Activity

DataBee Configuration

  1. Start by adding the F5 datasource. Log into the DataBee console, navigate to the Data tab and click on Add Data Source. Search for F5 LTM and click it

A screenshot of a computer  Description automatically generated

2. Select HTTP Collector as the ingest mechanism

A screenshot of a computer  Description automatically generated

3. Fill in the basic contact information

A screenshot of a web page  Description automatically generated

4. Select the defaults on the next dialog box

5. Click on generate new API key. Save this API Key as it will be used later. Click Submit

A screenshot of a computer  Description automatically generated

6. Navigate back to the Data>Datasource tab and click on the newly created F5 LTM card and copy the ID. This is the datasource_id that will be used later.

A screenshot of a device  Description automatically generated

  1. From the console, navigate to the system

A screenshot of a computer  Description automatically generated

  1. Go to the HTTP Collector box and copy the Endpoint URL. We will require the domain. In this example us-demo-2-api.demo.databee.buzz is the domain. It will be used at a later step. A screenshot of a computer  Description automatically generated

  2. Navigate to “My Profile” and copy the Tenant ID value

A screenshot of a computer  Description automatically generated

BigIP Configuration

This integration leverages the DataBee HTTP collector. Events are sent via HTTPs. To leverage this transport mechanism, F5 telemetry streaming has to be set up.

In the sample diagram below, DVWA is the application protected by F5.

For more information on F5 telemetry streaming, refer to:

Initial Setup

Downloading the RPM file

Configure Logging Manually

If you are using a standard BIG-IP system (one that does not have restrictions on the number of virtual servers like the Per-App VE), use the following guidance to initially configure the system.

  1. Create an iRule (localhost forwarder).
    Local Traffic > iRules > iRule List

iRule Name

telemetry_local_rule

Definition

when CLIENT_ACCEPTED {

node 127.0.0.1 6514

}

  1. Create the virtual server for the local listener.
    Local Traffic > Virtual Servers > Virtual Server List

Name

telemetry_local

Description

Only required when TS is a local listener

Source Address

0.0.0.0/0

Destination Address/Mask

255.255.255.254

Service Port

6514

Protocol Profile (Client)

f5-tcp-progressive

Source Address Translation

Auto Map

iRules

telemetry_local_rule

Default Persistence Profile

source_addr

  1. Create the pool.
    Local Traffic > Pools > Pool List

Name

Telemetry

Health Monitors

tcp

New Members

Address: 255.255.255.254

Service Port: 6514

  1. Create the Log Destination (Remote HSL):
    System > Logs > Configuration > Log Destinations

Name

telemetry_hsl

Type

Remote High-Speed Log

Pool Name

Telemetry

Protocol

TCP

  1. Create the Log Destination (Format):
    System > Logs > Configuration > Log Destinations

Name

telemetry_formatted

Type

splunk

Forward To

telemetry_hsl

  1. Create the Log Publisher:
    System > Logs > Configuration > Log Publisher

Name

telemetry_publisher

Destinations

telemetry_formatted

LTM Request Log profile

The Request Logging profile gives you the ability to configure data within a log file for HTTP requests and responses, in accordance with specified parameters.

Create an LTM Request Log Profile using the following TMSH command. Note: If you are creating the profile in the user interface, the \ are not required.

IMPORTANT: This step has been updated with the TS 1.18 release to include LTM response logging.

Create LTM Profile:

  1. Create a LTM Request Log Profile:
    Local Traffic > Profiles > Other > Request Logging > New Request Logging Profile

Name

telemetry_traffic_log_profile

Parent Profile

request-log

Request Logging

Enabled

Template

event_source="request_logging",hostname="$BIGIP_HOSTNAME",client_ip="$CLIENT_IP",server_ip="$SERVER_IP",http_method="$HTTP_METHOD",http_uri="$HTTP_URI",virtual_name="$VIRTUAL_NAME",event_timestamp="$DATE_HTTP"

HSL Protocol

TCP

Pool Name

telemetry

Response Logging

Enabled

Log By Default

Enabled (Tick Mark)

Template

event_source="response_logging",hostname="$BIGIP_HOSTNAME",client_ip="$CLIENT_IP",server_ip="$SERVER_IP",http_method="$HTTP_METHOD",http_uri="$HTTP_URI",virtual_name="$VIRTUAL_NAME",event_timestamp="$DATE_HTTP",http_statcode="$HTTP_STATCODE",http_status="$HTTP_STATUS",response_ms="$RESPONSE_MSECS"

HSL Protocol

TCP

Pool Name

telemetry

  1. Attach the profile to the virtual server:

Navigate to Local Traffic > Virtual Servers > Virtual Server List > [Virtual Server Name]
Go to Configuration: Advance search for “Request Logging Profile” add telemetry_traffic_log_profile

Declarations

This step is used to tell F5 BIGIP about the DataBee collector. It is pushed to F5 BigIP via a HTTP call. You will need to get the following information from DataBee. Refer to the DataBee configuration steps above

  • HTTP domain - Only use the domain

  • APIkey

  • TenantID

  • Datasource ID

Once you have this information, use a CURL command or tool like Postman to make the HTTP request.

CURL Command: 

  • Replace the placeholders in the block below

    • F5 BigIP: <bigip_vm_username>, <bigip_vm_password>, <bigip_hostname>

    • DataBee: <Databee_http_collector_domain>, <API_Key_datasource>, <Databee_tenantid>, <Databee_datasrc_id>

curl -u <bigip_vm_username>:<bigip_vm_password> --location 'https: //<bigip_hostname>/mgmt/shared/telemetry/declare' \

--header 'Content-Type: application/json' \

--data '{

"class": "Telemetry",

"controls": {

"class": "Controls",

"logLevel": "debug"

},

"My_Listener": {

"class": "Telemetry_Listener",

"port": 6514

},

"DataBee_Consumer": {

"class": "Telemetry_Consumer",

"type": "Generic_HTTP",

"host": "<DataBee_http_collector_domain>",

"protocol": "https",

"path": "/http/ingest?v=1",

"headers": [

{

"name": "Authorization",

"value": "<API_Key_datasource>"

},

{

"name": "TenantID",

"value": "<DataBee_tenant_id>"

},

{

"name": "DatasourceID",

"value": "<DataBee_datasrc_id>"

}

]

}

}'


Postman

URL

https://<bigip-hostname>/mgmt/shared/telemetry/declare

Authorization(Basic Auth)

Username: <bigip_vm_username>

Password: <bigip_vm_password>


Body:

Replace the placeholders in the block below

  • F5 BigIP: <bigip_vm_username>, <bigip_vm_password>, <bigip_hostname>

  • DataBee: <Databee_http_collector_domain>, <API_Key_datasource>, <Databee_tenantid>, <Databee_datasrc_id>

{

"class": "Telemetry",

"controls": {

"class": "Controls",

"logLevel": "debug"

},

"My_Listener": {

"class": "Telemetry_Listener",

"port": 6514

},

"DataBee_Consumer": {

"class": "Telemetry_Consumer",

"type": "Generic_HTTP",

"host": "<Databee_http_collector_domain>",

"protocol": "https",

"path": "/http/ingest?v=1",

"headers": [

{

"name": "Authorization",

"value": "<API_Key_datasource>"

},

{

"name": "TenantID",

"value": "<Databee_tenant_id>"

},

{

"name": "DatasourceID",

"value": "<Databee_datasource_id >"

}

]

}

}

Optional step: Watch following path to verify that LTM logs have been generated:

tail -f /var/tmp/telemetry/


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence