You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by "Jason J. W. Williams" <ja...@gmail.com> on 2016/01/27 20:52:51 UTC

Logging Requests and Responses for specific 400 Errors

Hi,

We're trying to debug an intermittent 400 error our client see. Is it
possible to configure ATS to log the full request and response for
ERR_UNKNOWN/400 errors?

-J

Re: Logging Requests and Responses for specific 400 Errors

Posted by "Jason J. W. Williams" <ja...@gmail.com>.
Hey Scott,

If it lets you see the full request that would be awesome to have
available. Given my lack of history writing ATS plugins, I'm afraid I'd
cause more problems than I'm trying to debug.

-J

On Thu, Jan 28, 2016 at 5:07 PM, Scott Beardsley <sb...@yahoo-inc.com>
wrote:

> I'm not aware of a way to do this with opensource ATS either. Yahoo has an
> internal plugin which forks the request and publishes into an external
> redis-based datastore. You might try doing something similar. I'll pressure
> internal folks to opensource our plugin if there is interest.
>
> Scott
>
>
> On Thursday, January 28, 2016 5:03 PM, Jason J. W. Williams <
> jasonjwwilliams@gmail.com> wrote:
>
>
> Combing through those docs again I don't think ATS can log full requests
> and responses. The closest logging parameter that seems to be offered is
> "cqtx" which logs the full request sans headers (which we need to
> see...Squid has log_mime_hdrs that does this but I don't see an equivalent
> in ATS), and I don't see any field that logs the full response.
>
> If anybody knows differently, I'd love to be wrong. Thanks again.
>
> -J
>
> On Thu, Jan 28, 2016 at 2:40 PM, Jason J. W. Williams <
> jasonjwwilliams@gmail.com> wrote:
>
> Oh awesome. Thank you Miles. I was having trouble piecing it together from
> the docs.
>
> -J
>
> On Thu, Jan 28, 2016 at 2:17 PM, Miles Libbey <ml...@apache.org> wrote:
>
>
> I think you can do this in the logs_xml.config with LogFilters
> logs_xml.config — Apache Traffic Server 6.2.0 documentation
> <https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logs_xml.config.en.html#logfilter>
>
> You first describe the log you want (
> https://docs.trafficserver.apache.org/en/latest/admin-guide/monitoring/logging/log-formats.en.html#custom-logging-fields
> or the log builder
> http://trafficserver.apache.org/logbuilder/
>
> <LogFormat>
>   <Name = "log_errors"/>
>   <Format = "%<cqtq> more stuff here..."/>
> </LogFormat>
>
> then the filter
>
> <LogFilter>
>     <Name = "log_errors"/>
>     <Condition = "pssc CONTAIN 403"/>
>     <Action = "ACCEPT"/>
> </LogFilter>
>
>
> On Wednesday, January 27, 2016 11:53 AM, Jason J. W. Williams <
> jasonjwwilliams@gmail.com> wrote:
>
>
> Hi,
>
> We're trying to debug an intermittent 400 error our client see. Is it
> possible to configure ATS to log the full request and response for
> ERR_UNKNOWN/400 errors?
>
> -J
>
>
>
>
>
>
>

Re: Logging Requests and Responses for specific 400 Errors

Posted by Scott Beardsley <sb...@yahoo-inc.com>.
I'm not aware of a way to do this with opensource ATS either. Yahoo has an internal plugin which forks the request and publishes into an external redis-based datastore. You might try doing something similar. I'll pressure internal folks to opensource our plugin if there is interest.
Scott 

    On Thursday, January 28, 2016 5:03 PM, Jason J. W. Williams <ja...@gmail.com> wrote:
 

 Combing through those docs again I don't think ATS can log full requests and responses. The closest logging parameter that seems to be offered is "cqtx" which logs the full request sans headers (which we need to see...Squid has log_mime_hdrs that does this but I don't see an equivalent in ATS), and I don't see any field that logs the full response. 
If anybody knows differently, I'd love to be wrong. Thanks again.
-J
On Thu, Jan 28, 2016 at 2:40 PM, Jason J. W. Williams <ja...@gmail.com> wrote:

Oh awesome. Thank you Miles. I was having trouble piecing it together from the docs.
-J
On Thu, Jan 28, 2016 at 2:17 PM, Miles Libbey <ml...@apache.org> wrote:

 
I think you can do this in the logs_xml.config with LogFilterslogs_xml.config — Apache Traffic Server 6.2.0 documentation

