Excerpt |
---|
The |
squirro_assets tool
Starting with the 2.4.5 Squirro release, you can use the squirro_asset
tools to manage all the custom "code artifacts" in Squirro server systems such as dashboard loaders, dashboard widgetsDashboard Loaders, Dashboard Widgets, or pipeletsPipelets.
The first parameter is the type of asset: dashboard_loader
, widget
, or pipelet
, and if at any time you are unsure of what parameters are allowed, you can request help by adding the --help
parameter.
Code Block |
---|
> squirro_asset --help usage: squirro_asset [-h] [--verbose] [--log-file LOG_FILE] [--version] {widget,pipelet,dashboard_loader} ... Squirro asset management tool positional arguments: {widget,pipelet,dashboard_loader} asset type help widget Manage custom widgets pipelet Manage custom pipelets dashboard_loader Manage custom dashboard_loader General Options: -h, --help Show this help message and exit. --verbose, -v Show additional information. --log-file LOG_FILE Log file on disk. --version show program's version number and exit |
...
Code Block |
---|
> squirro_asset dashboard_loader upload --folder <dashboard-loader-folder> --token <token> --cluster <cluster-url> |
where <dashboard-folder>
is a directory containing dashboard loader html, css and javascript files along with a file named dashboard_loader.json
formatted in hjson, and you specify one of the options to connect to a squirro Squirro server installation (using <token> and <cluster-url> in the above example).
You can list all dashboard loaders using the same parameters as for upload except --folder
:
Code Block |
---|
> squirro_asset dashboard_loader upload --token <token> --cluster <cluster-url> [ { "hash": "ec43609e-c5c6-11e6-ac8a-80e65013fba6", "name": "name-1", "title": "title-1", "directory": "/var/lib/squirro/topic/assets/dashboard_loader/tenant", "resources": { "css": [ "mycss.css" ] } }, { "directory": "/var/lib/squirro/topic/assets/dashboard_loader/tenant", "hash": "bed8e082-c395-11e6-94ff-000c29dfbc49", "name": "name-2", "resources": { "html": [ "main.html" ] }, "title": "title-2" } ] |
...
Starting with Squirro release 2.4.5 you can also use the squirro_asset
tool in place of the squirro_widget tool to upload and list custom dashboard widgets using the same options as for dashboard loaders.
...
Also with release 2.4.5 you can use the squirro_asset
tool in place of the pipelet tool mentioned under Pipelets to manage pipelets. Instead of
...