Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
515778a5
Commit
515778a5
authored
Mar 13, 2013
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: finished README.rst (the DESCRIPTION)
parent
1a836279
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
1 deletion
+58
-1
README.rst
trackrdrd/README.rst
+58
-1
No files found.
trackrdrd/README.rst
View file @
515778a5
...
@@ -9,7 +9,7 @@ Tracking Log Reader demon
...
@@ -9,7 +9,7 @@ Tracking Log Reader demon
-------------------------
-------------------------
:Author: Geoffrey Simmons
:Author: Geoffrey Simmons
:Date: 2013-03-1
2
:Date: 2013-03-1
3
:Version: 2.0
:Version: 2.0
:Manual section: 3
:Manual section: 3
...
@@ -26,6 +26,63 @@ The ``trackrdrd`` demon reads from the shared memory log of a running
...
@@ -26,6 +26,63 @@ The ``trackrdrd`` demon reads from the shared memory log of a running
instance of Varnish, collects data relevant to tracking for the Otto
instance of Varnish, collects data relevant to tracking for the Otto
project, and forwards the data to ActiveMQ message brokers.
project, and forwards the data to ActiveMQ message brokers.
``trackrdrd`` reads data from ``VCL_Log`` entries that are displayed
in this format by the ``varnishlog`` tool::
<FD> VCL_Log c track <XID> <DATA>
* ``FD``: file descriptor of a client connection
* ``XID``: XID (request identifier) assigned by Varnish
* ``DATA``: data to be logged
``VCL_Log`` entries result from use of the ``log()`` function provided
by the standard vmod ``std`` distributed with Varnish. The ``log()``
call must include the prefix ``track``, the XID and the data to be
logged. These log entries can be created with VCL code such as::
import std;
sub vcl_recv {
/* ... */
std.log("track " + req.xid + " url=" + req.url);
std.log("track " + req.xid + " http_Host=" + req.http.Host);
/* ... */
}
Thus the data to be logged can be any information available in VCL.
``trackrdrd`` collects all data logged for each XID, and combines
their data fields with the ampersand (``&``) character. Note that (in
Varnish 3) the same XID is assigned to a request and all requests that
it includes via ESI; so ``trackrdrd`` combines all logged data for a
request and its ESI includes.
When the request processing for an XID is complete (i.e. when
``trackrdrd`` reads ``ReqEnd`` for that XID), the data record is
complete and ready to be forwarded to ActiveMQ message
brokers. ``trackrdrd`` comprises a reader thread, which reads from the
shared memory log, and one or more worker threads, which send records
to one or more message brokers.
In addition to the data logged for an XID, ``trackrdrd`` prepends a
field ``XID=<xid>`` to the data, and appends a field ``req_endt=<t>``
containg the epoch time at which request processing ended (from the
``ReqEnd`` entry).
EXAMPLE
=======
The VCL example shown above may result in log entries such as these::
29 ReqEnd c 881964201 1363144515.280081511 1363144515.284164190 0.052356958 0.003843069 0.000239611
29 VCL_Log c track 881964202 url=/index.html
29 VCL_Log c track 881964202 http_Host=foo.bar.org
29 ReqEnd c 881964202 1363144515.433386803 1363144515.436567307 0.149222612 0.000135660 0.003044844
In this case, ``trackrdrd`` send this data to a message broker::
XID=881964202&url=/index.html&http_Host=foo.bar.org&req_endt=1363144515.436567307
OPTIONS
OPTIONS
=======
=======
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment