{"id":476,"date":"2023-04-11T22:09:59","date_gmt":"2023-04-11T21:09:59","guid":{"rendered":"https:\/\/www.farcorfe.org.uk\/?p=476"},"modified":"2023-04-11T22:09:59","modified_gmt":"2023-04-11T21:09:59","slug":"goaccess-parsing-issues-resolved","status":"publish","type":"post","link":"https:\/\/www.farcorfe.org.uk\/?p=476","title":{"rendered":"GoAccess parsing issues resolved"},"content":{"rendered":"\n<p>Since Webalizer fell into disrepair some years ago, I dabbled with <a href=\"https:\/\/goaccess.io\/\" target=\"_blank\" rel=\"noreferrer noopener\">GoAccess<\/a> for website stats and sort of got it working.   Several OS or Apache updates later it decided to stop working and  I never found the time to fix.<\/p>\n\n\n\n<p>Well, todays persistent rain and nothing better to do, I resolved to fix why GoAccess refused to parse my Apache logs.<\/p>\n\n\n\n<p>The initial fault seemed to stem from GoAccess not being able to decide if I had CLF ( Common Log Format) or Combined Log Format.   Apache was insistent that I had set Combined Log Format looking at httpd.conf, but GoAccess complained on start-up that this was not the case.<\/p>\n\n\n\n<p>As this is a hobby server and I had not needed to rotate the logs for several years I can only guess the httpd-access.log had been corrupted or mixed with CLF at some point, so a forced log rotation stopped the error messages on startup and allowed the basic details of the log to be parsed.<\/p>\n\n\n\n<p>However the referrer and user agent still was not parsed.   It seems there is a error in the sample goaccess.conf file and the %R and %u fields need double quotes to be parsed fully. A <a href=\"https:\/\/stackoverflow.com\/questions\/18066302\/goaccess-parsing-not-working\" target=\"_blank\" rel=\"noreferrer noopener\">post way back from 2014<\/a> seemed to flag this but the MAN page still does not pick this up, maybe its a FreeBSD specific issues<\/p>\n\n\n\n<p>Anyhoo, fixing this is the Combined Log file format parse string now has the file being parsed happily.   The OS and Browser detections still seem a bit pants, Safari and Apple iOS and MacOS seemed to be lumped under Linux, but job for another day.<\/p>\n\n\n\n<p>The analytics can be found <a rel=\"noreferrer noopener\" href=\"https:\/\/www.farcorfe.org.uk\/goa.html\" target=\"_blank\">here<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since Webalizer fell into disrepair some years ago, I dabbled with GoAccess for website stats and sort of got it working. Several OS or Apache updates later it decided to stop working and I never found the time to fix. Well, todays persistent rain and nothing better to do, I resolved to fix why GoAccess &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.farcorfe.org.uk\/?p=476\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;GoAccess parsing issues resolved&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7,10],"tags":[],"class_list":["post-476","post","type-post","status-publish","format-standard","hentry","category-free","category-house","category-tech-news"],"_links":{"self":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=476"}],"version-history":[{"count":0,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/476\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.farcorfe.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}