meerkat-dashboard/meerkat

Ticker API

davekempe opened this issue · 2 comments

The ticker should have an API that lets me update it from scheduled downtime using a notification command.

This way I can hit the meerkat API of a particular dashboard and update the ticker on that dashboard with a message. This would be triggered from scheduled downtime in Icinga, and take the form of a notification command.
The command would run like so:

downtime_meerkat_ticker --meerkaturl=https://mymeerkat --dashboard=dashboard-id-or-name --ticker-name=ticker-name-from-dashboard-elements --start (or --stop)

This would let the user start the downtime and stop it again via an icinga notification command. There is no requirement for authentication at this point, as it would be operating via a closed network. Its expected if people need to secure this API, they put a reverse proxy in front of meerkat to block this URL, so we need a seperate url that makes this possible.

Manually editing the dashboard isn't feasible for this usecase.

The tickers don't have start/stop in them, if you want to start/stop a ticker currently the options are

  • add/remove the text
  • change the font and background colour
  • make the text size 0

So make this happen we really want to

  • edit a element for a dashboard using a API which is a fairly generic thing
  • or create a new feature that disabled elements and an api that goes along with that, disabling element is fairly generic too

There are some problems that we want to solve before we allow this

  • if we edit then we want dashboard history in case people stuff things up - #215
  • I'm not sure how meerkat handles the uniqueness of element, it is possible for dashboards to have elements with the same title in the json, I don't know how this translates to the running code. I think the solution here would be to allow unique titles only.

Another way to do this would be to add a ticker element which is transparent/invisible when there is no content.
This means you can only put tickers on dashboards which have one or more ticker elements laid out.

There could be default ticker locations defined, e.g. lower third, upper third, central.

This would require that ticker content is stored in meerkat in a persistent way.

Proposed development order:

  1. store ticker content on the filesystem (json file)
  2. add API methods to update
  3. add frontend to display
  4. add frontend to edit