LeSysBot docs

Package version

1.1.0

Platforms

All platforms

Requires on PATH

nothing

Python dependencies

none

Install#

Nothing to do — this package ships inside LeSysBot and is available as soon as the installer finishes.

Tools#

This package exposes 3 tools.

share_dashboard(expiration=1h)#

Publish a point-in-time snapshot of the dashboard and return a public link.

Parameters

ParameterTypeDefaultDescription
expirationstr1hHow long the link stays live: 1h, 6h, 12h, 1d, 7d, 30d, or never.

list_snapshots()#

Show every snapshot that is still live, with its link and time remaining.

Parameters

Takes no parameters.

delete_snapshot(which)#

Take a snapshot down, by its number from the listing, its key, or 'all'.

Parameters

ParameterTypeDefaultDescription
whichrequiredstrThe snapshot's number from /list_snapshots, its key, or 'all'.

Notes#

  • Needs the monitoring stack running — it reads the dashboard and its data from your local Grafana. Start it with dashboard/scripts/start.sh (or start.ps1).
  • The snapshot is a frozen copy: the data is baked into the published dashboard, so viewers never reach back to your Prometheus and see nothing beyond the window you captured.
  • The link is genuinely public — anyone who has it can open it. Snapshots expire after the time you chose (1h by default), and delete_snapshot removes them from both Grafana and raintank.
  • raintank's CDN may keep serving a deleted snapshot for up to an hour afterwards.
  • Grafana's location and credentials come from LESYSBOT_GRAFANA_URL, _USER, _PASSWORD, and _TOKEN, defaulting to localhost:3000 with admin/admin.

Troubleshooting#

"Can't reach Grafana"

WhyThe monitoring stack isn't running, or Grafana is on a different port.

FixStart the stack, or point LESYSBOT_GRAFANA_URL at the right address.

Check it yourself

shell
curl -s localhost:3000/api/health

The published dashboard shows empty panels

WhyPrometheus had no data for the captured window.

FixLet the stack run for a few minutes so the exporters have something to report, then share again.

Check it yourself

shell
docker compose ps

Source#

Every package is a folder holding a README.md and a tool.py. Read this one on GitHub: lesysbot/lesysbot/tools/share-dashboard.

To write your own, see Writing tools.