Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Cloudron Forum

Apps | Demo | Docs | Install

Archive cronjob for Matomo... is this running out of the box, or should Matomo still be setup to archive when accessed from the browser?

Scheduled Pinned Locked Moved Solved Matomo
matomocron
6 Posts 3 Posters 370 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by girish
    #1

    I noticed out of the box the Matomo configuration shows that it's set to "Archive reports when viewed from the browser" (Yes), but it mentions for medium-high traffic sites to disable that and rely on the cron job. I looked to see if there was a cronjob or if I could enable one, and I see the cron task for archiving in the Cron tab in Console view, so I assume this means this cron is executed automatically on a regular basis, is that correct? If so, we should perhaps try to make the image to disable web archiving "when viewed from the browser" by default, so that it's setup more optimally to take advantage of the archive script. I believe that setup is "best practice" for Matomo.

    My confusion here though is... is this cron actually scheduled? And if so, how often does it run? When running "crontab" or something in console, I get no output, so I'm just not certain how a user can tell where cron jobs are scheduled and how often they run, etc. I see the script exists, but can't tell if it's being run on a regular basis. Any insight would be appreciated.

    Thank you in advance. 🙂

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    0
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by d19dotca
    #2

    Ah, I think I answered one of my own questions after just a few more minutes of trying to figure it out, lol, go figure.

    So it seems these are setup in the CloudronManifest file, correct? According to the Git for Cloudron's Matomo project, it's running every 15 minutes. https://git.cloudron.io/cloudron/matomo-app/-/blob/master/CloudronManifest.json

    So with that known that it's at least running on its own, does it make sense then to have the setting for Matomo out of the box be set to "No" for "Archive reports when viewed from the browser?" if it's possible to do with a config file? Just seems like one of those things where we're duplicating work - Matomo is now archiving reports two times, once every 15 minutes per the cron, and also whenever it's accessed via the browser. This goes against Matomo's recommendations.

    Screenshot below. I set mine temporarily to "No" after my own digging into the package, but it's "Yes" by default. It recommends setting to "No" when a cron task for this is running though.

    28bbd00d-136f-48f3-a77a-61815dfce8b9-image.png

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    0
  • nebulonN Offline
    nebulonN Offline
    nebulon Staff
    wrote on last edited by
    #3

    Thanks I think this is just a config file option which needs fixing in the next package release. I've created an issue at https://git.cloudron.io/cloudron/matomo-app/-/issues/28

    1 Reply Last reply
    2
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by
    #4

    Correct. I can say this seems to make using the mobile app much quicker too when it’s disabled to archive on site load, likely since it isn’t needing to wait for the script to run when loading the app. So this would be a performance boost too once it’s corrected.

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    1
  • girishG Do not disturb
    girishG Do not disturb
    girish Staff
    wrote on last edited by
    #5

    I did a fresh install of matomo and I see this:

    cfb2b001-b519-48d5-9326-37196937da99-image.png

    We actually have code to disable browser based archiving: https://git.cloudron.io/cloudron/matomo-app/-/blob/master/start.sh#L47

    d19dotcaD 1 Reply Last reply
    0
  • d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    replied to girish on last edited by
    #6

    @girish A fresh install already has it set to "No"? Interesting, I don't recall ever setting mine to "Yes", but I guess I did. Thank you for confirming, seems it's okay then if it's set to "No" by default and the cronjob is doing it automatically.

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    0

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Login

  • Don't have an account? Register

  • Login or register to search.