Info
Content

(Windows) Starting Grafana In Fullscreen When Endpoint Display Boots

This is a Windows specific tutorial.

Using a Windows BATCH command, you can start Grafana to automatically display in fullscreen mode when your Grafana display PC boots up. This quick tutorial assumes you already have a Grafana instance accessible from the PC you’ll be displaying the Grafana dashboard on.

See also:

Requirements:

  • Windows PC
  • An operational Grafana instance
  • Chrome or a Chromium compatible Web browser

Step 1: Display file extensions

This will allow you to change the file extension from .TXT to .BAT. Open an Explorer window, click on the View tab, and then check the box that says “File name extensions”.

windows_10_file_name_extensions_checkbox.png

Step 2: Open Notepad

This Notepad file will contain the command to launch Grafana. Click the Cortana search box -> Type Notepad -> Click Notepad.

start_notepad.jpg

Step 3: Get your dashboard’s URL

Navigate to the dashboard you want to display in Grafana, then select and copy the URL in the omnibar.

dashboard_url-800x365.jpg

Step 4: Input commands to fire Grafana in Notepad

Depending on your use case, there are several commands you might want to enter here. In my case, I’m launching Chrome in Kiosk mode and in fullscreen with the last 30 minutes of Grafana data being displayed and a refresh rate of 30 seconds.

Also, please note that Chrome may be located in a different folder on your PC, although what you see below is the default Chrome installation directory, and be sure to replace the “XXX.XXX.X.X:3000” with your Grafana server’s IP address or URL. If your Grafana isntance is hosted on the same PC that you’re going to be displaying Grafana on, then you can use localhost:3000 or 127.0.0.1:3000.

start_grafana_command_2-800x382.jpg

The URL with the command switches should look something like this:

“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” -kiosk -fullscreen “YOUR_DASHBOARD_URL_HERE?orgId=1&from=now-30m&to=now&refresh=30s&kiosk”

Step 5: Save the Notepad file as a BATCH file

Now click File -> Save As… to save the file as a BATCH file instead of a TXT file.

save_as.jpg

Then give the file a name like “launch_grafana” but make sure to REMOVE the “txt” file extension, and then replace it with “bat”. This turns the file into a Windows executable command rather than a text file.

bat.jpg

Step 6: Open the startup folder

Now Right Click on the Start button, and then click Run.

start_run.jpg

And then type “shell:startup” (without the quotes) into the Run dialog box and click OK or press enter.

shell_startup.jpg

The Windows Startup folder will then appear. Windows will attempt to start anything in this folder when the computer boots ups.

startup_folder.jpg

Step 7: Copy a shortcut of the start_grafana.bat file into the Windows startup folder

Open another Explorer window, navigate to the folder where you saved the start_grafana.bat file, and set it next to the startup folder window. Then Right-Click AND HOLD on the Batch file we created earlier, drag it into the Startup folder, and then release the mouse button.

move_batch_file-800x461.jpg

Once your mouse cursor has been released, select “Create Shortcut Here” from the menu that appears.

create_shortcut.jpg

And that’s it. Next time your computer restarts, Grafana will fire up automatically in fullscreen mode to the dashboard that you chose.

NOTE: Putting Chrome in Kiosk most will DISABLE THE CHROME TOOLBAR. In order to EXIT Chrome, you will have to press Alt+F4.

 

Back to top