Greetings all, I am trying to find the best (easiest, least interfering) solution for the following problem. Our custom ICAP server writes various information about ICAP transaction (user name, policy ip, detection module, timings, words triggered detection, etc) into the record database. This happens at the time when ICAP transaction ends. Based
on that information we build extensive reports of web filtering activity. As known, end of the ICAP transaction does not mean the end of the original transaction in Squid – e.g. after scanning CONNECT request and allowing it to proceed, the actual data transfer from the Squid’s perspective may end much much later.
The piece of information that would be very interesting for reporting module is how many bytes were pumped through that connection. This information is only available after the original Squid transaction ends. So somehow in the record database we must correlate the ICAP transaction(s) with original Squid transaction. Question 1: Is there any unique transaction ID in the Squid’s inner workings that I can see in the ICAP server, by passing it as additional X-* ICAP header?
I see some references to so called “master transaction” in the docs but could not find any log format like identifier that can be used for ICAP header value. Question 2: If there is no such transaction ID, I can use ICAP header to pass the ICAP specific transaction ID back to Squid *and* I can get that ID written to Squid’s access log as "X-WebSafety-IID=%{X-WebSafety-IID}adapt::<last_h". Is it a
valid approach? Question 3: If q1 or q2 is answered positively, I still need to somehow get the data from squid’s access log the ICAP record database. Currently the idea is to have the custom logfile_daemon setting that would fork original log_file_daemon to have
log entries written to access_log *and* parse out the ICAP ID *and* update the corresponding ICAP record in the database with transferred bytes information. But this seems complex and fragile. Is it possible to have *two* daemon log settings in the squid.conf? One (original) would write access_log is usual and another one would parse out pumped bytes and update the ICAP records database. Hope I could explain it :( Thanks in advance for everyone taking time to respond. Best regards, Rafael Akchurin Diladele B.V. |
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx http://lists.squid-cache.org/listinfo/squid-users