Declarative rotating dashboards in a dedicated browser
Being in IT operations, I need constant good views into the systems so we can spot and rectify issues quickly.
I really like everything as code. The setup for this solution should
be no exception.
Therefore what I want is something along this:
- Declarative URLs for each tab in the browser to rotate through. If I want to add another important graph/dashboard to my viewing list. I simply open this file and add it there. Saved in git, managed as code.
- Must have a way to rotate the tabs automatically and on launch.
- Should be in a separate window and screen.
- The browser, shouldn’t be a locked down browser, like GNU Icecat or ungoogled-chromium which are the default in my OS. Although I like secure privacy respecting software, in this case I want the dashboards to just work and won’t be using it for anything else.
My primary browser, for now is the very nice qutebrowser.
Running Guix, I’ll install a less secure and separate browser from Nix, which allows to run applications easily separate from the rest of the system.
. /home/ds/.nix-profile/etc/profile.d/nix.sh nix-env -i firefox
Then launch firefox once off and install this tab-rotator plugin. Set it to start rotating on start up.
Next up, create a wrapper bash script in ~/.local/bin/firefox
#!/bin/sh
# Dashboards, rotated, full screen for me on a screen.
# nix-env -i firefox
# Then install this plugin for tabs
# https://addons.mozilla.org/en-US/firefox/addon/tab-rotator/
. /home/ds/.nix-profile/etc/profile.d/nix.sh
# Each entry in the below file has a URL.
xargs -a ~/.config/dashboards-bookmarks.txt \
/home/ds/.nix-profile/bin/firefox -new-tab "$line" \
> /dev/null 2>&1 &
# Make full screen.
sleep 2 ; xdotool search --sync --onlyvisible --class "Firefox" windowactivate \
key F11 > /dev/null 2>&1
So the above simply launches this firefox browser in full screen with
one tab from each line in ~/.config/dashboards-bookmarks.txt and it
will rotate through these tabs every x seconds. I put this firefox
window on a dedicated window and keep an eye on things through the
day.
~/.config/dashboards-bookmarks.txt looks something like this:
https://grafana.example.com/d/098237483/link1 https://grafana.example.com/d/098237483/link2 https://cmk.example.com/prod/check_mk/
