(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.
- (Windows) Starting Grafana In Fullscreen When Endpoint Display Boots
- (Windows) Focusing Grafana On Top Of All Other Windows On A 60 Second Cycle
- (Windows) Switching off all Windows notifications
- 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”.
Step 2: Open Notepad
This Notepad file will contain the command to launch Grafana. Click the Cortana search box -> Type Notepad -> Click Notepad.
Step 3: Get your dashboard’s URL
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.
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.
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.
Step 6: Open the startup folder
Now Right Click on the Start button, and then click Run.
And then type “shell:startup” (without the quotes) into the Run dialog box and click OK or press enter.
The Windows Startup folder will then appear. Windows will attempt to start anything in this folder when the computer boots ups.
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.
Once your mouse cursor has been released, select “Create Shortcut Here” from the menu that appears.
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.