jStats generates easy-to-read, table-based summaries and statistics of your Apache web server's access logs.
The jStats configuration file can be found at ~/.config/jstats/config.json
.
Key | Description | Default value |
---|---|---|
accessLogDirectory |
The path to your Apache log directory. | /var/log/apache2 |
accessLogName |
The name of your access log. | access.log |
readRotatedLogs |
If you use logrotate to rotate your logs, jStats can find rotated logs in the same directory as the file above. | true |
logFormat |
The format of your log. This can usually be found in /etc/apache2/apache2.conf . For more information, see the documentation for mod_log_config. |
"%v:%p %h %l %u %t \"%r\" %s:%>s %I %O \"%{Referer}i\" \"%{User-Agent}i\" %D %k %f \"%U\" \"%q\"" |
outputDirectory |
The directory in which jStats should write its output. | ~/jstats |
outputMonthSubpages |
If true, subpages containing statistics for each month are generated in addition to the file above. | true |
monthSubpagePattern |
The naming pattern for monthly statistics pages. This has no effect if the above setting is false . |
"{{year}}-{{month}}.html" |
inputDateFormat |
The format of dates within the access log. See here for date formatting details. | "dd/MMM/yyyy:HH:mm:ss Z" |
outputDateFormat |
The format to use for dates in the output file. | "yyyy-MM-dd HH:mm:ss zzz" |
whoisTool |
The URL of your preferred WHOIS tool. {{address}} will be replaced with the IP address. |
"https://iplocation.io/ip/{{address}}" |
printMalformedEntries |
If true, the program will print a message to the standard error stream if a malformed log entry is encountered. | false |
ignoreInternalLogs |
If true, internal requests from a loopback address (i.e. 127.0.0.1 or ::1 ) will be ignored. |
true |
timeTakenBuckets |
The "Time Taken" section uses these numbers for ranges, i.e. < 100 , 100-500 , and ≥ 500 . This list must have at least one entry. |
[100, 500, 1000, 5000, 10000, 50000] |
truncateWideColumns |
Truncate long strings after this many characters. Set to 0 to disable truncation. | 100 |
ipRequestCountThreshold |
Omit IP addresses with fewer than this many requests. | 5 |
userAgentRequestCountThreshold |
Omit user agents with fewer than this many requests. | 3 |
fileRequestCountThreshold |
Omit files with fewer than this many requests. | 0 |
queryRequestCountThreshold |
Omit query strings with fewer than this many requests. | 0 |
refererRequestCountThreshold |
Omit referers with fewer than this many requests. | 0 |
logVerbosity |
The verbosity of messages generated by jStats while running. Valid settings: 0 (debug), 1 (info), 2 (warnings), 3 (errors), or 4 (silent). | 1 |
The templates used for the program's output can be changed by creating the directory
~/.config/jstats/templates
. Files in this directory with names matching those of the files in
/src/main/resources/templates
will replace their respective default templates.