mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-09-12 12:15:33 +02:00
Corrections on user counter and analytics to the kst4contest page
This commit is contained in:
@@ -262,6 +262,12 @@ day, requested pages, countries, HTTP status codes and virtual hosts. Host,
|
||||
remote-user, referrer, keyphrase, operating-system, browser and other detailed
|
||||
panels are disabled.
|
||||
|
||||
GoAccess 1.8.1 writes the Country panel under the JSON key `geolocation`.
|
||||
Combined jobs explicitly pass `--enable-panel=VIRTUAL_HOSTS` and require the
|
||||
resulting `vhosts` key. Site jobs do not enable that panel. The generator treats
|
||||
either missing key as an invalid report rather than publishing incomplete
|
||||
statistics.
|
||||
|
||||
The Country database is provided through the registry at
|
||||
`/var/lib/GeoIP/GeoLite2-Country.mmdb`. A file whose name contains `City` is
|
||||
rejected. Do not replace it with a City database merely because one happens to
|
||||
|
||||
@@ -450,9 +450,9 @@ function validateReport(report, combined) {
|
||||
if (!report || typeof report !== "object" || Array.isArray(report)) {
|
||||
throw new Error("GoAccess JSON report must be an object");
|
||||
}
|
||||
const requiredPanels = ["visitors", "requests", "status_codes", "geo_location"];
|
||||
const requiredPanels = ["visitors", "requests", "status_codes", "geolocation"];
|
||||
if (combined) {
|
||||
requiredPanels.push("virtual_hosts");
|
||||
requiredPanels.push("vhosts");
|
||||
}
|
||||
if (!report.general || typeof report.general !== "object") {
|
||||
throw new Error("GoAccess JSON report has no general summary");
|
||||
@@ -682,10 +682,15 @@ function prepareReport(job, context) {
|
||||
const args = [
|
||||
...job.logs,
|
||||
"--no-global-config",
|
||||
"--config-file", runConfig,
|
||||
"--config-file", runConfig
|
||||
];
|
||||
if (job.combined) {
|
||||
args.push("--enable-panel=VIRTUAL_HOSTS");
|
||||
}
|
||||
args.push(
|
||||
"--output", outputJson,
|
||||
"--output", outputHtml
|
||||
];
|
||||
);
|
||||
context.runGoAccess({
|
||||
binary: context.goaccessBinary,
|
||||
args,
|
||||
|
||||
Reference in New Issue
Block a user