Skip to content

Update TWLight to send nginx log data to matomo#690

Merged
suecarmol merged 2 commits into
masterfrom
jason-T281743
May 5, 2021
Merged

Update TWLight to send nginx log data to matomo#690
suecarmol merged 2 commits into
masterfrom
jason-T281743

Conversation

@jsnshrmn
Copy link
Copy Markdown
Member

@jsnshrmn jsnshrmn commented May 4, 2021

Description

  • Adds a syslog service
  • configures nginx with a json log format that is shipped to syslog
  • configures syslog with the matomo-log-analytics script as the destination

In this configuration, our nginx access logs are ingested into matomo using the same API as the javascript tracker

Rationale

This is the glue that gets analytics into matomo

Phabricator Ticket

https://phabricator.wikimedia.org/T281743

How Has This Been Tested?

I created a local site code in matomo and created an auth token and temporarily added those values into docker-compose.yml so that I could test. I then accessed the local dev site and checked the matomo dashboard. The traffic is showing up there.

Screenshots of your changes (if appropriate):

NA

Types of changes

What types of changes does your code introduce? Add an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Minor change (fix a typo, add a translation tag, add section to README, etc.)

@jsnshrmn jsnshrmn requested a review from suecarmol May 5, 2021 14:38
@jsnshrmn
Copy link
Copy Markdown
Member Author

jsnshrmn commented May 5, 2021

Realized that I hadn't updated the debian swarm init script. Wouldn't impact our running instances, but would impact freshly created servers. Fixed!

Copy link
Copy Markdown
Contributor

@suecarmol suecarmol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for setting up Matomo! This looks great.

@suecarmol suecarmol merged commit 49f1a1f into master May 5, 2021
@suecarmol suecarmol deleted the jason-T281743 branch May 5, 2021 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants