You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Johan Caripson <jo...@director.se> on 2013/02/26 14:09:07 UTC
Create summary log file of TCP_HIT and TCP_MISS
Hi!
I have some problem with creating summary log file when i apply a log
filter.
What i want to do is create a summary log every minute for all TCP_HIT and
summary file for all TCP_MISS.
Here is my logs_xml.config.
<LogFormat>
<Name = "mydomain.com_TCP_MISS"/>
<Format = "%<COUNT(*)> : %<SUM(psql)>"/>
<Interval = "60"/>
</LogFormat>
<LogFilter>
<Name = "select_all_tcp_miss"/>
<Condition = "pssc MATCH TCP_MISS"/>
<Action = "ACCEPT"/>
</LogFilter>
<LogObject>
<Format = "mydomain.com_TCP_MISS"/>
<Filename = "mydomain.com_TCP_MISS"/>
<ServerHosts = "mydomain.com"/>
<Filters = "select_all_tcp_miss"/>
</LogObject>
error msg
[Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: There were invalid
values in the definition of filter select_all_tcp_miss only 0 out of 1
values will be used.
[Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: "TCP_MISS" does not
specify any valid values; cannot create filter select_all_tcp_miss.
[Feb 26 14:07:53.122] Server {0x2b1032ec7f30} WARNING: Filter
select_all_tcp_miss not in the global filter list; cannot add to this
LogObject
What i'm doing wrong?
Regards
Johan
Re: Create summary log file of TCP_HIT and TCP_MISS
Posted by Mark Harrison <ma...@omniti.com>.
Done
On Tue, Feb 26, 2013 at 3:57 PM, James Peach <jp...@apache.org> wrote:
> On 26/02/2013, at 7:57 AM, Mark Harrison <ma...@omniti.com> wrote:
>
>> I think you want crc instead of pssc. This appears to be a mistake in
>> the docs at http://trafficserver.apache.org/docs/trunk/admin/configuration-files/logs_xml.config#Examples
>> which also uses pssc. However, pssc is the HTTP status code (e.g.
>> 200), and crc is the cache result code.
>
> Mark, would you mind commenting on that page with a correction?
>
>>
>> On Tue, Feb 26, 2013 at 8:09 AM, Johan Caripson <jo...@director.se> wrote:
>>> Hi!
>>>
>>> I have some problem with creating summary log file when i apply a log
>>> filter.
>>> What i want to do is create a summary log every minute for all TCP_HIT and
>>> summary file for all TCP_MISS.
>>> Here is my logs_xml.config.
>>>
>>> <LogFormat>
>>> <Name = "mydomain.com_TCP_MISS"/>
>>> <Format = "%<COUNT(*)> : %<SUM(psql)>"/>
>>> <Interval = "60"/>
>>> </LogFormat>
>>>
>>> <LogFilter>
>>> <Name = "select_all_tcp_miss"/>
>>> <Condition = "pssc MATCH TCP_MISS"/>
>>> <Action = "ACCEPT"/>
>>> </LogFilter>
>>>
>>> <LogObject>
>>> <Format = "mydomain.com_TCP_MISS"/>
>>> <Filename = "mydomain.com_TCP_MISS"/>
>>> <ServerHosts = "mydomain.com"/>
>>> <Filters = "select_all_tcp_miss"/>
>>> </LogObject>
>>>
>>>
>>> error msg
>>>
>>> [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: There were invalid
>>> values in the definition of filter select_all_tcp_miss only 0 out of 1
>>> values will be used.
>>> [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: "TCP_MISS" does not
>>> specify any valid values; cannot create filter select_all_tcp_miss.
>>> [Feb 26 14:07:53.122] Server {0x2b1032ec7f30} WARNING: Filter
>>> select_all_tcp_miss not in the global filter list; cannot add to this
>>> LogObject
>>>
>>> What i'm doing wrong?
>>>
>>>
>>>
>>> Regards
>>> Johan
>>
>>
>>
>> --
>> Mark Harrison
>> Lead Site Reliability Engineer
>> OmniTI
>
--
Mark Harrison
Lead Site Reliability Engineer
OmniTI
Re: Create summary log file of TCP_HIT and TCP_MISS
Posted by James Peach <jp...@apache.org>.
On 26/02/2013, at 7:57 AM, Mark Harrison <ma...@omniti.com> wrote:
> I think you want crc instead of pssc. This appears to be a mistake in
> the docs at http://trafficserver.apache.org/docs/trunk/admin/configuration-files/logs_xml.config#Examples
> which also uses pssc. However, pssc is the HTTP status code (e.g.
> 200), and crc is the cache result code.
Mark, would you mind commenting on that page with a correction?
>
> On Tue, Feb 26, 2013 at 8:09 AM, Johan Caripson <jo...@director.se> wrote:
>> Hi!
>>
>> I have some problem with creating summary log file when i apply a log
>> filter.
>> What i want to do is create a summary log every minute for all TCP_HIT and
>> summary file for all TCP_MISS.
>> Here is my logs_xml.config.
>>
>> <LogFormat>
>> <Name = "mydomain.com_TCP_MISS"/>
>> <Format = "%<COUNT(*)> : %<SUM(psql)>"/>
>> <Interval = "60"/>
>> </LogFormat>
>>
>> <LogFilter>
>> <Name = "select_all_tcp_miss"/>
>> <Condition = "pssc MATCH TCP_MISS"/>
>> <Action = "ACCEPT"/>
>> </LogFilter>
>>
>> <LogObject>
>> <Format = "mydomain.com_TCP_MISS"/>
>> <Filename = "mydomain.com_TCP_MISS"/>
>> <ServerHosts = "mydomain.com"/>
>> <Filters = "select_all_tcp_miss"/>
>> </LogObject>
>>
>>
>> error msg
>>
>> [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: There were invalid
>> values in the definition of filter select_all_tcp_miss only 0 out of 1
>> values will be used.
>> [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: "TCP_MISS" does not
>> specify any valid values; cannot create filter select_all_tcp_miss.
>> [Feb 26 14:07:53.122] Server {0x2b1032ec7f30} WARNING: Filter
>> select_all_tcp_miss not in the global filter list; cannot add to this
>> LogObject
>>
>> What i'm doing wrong?
>>
>>
>>
>> Regards
>> Johan
>
>
>
> --
> Mark Harrison
> Lead Site Reliability Engineer
> OmniTI
Re: Create summary log file of TCP_HIT and TCP_MISS
Posted by Johan Caripson <jo...@director.se>.
Thanks Mark! :)
I have another question. Is it possible to add timestamp before count(*) in
a summary file?
Regards
Johan
2013/2/26 Mark Harrison <ma...@omniti.com>
> I think you want crc instead of pssc. This appears to be a mistake in
> the docs at
> http://trafficserver.apache.org/docs/trunk/admin/configuration-files/logs_xml.config#Examples
> which also uses pssc. However, pssc is the HTTP status code (e.g.
> 200), and crc is the cache result code.
>
> On Tue, Feb 26, 2013 at 8:09 AM, Johan Caripson <jo...@director.se> wrote:
> > Hi!
> >
> > I have some problem with creating summary log file when i apply a log
> > filter.
> > What i want to do is create a summary log every minute for all TCP_HIT
> and
> > summary file for all TCP_MISS.
> > Here is my logs_xml.config.
> >
> > <LogFormat>
> > <Name = "mydomain.com_TCP_MISS"/>
> > <Format = "%<COUNT(*)> : %<SUM(psql)>"/>
> > <Interval = "60"/>
> > </LogFormat>
> >
> > <LogFilter>
> > <Name = "select_all_tcp_miss"/>
> > <Condition = "pssc MATCH TCP_MISS"/>
> > <Action = "ACCEPT"/>
> > </LogFilter>
> >
> > <LogObject>
> > <Format = "mydomain.com_TCP_MISS"/>
> > <Filename = "mydomain.com_TCP_MISS"/>
> > <ServerHosts = "mydomain.com"/>
> > <Filters = "select_all_tcp_miss"/>
> > </LogObject>
> >
> >
> > error msg
> >
> > [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: There were invalid
> > values in the definition of filter select_all_tcp_miss only 0 out of 1
> > values will be used.
> > [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: "TCP_MISS" does
> not
> > specify any valid values; cannot create filter select_all_tcp_miss.
> > [Feb 26 14:07:53.122] Server {0x2b1032ec7f30} WARNING: Filter
> > select_all_tcp_miss not in the global filter list; cannot add to this
> > LogObject
> >
> > What i'm doing wrong?
> >
> >
> >
> > Regards
> > Johan
>
>
>
> --
> Mark Harrison
> Lead Site Reliability Engineer
> OmniTI
>
Re: Create summary log file of TCP_HIT and TCP_MISS
Posted by Mark Harrison <ma...@omniti.com>.
I think you want crc instead of pssc. This appears to be a mistake in
the docs at http://trafficserver.apache.org/docs/trunk/admin/configuration-files/logs_xml.config#Examples
which also uses pssc. However, pssc is the HTTP status code (e.g.
200), and crc is the cache result code.
On Tue, Feb 26, 2013 at 8:09 AM, Johan Caripson <jo...@director.se> wrote:
> Hi!
>
> I have some problem with creating summary log file when i apply a log
> filter.
> What i want to do is create a summary log every minute for all TCP_HIT and
> summary file for all TCP_MISS.
> Here is my logs_xml.config.
>
> <LogFormat>
> <Name = "mydomain.com_TCP_MISS"/>
> <Format = "%<COUNT(*)> : %<SUM(psql)>"/>
> <Interval = "60"/>
> </LogFormat>
>
> <LogFilter>
> <Name = "select_all_tcp_miss"/>
> <Condition = "pssc MATCH TCP_MISS"/>
> <Action = "ACCEPT"/>
> </LogFilter>
>
> <LogObject>
> <Format = "mydomain.com_TCP_MISS"/>
> <Filename = "mydomain.com_TCP_MISS"/>
> <ServerHosts = "mydomain.com"/>
> <Filters = "select_all_tcp_miss"/>
> </LogObject>
>
>
> error msg
>
> [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: There were invalid
> values in the definition of filter select_all_tcp_miss only 0 out of 1
> values will be used.
> [Feb 26 14:07:53.121] Server {0x2b1032ec7f30} WARNING: "TCP_MISS" does not
> specify any valid values; cannot create filter select_all_tcp_miss.
> [Feb 26 14:07:53.122] Server {0x2b1032ec7f30} WARNING: Filter
> select_all_tcp_miss not in the global filter list; cannot add to this
> LogObject
>
> What i'm doing wrong?
>
>
>
> Regards
> Johan
--
Mark Harrison
Lead Site Reliability Engineer
OmniTI