Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

How to log traffic hits on VSs

Ashu_Aggarwal
Cirrus
Cirrus

Our security wants to log all the hits on all VSs by source IP & url/uri hits. Is there a way to do that? either by local or remote logging?

2 REPLIES 2

alex100
Cirrostratus
Cirrostratus

Below iRule will log Client IP, Http host and URI to LTM log

when HTTP_REQUEST {
	log local0. "You custom message: [IP::client_addr] >>> [HTTP::host][HTTP::uri]"
	}

Hope this helps.

Hi Ashu Aggarwal,

For remote logging:

Create a syslog pool.

And change pool name in below iRule.

when HTTP_REQUEST {
	HSL::send [HSL::open -proto UDP -pool syslog_server_pool] "VS: [virtual name] - CIP: [IP::client_addr] - Host: [HTTP::host] - URI: [HTTP::uri]"
}