Forum Discussion

Ashu_Aggarwal's avatar
Jul 31, 2020

How to log traffic hits on VSs

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

  • 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]"
    }