Getting Started

Legacy Python 3.5

Install the legacy HoneyLog sender on Apache, Nginx, or Varnish servers that only have Python 3.5.

Use this installer on Linux servers with python3 at version 3.5 where the current Apache, Nginx, or Varnish sender cannot run. You need Bash, sudo, systemd, curl, logrotate, and outbound HTTPS access. Varnish also requires varnishncsa.

Step 1: Prepare the site log

  • Apache. Configure LogFormat and CustomLog as shown in the Apache guide. Use a log file dedicated to the site's virtual host, such as /var/log/apache2/honeylog_access-apache-example.com-XyZ1234.log.
  • Nginx. Configure log_format and access_log as shown in the Nginx guide. Use a log file dedicated to the site's server block, such as /var/log/nginx/honeylog_access-nginx-example.com-XyZ1234.log.
  • Varnish. The installer configures varnishncsa to write to HONEYLOG_LOG_PATH. Use a site-specific path such as /var/log/varnish/honeylog_access-varnish-example.com-XyZ1234.log.

Step 2: Install the legacy sender

In HoneyLog, select the site and open Settings → Installation. Choose its web server and expand Legacy Python 3.5 for the installation and verification commands. Run the installation command in Bash on that server. Bash hides the secret while you paste it.

The example uses Apache. For Nginx or Varnish, change HONEYLOG_SERVER_TYPE to nginx or varnish. Set HONEYLOG_LOG_PATH to the exact path from Step 1, and use the instance name prefilled in the dashboard. A named Varnish writer filters requests by the exact hostname in HONEYLOG_SITE_DOMAIN. An existing unnamed writer can also record those requests.

read -rsp "Honeylog ingestion secret: " HONEYLOG_INGESTION_SECRET
echo
export HONEYLOG_INGESTION_SECRET
export CLIENT_BASE_URL='https://api.honeylog.io/clients'
export HONEYLOG_API_URL='https://api.honeylog.io/events'
export HONEYLOG_SITE_DOMAIN='example.com'
export HONEYLOG_SERVER_TYPE='apache'
export HONEYLOG_LOG_PATH='/var/log/apache2/honeylog_access-apache-example.com-XyZ1234.log'
export HONEYLOG_INSTANCE="legacy-python35-example.com-XyZ1234"
curl -fsSL "$CLIENT_BASE_URL/legacy-python35/install.sh" | bash

Reinstall the legacy sender

To keep the existing service and checkpoint, keep the same HONEYLOG_SERVER_TYPE and log path, and reuse the original HONEYLOG_INSTANCE. For an existing unnamed installation, omit the export and run unset HONEYLOG_INSTANCE if your shell already has it set. For example, the unnamed Apache service is honeylog-apache-legacy.service.

Step 3: Verify the installation

Check the service on the server. For Nginx or Varnish, replace apache with nginx or varnish in the service name. On Varnish, also check the matching honeylog-varnishncsa-legacy@legacy-python35-example.com-XyZ1234.service for the writer.

sudo systemctl status honeylog-apache-legacy@legacy-python35-example.com-XyZ1234.service --no-pager
sudo journalctl -u honeylog-apache-legacy@legacy-python35-example.com-XyZ1234.service -n 100 --no-pager

Open a public page on the selected site, wait about a minute, and match the request in Raw Logs.