Browser history logs
Most popular browsers keep a log of the browsing history in an SQLite database. Information in this database includes the URL that was accessed, the title of the page, the time when the page was visited, and the number of times it was accessed.
This guide explains how to collect and process browser history logs with NXLog Agent using the ODBC input module.
Browser history database location and format
The browsing history database is located in the user’s profile folder and the path depends on the browser and operating system. The following sections cover the details of the databases used by Google Chrome, Mozilla Firefox, and Microsoft Edge browsers.
Google Chrome history location and details
Chrome history is stored in an SQLite database, the filename is History and can be found in the following locations:
- Microsoft Windows Vista, 7, 8, 10, 11
-
C:\Users\<username>\AppData\Local\Google\Chrome\User Data\<profile>\History - Linux/Unix (native package installation)
-
/home/<username>/.config/google-chrome/<profile>/History - macOS
-
/Users/<username>/Library/Application Support/Google/Chrome/<profile>/History
The tables containing the Chrome browsing history in the History database are named urls and visits.
Data from these tables can be joined to retrieve the URL, page title, and time it was accessed.
| Column | Type | Description |
|---|---|---|
|
|
Primary key, a unique ID for the record |
|
|
URL that was accessed |
|
|
Title of the website |
|
|
Number of times the URL was accessed |
|
|
Number of times the user accessed this website by typing the URL in the address bar |
|
|
Timestamp in microseconds when the website was last visited |
| Column | Type | Description |
|---|---|---|
|
|
Unique ID for the record |
|
|
ID corresponding to a record in the |
|
|
Timestamp in microseconds when the website was visited |
| id | url | title | visit_time |
|---|---|---|---|
|
High Performance Log Collection Solutions |
|
Mozilla Firefox history location and details
Mozilla Firefox history is stored in an SQLite database, the filename is places.sqlite and can be found in the following locations:
- Microsoft Windows Vista, 7, 8, 10, 11
-
C:\Users\<username>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\places.sqlite - Linux/Unix (native package installation)
-
/home/<username>/.mozilla/firefox/<profile>/places.sqlite - macOS
-
/Users/<username>/Library/Application Support/Firefox/Profiles/<profile>/places.sqlite
The tables containing the Firefox browsing history in the places database are named moz_places and moz_historyvisits.
Data from these tables can be joined to retrieve the URL, page title, and time it was accessed.
| Column | Type | Description |
|---|---|---|
|
|
Primary key, a unique ID for the record |
|
|
URL that was accessed |
|
|
Title of the website |
|
|
Number of times the URL was accessed |
|
|
Number of times the user accessed this website by typing the URL in the address bar |
|
|
Timestamp in microseconds when the website was last visited |
| Column | Type | Description |
|---|---|---|
|
|
Primary key, a unique ID for the record |
|
|
ID corresponding to a record in the |
|
|
Timestamp in microseconds when the website was visited |
| id | url | title | visit_date |
|---|---|---|---|
|
High Performance Log Collection Solutions |
|
Microsoft Edge (v79+) history location and details
Microsoft Edge history is stored in an SQLite database, the database filename is History and can be found in the following location:
- Microsoft Windows Vista, 7, 8, 10, 11
-
C:\Users\<username>\AppData\Local\Microsoft\Edge\User Data\<profile>\History
The tables containing the Microsoft Edge browsing history in the History database are named urls and visits.
Data from these tables can be joined to retrieve the URL, page title, and the time it was accessed.
| Column | Type | Description |
|---|---|---|
|
|
Primary key, a unique ID for the record |
|
|
URL that was accessed |
|
|
Title of the website |
|
|
Number of times the URL was accessed |
|
|
Number of times the user accessed this website by typing the URL in the address bar |
|
|
Timestamp in microseconds when the website was last visited |
| Column | Type | Description |
|---|---|---|
|
|
Primary key, a unique ID for the record |
|
|
ID corresponding to a record in the urls table |
|
|
Timestamp in microseconds when the website was visited |
| id | url | title | visit_time |
|---|---|---|---|
|
High Performance Log Collection Solutions |
|
Collecting browser history logs
The examples below demonstrate how to collect browser history logs.
Make sure that the machine running NXLog Agent has the SQLite ODBC driver installed:
-
On Windows, install an SQLite3 ODBC driver and ensure the driver name matches the value specified in the
ConnectionStringdirective. -
On Linux/Unix systems, install the SQLite ODBC driver using your distribution’s package manager. For example, the
libsqliteodbcpackage on Debian/Ubuntu-based systems.
This configuration uses the Exec extension to periodically run a batch script that copies the History database to a new location.
This is done to avoid cases when the database is locked by Google Chrome.
The copied database is then processed by the ODBC input module.
The database does not contain fields that identify the user, but NXLog Agent automatically adds the name of the machine to each event record.
| You can use this configuration for Microsoft Edge by changing the location of the original browser history database. |
<Extension json>
Module xm_json
</Extension>
<Extension exec>
Module xm_exec
<Schedule>
Every 30 min
<Exec>
odbc->module_stop();
sleep(5000000);
exec("C:\scripts\copy_chrome_db.cmd"); (1)
odbc->module_start();
</Exec>
</Schedule>
</Extension>
<Input odbc>
Module im_odbc
PollInterval 1200
ConnectionString DRIVER=SQLite3 ODBC Driver; \
Database=C:\logs\History_Chrome;Version=3;
SQL SELECT visits.id AS id, \
DATETIME(ROUND(visits.visit_time / 1000000-11644473600), \(2)
'unixepoch', 'localtime') AS EventTime, \
urls.url AS URL, \
urls.title AS Title \
FROM visits \
INNER JOIN urls ON visits.url = urls.id \
WHERE visits.id > ?
Exec $Hostname = hostname();
Exec to_json();
</Input>
| 1 | You must save copy_chrome_db.cmd in the path specified in the Exec directive.
The user running NXLog Agent must have permission to execute the file and read the History file. |
| 2 | Google Chrome saves visit_time in microseconds since 1601-01-01 (Windows epoch).
The SQL DATETIME function converts this to a datetime string in the local time zone. |
@echo off
copy "%LOCALAPPDATA%\Google\Chrome\User Data\Default\History" C:\logs\History_Chrome /Y >nul
{
"id": 100,
"EventTime": "2026-03-26 14:12:18",
"URL": "https://nxlog.co",
"Title": "High Performance Log Collection Solutions",
"Hostname": "PC1",
"EventReceivedTime": "2026-03-26T14:48:10.360819+03:00",
"SourceModuleName": "odbc",
"SourceModuleType": "im_odbc"
}
This example configuration uses the Exec extension to periodically copy the places.sqlite database to a new location.
This is done to avoid cases when the database is locked by Mozilla Firefox.
The copied database is then processed by the ODBC input module.
The database does not contain fields that identify the user, but NXLog Agent automatically adds the name of the machine to each event record.
define FDBPATH /home/<user>/.mozilla/firefox/<profile>/places.sqlite (1)
define FDBCOPY /tmp/places.sqlite (2)
<Extension json>
Module xm_json
</Extension>
<Extension exec>
Module xm_exec
<Schedule>
Every 30 min
<Exec>
odbc->module_stop();
sleep(5000000);
exec("/bin/sh", "-c", "cp %FDBPATH% %FDBCOPY%"); (3)
odbc->module_start();
</Exec>
</Schedule>
</Extension>
<Input odbc>
Module im_odbc
PollInterval 1200
ConnectionString DRIVER=SQLite3;Database=%FDBCOPY%;
SQL SELECT moz_historyvisits.id AS id, \
DATETIME(ROUND(moz_historyvisits.visit_date / 1000000), \(4)
'unixepoch', 'localtime') AS EventTime, \
moz_places.url AS URL, \
moz_places.title AS Title \
FROM moz_historyvisits \
INNER JOIN moz_places ON \
moz_historyvisits.place_id = moz_places.id \
WHERE moz_historyvisits.id > ?
Exec to_json();
</Input>
| 1 | Path of the places.sqlite database.
The user running NXLog Agent must have permission to read the file. |
| 2 | Path where the database will be copied for processing. The user running NXLog Agent must have permission to write the file. |
| 3 | Copies the file to the new location to avoid access being locked. |
| 4 | Mozilla Firefox saves visit_date in microseconds (Unix epoch).
The SQL DATETIME function converts this to a datetime string in the local time zone. |
{
"id": 100,
"EventTime": "2026-03-26 18:45:12",
"URL": "https://nxlog.co",
"Title": "High Performance Log Collection Solutions",
"EventReceivedTime": "2026-03-26T18:56:57.272942+03:00",
"SourceModuleName": "odbc",
"SourceModuleType": "im_odbc",
"Hostname": "PC1"
}