Skip to content
This repository was archived by the owner on Nov 2, 2022. It is now read-only.

Fetch data

Gaelan Lloyd edited this page Dec 12, 2016 · 3 revisions

Congratulations! You're now ready to put Laika to work to start fetching data on your behalf.

Step 5.1. Fetch data manually

From within Laika's installation folder, run:

php ./fetch.php [pack-member-domain-name] [date]
Parameter Description
pack-member-domain-name The name of the pack member to fetch data for. This should match the exact hostname that the Laika dashboard will be displayed on, as well as the folder within the /pack-members/ folder containing the credentials files.
date A time period to fetch data for, expressed as YYYY-MM-DD. To fetch data for April 2016, use 2016-04-01.
  • date must always be supplied as YYYY-MM-DD format, even though the day of the month it isn't used (Laika fetches data for whole months).
  • date cannot be in the future.

Step 5.2. Automate data fetching

Laika fetch operations could be launched from a cron job to completely automate data fetching. However, manual data items, if required by the environment, will still need to be added to the database through other means.


Other operations

Retroactively fetch data for newly-added sites

It is possible to add new sites to a Laika pack and then retroactively fetch data for those sites. Simply run manual fetch operations using the following command:

php ./fetch.php [pack-member-domain-name] [date] [site]

Note:

  • The site parameter only accepts a single integer site ID.
  • Manual fetch operations can only be run one month at a time, one site at a time. So, if you added two sites and need to fetch 6 months of data, you will have 12 commands to run.

Clone this wiki locally