Canned Dashboards

To add a Canned Dashboard to Faros CE:

  1. Create the dashboard in your local instance
  2. Export the dashboard using the following commands
  3. Create a PR with your new dashboard JSON files
cd init
npm i
node lib/metabase/init.js \
  --metabase-url "http://localhost:3000" \
  --username "[email protected]" \
  --password "admin" \
  --database "faros" \
  --export <dashboard id number>

Where:

  • β€œ[email protected]” and β€œadmin” are Metabase username and password
  • "dashboard id number" is the integer in the last part of the URL path when you load a dashboard in Metabase

If the console output from that command looks good, save the output to a new .json file in resources/metabase/dashboards.

You can also output and save the dashboard to a new file with a single command:

node lib/metabase/init.js \
  --metabase-url "http://localhost:3000" \
  --username "[email protected]" \
  --password "admin" \
  --database "faros" \
  --export <dashboard id number> > resources/metabase/dashboards/<dashboard-name>.json

Your new dashboard will automatically be imported in new deployments of Faros CE. You can also test the import manually on your existing deployment with the following command:

node lib/metabase/init.js \
  --metabase-url "http://localhost:3000" \
  --username "[email protected]" \
  --password "admin" \
  --database "faros" \
  --import-one "foobar.json" # must be located in resources/metabase/dashboards/

Please note that the dashboard will always be created anew in the corresponding collection it was exported from, and all the cards it needs will be created in there as well regardless of where they originally were (possible overwriting existing ones based on name).

Create a PR with your new dashboard JSON files to share your dashboard templates with the Faros community. Those files MUST be in resources/metabase/dashboards/ in the init folder.