Apache Trafficserver

Wednesday September 04, 2013

Custom logs and identifying remap rules

In a recent project we worked on, we needed to add a custom log which also had to identify which exactly remap rule triggered. I think this is probably a worthwhile feature to add to ATS (see https://issues.apache.org/jira/browse/TS-2181), but there's an easy way using existing plugins to accomplish this. Using (for example) the header_filter.so standard plugin, you can setup a config for each remap rule that you wish to identify.

    map http://www.example.com http://x.example.com @plugin=header_filter.so @pparam=id_a.config 

Where id_a.config contains simply

    [READ_REQUEST_HDR]
        @MapID =a_mapping= 

 In a custom log, you can then log this as

    %<{@MapID}cqh> 

Voila! The trick here is that headers with the @ prefix are considered internal to ATS, and are removed before sending to servers or User-Agents.

Comments:

I am new to servers and linux and learning a lot from you.. but i have a query... if any one can help please.. In apache access logs if i have to count number of access attempts made to my server within a timestamp say from 12:15:00 to 12:50:00 on a perticular day ,,then how will i do so??? 

Posted by gaurav on April 19, 2014 at 08:20 AM PDT #

I really like this amazing post need to follow here https://texttwist.online and play text twist 2 free online.

Posted by click on January 06, 2019 at 07:46 AM PST #

Thanks!

Posted by ejaculare precoce on April 03, 2019 at 04:39 AM PDT #

Amazing colors and sharpness @Kevin Krautgartner ! Superb work Manchester United! Love this green color

Posted by great on July 20, 2019 at 11:28 AM PDT #

People check the blogs to induce the most recent info concerning the subject within which they're inquisitive about. It will be nice if the posts that are shared in these blogs are very entertaining and catchy. Such tiny items of information obtained from the blogs are going to be helpful to them at some or different points of their lives. Your blog is one such blog that always cares to post the articles which contain some useful data in it. They are quite impressive as well as informative. Since updates area unit created at regular intervals folks area unit hooked to the blogs.

Posted by buy best essays on September 18, 2019 at 10:57 PM PDT #

I installed this plugin and it worked but I don't understand how to set up a config each remaps rule in order to identify https://britishcoursework.com and if I find this feature how can I use its each remaps rule to get successful result.

Posted by Sara Cohen on October 24, 2019 at 05:58 AM PDT #

Hi! It worked the first time I have installed it, but I don't know what happened when it stopped working just the way it did. Can you help me? Thank you so much. :)

Posted by jewellers here on October 29, 2019 at 11:26 PM PDT #

Our headers on https://www.moneymatcher.co.za/ had never been more wonderful because of the troubleshooting you have provided. Thank you so much. :)

Posted by Horea Kaii on October 29, 2019 at 11:29 PM PDT #

A log file is a file that comprises a list of events, which have been "logged" by a computer http://www.loosediamondss.com/loose-diamonds/pear-shaped-diamonds-and-their-specialties/ . Logging events are necessary to analyze trends often used to show all events linked with the system or application that created them.

Posted by Swayer Scott on November 12, 2019 at 12:12 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Calendar

Search

Hot Blogs (today's hits)

Tag Cloud

Categories

Feeds

Links

Navigation