This is an old revision of the document!
target_http
This target will dump part of the HTTP traffic into usable files. It uses the Mime-Type provided by the server and a database in flat file format to match the right files to dump.
It has the following parameters :
- prefix
Prefix of the files including the path. For example, a prefix of '/tmp/dump' will create files in /tmp and named dump-XXXXXXXX. The prefix supports variable expansion. See File path expansion for more details.
Default : /tmp/
- decompress
Enable gzip/deflate support. Content will be dumped as is otherwise. This parameter is only present if zlib support is compiled in.
Default : yes
- mime_types_db
Path to the database of mime types. See here for the latest mime database content.
Default : ${DATAROOT}/mime_types.db
- log_file
Path to the log file. When non empty, target_http will log the requests in this file according in the format described in the parmarameter log_format.
Default : empty
- log_format
Format of log lines in the log file. Very similar to the format of apache2's mod_log_config. Supported expansions :
Format String | Description |
---|---|
%% | The percent sign |
%a | Client IP address |
%A | Server IP address |
%b | Size of response in bytes, excluding HTTP headers |
%B | Size of response in bytes, excluding HTTP headers in CLF format, i.e. a '-' rather than a 0 when no bytes are sent |
%D | Time taken to serve the request, in microseconds |
%f | Name of the file saved on the disk |
%H | Request protocol |
%{Foobar}i | The contents of Foobar: header line(s) in the request sent to the server |
%m | Request method |
%{Foobar}o | The contents of Foobar: header line(s) in the reply |
%p | Port of the server |
%P | Password of the user querying the server |
%r | First line of request |
%s | Status value |
%t | Time the request was received |
%T | Time taken to serve the request in seconds |
%u | Username provided when doing the request |
%U | URL path requested |
%v | Server name (same as %{Host}i) |
Default : %v %a %u %t “%r” %s %b
- ds_log_path
Path to the datastore. When non empty, target_http will log the requests in the provided datastore according in the format described in the parmarameter ds_log_format. The syntax is <datastore_name>/<dataset_prefix>.
Default : empty
- ds_log_format
Format of the dataset where logging information will be saved. The table below describe the supported fields. Extra characters will be ignored.
Default : %v %a %u %t %r %s %b
Format String | Name used in the dataset | Description |
---|---|---|
%a | client_addr | Client IP address |
%A | server_addr | Server IP address |
%b | response_size | Size of response in bytes, excluding HTTP headers |
%D | serv_time_ms | Time taken to serve the request, in microseconds |
%f | filename | Name of the file saved on the disk |
%H | request_proto | Request protocol |
%{Foobar}i | hdr_req_<header_name> | The contents of Foobar: header line(s) in the request sent to the server |
%m | request_method | Request method |
%{Foobar}o | hdr_resp_<header_name> | The contents of Foobar: header line(s) in the reply |
%p | server_port | Port of the server |
%P | password | Password of the user querying the server |
%r | request_first_line | First line of request |
%s | status | Status value |
%t | request_recvd_time | Time the request was received |
%T | request_elapsed_time | Time taken to serve the request in seconds |
%u | username | Username provided when doing the request |
%U | url | URL path requested |
%v | server_name | Server name (same as %{Host}i) |
- dump_img
Enable dumping of the image files.
Default : no
- dump_vid
Enable dumping of the video files.
Default : no
- dump_snd
Enable dumping of the sound files.
Default : no
- dump_txt
Enable dumping of the text files.
Default : no
- dump_bin
Enable dumping of the binary files.
Default : no
- dump_doc
Enable dumping of the document files.
Default : no