ltm rule command HSL open
iRule(1) BIG-IP TMSH Manual iRule(1)
HSL::open
Opens a handle for High Speed Logging communication.
SYNOPSIS
HSL::open ('-publisher' | '-pub') PUBLISHER
HSL::open '-proto' ('UDP' | 'TCP') '-pool' POOL_OBJ
DESCRIPTION
Open a handle for High Speed Logging communication. After creating the
connection, send data on the connection using HSL::send.
Syntax
HSL::open -proto -pool
* Opens and returns a handle for High Speed Logging communication.
The handle can be used with HSL::send to send data over a
particular protocol (TCP or UDP) to a pool comprised of one or more
logging servers.
HSL::open -publisher
* Opens and returns a handle for High Speed Logging communication for
a log publisher configured in System->Logs->Configuration->Log
Publishers. The handle should be used with the HSL::send
command to send data to the publisher. introduced in v11.3
Note: The protocol is case sensitive and must be specified in all
uppercase letters. Prior to 11.1 the protocol value is not validated
when an iRule is saved, but will cause a run-time error when executed
for a connection if the protocol is not valid (UDP or TCP).
The pool name is not validated when an iRule is saved but will cause a
run-time error when executed if the pool does not exist.
RETURN VALUE
VALID DURING
EXAMPLES
#1
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto UDP -pool syslog_server_pool]
}
when HTTP_REQUEST {
# Log HTTP request via syslog protocol as local7.info; see RFC 3164 for moreinfo
HSL::send $hsl "<190> [IP::local_addr] [HTTP::uri]\n"
}
#2
when CLIENT_ACCEPTED {
set hsl [HSL::open -publisher /Common/lpAll]
}
when HTTP_REQUEST {
HSL::send $hsl "<190> [IP::client_addr]:[TCP::client_port]->[IP::local_addr]:[TCP::local_port]; [HTTP::host][HTTP::uri]"
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-10.1.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)