You first describe the log you want (https://docs.trafficserver.apache.org/en/latest/admin-guide/monitoring/logging/log-formats.en.html#custom-logging-fields or the log builder http://trafficserver.apache.org/logbuilder/
<LogFormat>  <Name = "log_errors"/>  <Format = "%<cqtq> more stuff here..."/></LogFormat>
then the filter<LogFilter>
    <Name = "log_errors"/>
    <Condition = "pssc CONTAIN 403"/>
    <Action = "ACCEPT"/>
</LogFilter>
    On Wednesday, January 27, 2016 11:53 AM, Jason J. W. Williams <ja...@gmail.com> wrote:
 

 Hi,
We're trying to debug an intermittent 400 error our client see. Is it possible to configure ATS to log the full request and response for ERR_UNKNOWN/400 errors?
-J

   





  

Re: Logging Requests and Responses for specific 400 Errors

Posted by "Jason J. W. Williams" <ja...@gmail.com>.
Combing through those docs again I don't think ATS can log full requests
and responses. The closest logging parameter that seems to be offered is
"cqtx" which logs the full request sans headers (which we need to
see...Squid has log_mime_hdrs that does this but I don't see an equivalent
in ATS), and I don't see any field that logs the full response.

If anybody knows differently, I'd love to be wrong. Thanks again.

-J

On Thu, Jan 28, 2016 at 2:40 PM, Jason J. W. Williams <
jasonjwwilliams@gmail.com> wrote:

> Oh awesome. Thank you Miles. I was having trouble piecing it together from
> the docs.
>
> -J
>
> On Thu, Jan 28, 2016 at 2:17 PM, Miles Libbey <ml...@apache.org> wrote:
>
>>
>> I think you can do this in the logs_xml.config with LogFilters
>> logs_xml.config — Apache Traffic Server 6.2.0 documentation
>> <https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logs_xml.config.en.html#logfilter>
>>
>> You first describe the log you want (
>> https://docs.trafficserver.apache.org/en/latest/admin-guide/monitoring/logging/log-formats.en.html#custom-logging-fields
>> or the log builder
>> http://trafficserver.apache.org/logbuilder/
>>
>> <LogFormat>
>>   <Name = "log_errors"/>
>>   <Format = "%<cqtq> more stuff here..."/>
>> </LogFormat>
>>
>> then the filter
>>
>> <LogFilter>
>>     <Name = "log_errors"/>
>>     <Condition = "pssc CONTAIN 403"/>
>>     <Action = "ACCEPT"/>
>> </LogFilter>
>>
>>
>> On Wednesday, January 27, 2016 11:53 AM, Jason J. W. Williams <
>> jasonjwwilliams@gmail.com> wrote:
>>
>>
>> Hi,
>>
>> We're trying to debug an intermittent 400 error our client see. Is it
>> possible to configure ATS to log the full request and response for
>> ERR_UNKNOWN/400 errors?
>>
>> -J
>>
>>
>>
>

Re: Logging Requests and Responses for specific 400 Errors

Posted by "Jason J. W. Williams" <ja...@gmail.com>.
Oh awesome. Thank you Miles. I was having trouble piecing it together from
the docs.

-J

On Thu, Jan 28, 2016 at 2:17 PM, Miles Libbey <ml...@apache.org> wrote:

>
> I think you can do this in the logs_xml.config with LogFilters
> logs_xml.config — Apache Traffic Server 6.2.0 documentation
> <https://docs.trafficserver.apache.org/en/latest/admin-guide/files/logs_xml.config.en.html#logfilter>
>
> You first describe the log you want (
> https://docs.trafficserver.apache.org/en/latest/admin-guide/monitoring/logging/log-formats.en.html#custom-logging-fields
> or the log builder
> http://trafficserver.apache.org/logbuilder/
>
> <LogFormat>
>   <Name = "log_errors"/>
>   <Format = "%<cqtq> more stuff here..."/>
> </LogFormat>
>
> then the filter
>
> <LogFilter>
>     <Name = "log_errors"/>
>     <Condition = "pssc CONTAIN 403"/>
>     <Action = "ACCEPT"/>
> </LogFilter>
>
>
> On Wednesday, January 27, 2016 11:53 AM, Jason J. W. Williams <
> jasonjwwilliams@gmail.com> wrote:
>
>
> Hi,
>
> We're trying to debug an intermittent 400 error our client see. Is it
> possible to configure ATS to log the full request and response for
> ERR_UNKNOWN/400 errors?
>
> -J
>
>
>

Re: Logging Requests and Responses for specific 400 Errors

Posted by Miles Libbey <ml...@apache.org>.
 
I think you can do this in the logs_xml.config with LogFilterslogs_xml.config — Apache Traffic Server 6.2.0 documentation

You first describe the log you want (https://docs.trafficserver.apache.org/en/latest/admin-guide/monitoring/logging/log-formats.en.html#custom-logging-fields or the log builder http://trafficserver.apache.org/logbuilder/
<LogFormat>  <Name = "log_errors"/>  <Format = "%<cqtq> more stuff here..."/></LogFormat>
then the filter<LogFilter>
    <Name = "log_errors"/>
    <Condition = "pssc CONTAIN 403"/>
    <Action = "ACCEPT"/>
</LogFilter>
    On Wednesday, January 27, 2016 11:53 AM, Jason J. W. Williams <ja...@gmail.com> wrote:
 

 Hi,
We're trying to debug an intermittent 400 error our client see. Is it possible to configure ATS to log the full request and response for ERR_UNKNOWN/400 errors?
-J

  

Re: Logging Requests and Responses for specific 400 Errors

Posted by Muhammad Faisal <fa...@yahoo.com>.
Have you enabled debug logs in ATS config?

On 1/28/2016 12:52 AM, Jason J. W. Williams wrote:
> Hi,
>
> We're trying to debug an intermittent 400 error our client see. Is it 
> possible to configure ATS to log the full request and response for 
> ERR_UNKNOWN/400 errors?
>
> -J