YossiV
Nov 18, 2016Nimbostratus
Log via HSL total response time Only when there is a spesific value
Evening all. i am using this Irule to get my total response time using @jiseruk irule here link text.
since i have more than 25 million event log per day, i dont want to log all of the response event, i want to log spesific logs that containg a spesific value base on the SOAPAction : for exmple to log only events contain SOAPAction: with the word Deposit or Withdrawal or maybe event better the whole syntax of SOAPAction like: SOAPAction: ""https://my.site.net/Deposit""; or SOAPAction: ""https://my.site.net/Withdrawal""; etc... like here:
i want to edit the irule but im gettign throuble with this the irule looks like that:
when RULE_INIT {
set static::bigip [info hostname]
set static::facility <191>
set static::hsl_prefix "$static::facility|host=$static::bigip"
}
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto UDP -pool pool-tng-graylog-HSL]
set tcp_start_time [clock clicks -milliseconds]
}
when HTTP_REQUEST {
set http_request_time [clock clicks -milliseconds]
}
when HTTP_REQUEST_SEND {
set http_request_send_time [clock clicks -milliseconds]
}
when LB_SELECTED {
set lb_selected_time [clock clicks -milliseconds]
set hsl_prefix "${static::hsl_prefix}|Winweb=[LB::server addr]|F5_ClientIP=[client_addr]"
}
when SERVER_CONNECTED {
set connection_time [expr {[clock clicks -milliseconds] - $lb_selected_time}]
}
when HTTP_RESPONSE {
set upstream_time [expr {[clock clicks -milliseconds] - $http_request_send_time}]
}
when HTTP_RESPONSE_RELEASE {
HSL::send $hsl "$hsl_prefix|event=X_REQUEST|total_time=[expr {[clock clicks -milliseconds] - $http_request_time}]|upstream_time=$upstream_time|connection_time=$connection_time|vserver_name=[virtual name]\n"
}
apprishiate your help