Forum Discussion
JRahm
Admin
Jan 22, 2026AppWorld DC Booth Kiosk Generator
Welcome to AppWorld, community! You may or may not be with us in person, but you can watch this thread for iRules that are either generated or described by the Distributed Cloud AI Assistant.
JimmyPackets
Cirrus
Mar 12, 2026AI-Generated iRule
Prompt: Track unique client IPs per hour using a subtable and log the count via HSL every 5 minutes
Generated iRule (by F5 Distributed Cloud AI Assistant):
# iRule Validation Errors:
# - {"body": "when TIMER priority 500 {\n # Determine the current hour string for counting\n set current_hour [clock format [clock seconds] -format \"%Y%m%d%H\"]\n # Count the number of unique client IPs in the current hourly subtable\n set unique_count [table keys -subtable unique_ips_hour:$current_hour -count]\n # Open HSL handle if it does not already exist\n if { ! [info exists ::hsl_handle] } {\n set ::hsl_handle [HSL::open -proto UDP -pool syslog_server_pool]\n }\n # Send the unique IP count via HSL\n set timestamp [clock format [clock seconds] -format \"%Y-%m-%dT%H:%M:%S\"]\n HSL::send $::hsl_handle \"${timestamp} UniqueIPs:${unique_count}\\n\"\n # Clear the subtable for the completed hour\n table delete -subtable unique_ips_hour:$current_hour -all\n}", "message": "unknown event (TIMER)", "range": {"start": 435, "length": 776}}
when CLIENT_ACCEPTED priority 500 {
# Determine the current hour string for subtable namespace
set current_hour [clock format [clock seconds] -format "%Y%m%d%H"]
# Add the client IP to the hourly subtable to ensure uniqueness
table set -subtable unique_ips_hour:$current_hour [IP::client_addr] 1 indef 3600
}
when RULE_INIT priority 500 {
# Timer configured externally to fire the TIMER event every 300 seconds
}
when TIMER priority 500 {
# Determine the current hour string for counting
set current_hour [clock format [clock seconds] -format "%Y%m%d%H"]
# Count the number of unique client IPs in the current hourly subtable
set unique_count [table keys -subtable unique_ips_hour:$current_hour -count]
# Open HSL handle if it does not already exist
if { ! [info exists ::hsl_handle] } {
set ::hsl_handle [HSL::open -proto UDP -pool syslog_server_pool]
}
# Send the unique IP count via HSL
set timestamp [clock format [clock seconds] -format "%Y-%m-%dT%H:%M:%S"]
HSL::send $::hsl_handle "${timestamp} UniqueIPs:${unique_count}\n"
# Clear the subtable for the completed hour
table delete -subtable unique_ips_hour:$current_hour -all
}
F5, Inc. ("F5") disclaims all liability in connection with any output generated by the AI Assistant ("Output") or use thereof, including without limitation any negative business impact caused by your use of Output to administer, direct, configure or control the operation and functioning of any F5 products. Output is provided "as is" without any warranties of any kind.Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects