My notes + bits from the Grafana documentation and neuralfraud's wiki (which is sorely lacking in thorough documentation).
My setup:
Application | Version |
---|---|
Grafana | v10.0.3 (eb8dd72637) |
PRTG Plugin | v4.0.4 (master branch from Github) |
PRTG | 23.2.84.1566 |
Development / Testing Environment (see notes for setup):
Application | Version |
---|---|
Grafana | v10.0.3 (eb8dd72637) |
PRTG Plugin | v4.0.4 (master branch from Github) |
PRTG | 23.2.84.1566 |
^ The plugin is tested & working up to (at least) this Grafana version.
Note: When upgrading (the PRTG extension) from v4.0.3 to v4.0.4, some graphs may break due to the channel name change. To fix, I went in and re-added the channel for the affected visualizations.
Grafana also runs on Linux (which is easier to maintain + substantially lighter on resources), but since this is primarily for PRTG, it made the most sense (for me) to install it to PRTG's Windows Server.
Some of my notes will reference the Windows-install, as a result. If you use Grafana for mostly things other than PRTG, the Linux version is probably the best way to go!
Initial Setup
- Create an API-only user & group - Setup instructions for both Grafana and the PRTG Grafana plugin
Build a Dashboard
- First Step - Single results or grouped graphs
Statistical
- Group Sensor - Query similarly-named (but different) sensors that are members of the same Group
- Data Transfer Rates - Getting the correct unit measurements
- Combining Queries - Combining two separate sensor results in the same map
Visual
- Custom styles - Add gradients, heading styles and custom icons to your dashboard
- Adjust Bar Gauge Legend - Remove the repeated channel on the bar gauge legend
- Sort Ordering - Sort options in graphs
Troubleshooting
- Common Problems - Weird bugs and quirks and how to bypass them
Preview Your Dashboard
While on the dashboard view, click the monitor icon; click once more to enter kiosk mode and remove the headers. ESC to quit kiosk mode.
Share the Dashboard
Click the arrow in the upper-right corner
If you want the shared dashboard to refresh, append &refresh=3m
to the address bar of your browser. By default, a username & password are required for previews. Apparently you can make "groups" that don’t require such - I've not yet set up.
Backup a Dashboard
Dashboards are kept in a .db file/database.
- For a quick backup, click the Share button on a dashboard (arrow icon, top-right of the dashboard) > click the Export tab > Save to File
- This tool saves all of the board JSON at once, but not the database - though a simple copy of
C:\Program Files\GrafanaLabs\grafana\data\grafana.db
will suffice for infrequent/manual backups.
Since its a database, if backed up in a private git repo, encrypt it. Eventhough the user passwords are hashed and salted, its better to add another layer of security - should the current hashing algorithm get broken in the future.
Add https to Grafana
- Encrypt your connection - Enable SSL on your Grafana server
Useful Links
- PRTG KB Thread about Grafana - Some of my notes were obtained from here