aboutsummaryrefslogtreecommitdiff
path: root/blog/2023-06-08-goaccess-geoip.org
diff options
context:
space:
mode:
authorChristian Cleberg <hello@cleberg.net>2023-12-02 23:27:35 -0600
committerChristian Cleberg <hello@cleberg.net>2023-12-02 23:27:35 -0600
commit3d4da5ac6000a4871c5caa80d1e61f2782da3069 (patch)
tree29f36b50823d22f4c7df0a3db3ede83192ae649f /blog/2023-06-08-goaccess-geoip.org
parentdcf0186e16b6ac8f0e00a3aeb9734421ce548177 (diff)
downloadcleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.tar.gz
cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.tar.bz2
cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.zip
feat: finish converting md to org
Diffstat (limited to 'blog/2023-06-08-goaccess-geoip.org')
-rw-r--r--blog/2023-06-08-goaccess-geoip.org99
1 files changed, 54 insertions, 45 deletions
diff --git a/blog/2023-06-08-goaccess-geoip.org b/blog/2023-06-08-goaccess-geoip.org
index a214831..fd49a08 100644
--- a/blog/2023-06-08-goaccess-geoip.org
+++ b/blog/2023-06-08-goaccess-geoip.org
@@ -1,46 +1,51 @@
-+++
-date = 2023-06-08T22:05:00Z
-title = "Inspecting Nginx Logs with GoAccess and MaxMind GeoIP Data"
-description = ""
-+++
-
-## Overview
-
-[GoAccess](https://goaccess.io/) is an open source real-time web log analyzer
-and interactive viewer that runs in a terminal in *nix systems or through your
-browser.
-
-## Installation
-
-To start, you'll need to install GoAccess for your OS. Here's an example for
-Debian-based distros:
-
-```bash
+#+title: Inspecting Nginx Logs with GoAccess and MaxMind GeoIP Data
+#+date: 2023-06-08
+
+** Overview
+:PROPERTIES:
+:CUSTOM_ID: overview
+:END:
+[[https://goaccess.io/][GoAccess]] is an open source real-time web log
+analyzer and interactive viewer that runs in a terminal in *nix systems
+or through your browser.
+
+** Installation
+:PROPERTIES:
+:CUSTOM_ID: installation
+:END:
+To start, you'll need to install GoAccess for your OS. Here's an example
+for Debian-based distros:
+
+#+begin_src sh
sudo apt install goaccess
-```
+#+end_src
-Next, find any number of the MaxMind GeoIP database files on GitHub or another
-file hosting website. We're going to use P3TERX's version in this example:
+Next, find any number of the MaxMind GeoIP database files on GitHub or
+another file hosting website. We're going to use P3TERX's version in
+this example:
-```bash
+#+begin_src sh
wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb
-```
+#+end_src
Be sure to save this file in an easy to remember location!
-## Usage
-
-In order to utilize the full capabilities of GoAccess and MMDB, start with the
-command template below and customize as necessary. This will export an HTML
-view of the GoAccess dashboard, showing all relevant information related to
-that site's access log. You can also omit the `-o output.html` parameter if you
-prefer to view the data within the CLI instead of creating an HTML file.
-
-With the addition of the GeoIP Database parameter, section `16 - Geo Location`
-will be added with the various countries that are associated with the collected
-IP addresses.
-
-```bash
+** Usage
+:PROPERTIES:
+:CUSTOM_ID: usage
+:END:
+In order to utilize the full capabilities of GoAccess and MMDB, start
+with the command template below and customize as necessary. This will
+export an HTML view of the GoAccess dashboard, showing all relevant
+information related to that site's access log. You can also omit the
+=-o output.html= parameter if you prefer to view the data within the CLI
+instead of creating an HTML file.
+
+With the addition of the GeoIP Database parameter, section
+=16 - Geo Location= will be added with the various countries that are
+associated with the collected IP addresses.
+
+#+begin_src sh
zcat /var/log/nginx/example.access.log.*.gz | goaccess \
--geoip-database=/home/user/GeoLite2-City.mmdb \
--date-format=%d/%b/%Y \
@@ -48,18 +53,22 @@ zcat /var/log/nginx/example.access.log.*.gz | goaccess \
--log-format=COMBINED \
-o output.html \
/var/log/nginx/example.access.log -
-```
-
-### Example Output
+#+end_src
+*** Example Output
+:PROPERTIES:
+:CUSTOM_ID: example-output
+:END:
See below for an example of the HTML output:
-![GoAccess HTML](https://img.cleberg.net/blog/20230608-goaccess/goaccess-dashboard.png "GoAccess HTML")
+#+caption: GoAccess HTML
+[[https://img.cleberg.net/blog/20230608-goaccess/goaccess-dashboard.png]]
-You can also see the GeoIP card created by the integration of the MaxMind
-database information.
+You can also see the GeoIP card created by the integration of the
+MaxMind database information.
-![GoAccess GeoIP](https://img.cleberg.net/blog/20230608-goaccess/goaccess-geoip.png "GoAccess GeoIP")
+#+caption: GoAccess GeoIP
+[[https://img.cleberg.net/blog/20230608-goaccess/goaccess-geoip.png]]
-That's all there is to it!
-Informational data is provided in an organized fashion with minimal effort.
+That's all there is to it! Informational data is provided in an
+organized fashion with minimal effort.