Commit bcb16ab8 authored by Ted Trask's avatar Ted Trask

Updated text of adhocquery to reflect new tables

parent bd9bd196
......@@ -46,7 +46,7 @@ require("viewfunctions")
<% displayformstart(form, page_info) %>
This form accepts a Postgresql SELECT statement and displays the results. Examples:
<ul>
<li>This statement will return the total bytes transferred by each user for the entire weblog history<pre>SELECT clientuserid, sum(bytes) AS total FROM pubweblog GROUP BY clientuserid ORDER BY total DESC</pre>
<li>This statement will return the total bytes transferred by each user for the pre-purge weblog history<pre>SELECT clientuserid, sum(bytes) AS total FROM pubweblog GROUP BY clientuserid ORDER BY total DESC</pre>
<li>This statement limits the above statement to a specific range of dates (just yesterday)<pre>SELECT clientuserid, sum(bytes) AS total FROM pubweblog WHERE logdatetime >= 'yesterday' and logdatetime < 'today' GROUP BY clientuserid ORDER BY total DESC</pre>
<li>This statement will return the number of requests and blocks by hour over the course of the entire usage history<pre>SELECT extract(hour from date) AS hour, sum(numrequest) AS numrequest, sum(numblock) AS numblock FROM usagestat GROUP BY extract(hour from date) ORDER BY hour</pre>
</ul>
......@@ -55,9 +55,9 @@ The available database tables and descriptions are listed below.
<% displayformend(form) %>
<H2>Available Database Tables</H2>
<H3>PubWeblog and PubBlocklog</H3>
<H3>pubweblog and pubweblog_history</H3>
<DL>
These tables contain the combined squid access log and dansguardian log for every access and blocked access respectively. The definition of the table is as follows:
These tables contain the pre-purge and historical access logs respectively. The definition of the table is as follows:
<pre>
(
sourcename character varying(40),
......@@ -65,14 +65,21 @@ These tables contain the combined squid access log and dansguardian log for ever
clientuserid character varying(64) NOT NULL,
logdatetime timestamp(3) without time zone NOT NULL,
uri text NOT NULL,
bytes integer NOT NULL,
bytes bigint NOT NULL,
reason text,
score integer,
shortreason text
shortreason text,
badyesno int,
deniedyesno int,
bypassyesno int,
wordloc text,
goodwordloc text,
selected boolean,
id int,
)
</pre></DL>
<H3>dbHistLog</H3>
<H3>dbhistlog</H3>
<DL>
This table contains the database history, including such information as which log files were loaded and how many entries they contained. The definition of the table is as follows:
<pre>
......@@ -82,7 +89,7 @@ This table contains the database history, including such information as which lo
)
</pre></DL>
<H3>Source</H3>
<H3>source</H3>
<DL>
This table contains the list of log file sources. The definition of the table is as follows:
<pre>
......@@ -97,7 +104,7 @@ This table contains the list of log file sources. The definition of the table is
)
</pre></DL>
<H3>Usagestat</H3>
<H3>usagestat</H3>
<DL>
This table contains a historical record of pages requested and blocked by hour. The definition of the table is as follows:
<pre>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment