Links to folder path

  • What Grafana version and what operating system are you using?
    Grafana 10.X

  • What are you trying to achieve?
    Data source: MS-SQL Server
    Opening Windows Folder

In DB, I have specific column called “File Path” have the values like below (sample)

but the real folder path is

I have used Table visualization to display the column “File Path” and other related columns.

My requirement is, on clicking any “File Path” value in the Table, only the relevant folder should open not the file
Example: Only the below folders should open

  • How are you trying to achieve it?
    In the SQL, I have appended the value “T:”, so I will got the complete path.

And added condition and derived new column to show only the folder name by removing the file name and named it as FOLDER_PATH.

  • What happened?
    I tried adding the below add in data links but, its not working.

Also I tried using the file:/// scheme and replace backslashes (\) with forward slashes (/). Still on clicking the “FOLDER_PATH” value nothing happening

  • What did you expect to happen?
    My expectation is to open the relevant folder

You have not said what operating system you are on but I think Grafana (at least on Ubuntu) only has access to files within it’s own directory structure.

Up until Grafana v9 you could use a symbolic link in the Grafana file structure pointing to your files outside of Grafana, e.g. /usr/share/grafana/my_link_to_files but Grafana v9 I think introduced some more security and symbolic links in Grafana seemed to no longer work like this.

If this is your issue then you can use a “bind” mount instead of a symbolic link but you would still have to reference the Grafana file path, not the actual file path, e.g. /usr/share/grafana/my_bind_dir/my_file.jpg

Thanks @codlord for your reply.

So can I consider my requirement i.e., specific to access to the windows folder which do not have any reference to the Grafana cannot be open by clicking the value from table visual?

Also, if you have related documentation from Grafana, please share me the link.
It will be great help

So, the error message you posted explains the reason (local resource loading) and one solution (host the files on a local webserver and translate your file paths to a web address).

The only other solution I know is what I said already, but I don’t use Windows so don’t know the Windows directories/commands, but there may be a way to mount on Windows the same way. So the idea is to:

  1. create a file mount point within Grafana directories, e.g. on Ubuntu mkdir /usr/share/grafana/my_mount_point

  2. Mount the directory (bind mount on Ubuntu) where your files are to that mount point e.g. so when you do a directory listing of /usr/share/grafana/my_mount_point it lists your files even though they are actually stored elsewhere. I don’t know what mounting/sharing options Windows provides.

  3. Translate your file paths in Grafana so if your database is for example referencing T:\Folder_level1 you translate the T:\ to your Grafana mount point directory.

@sowdenraymond and @codlord,
Thanks very much for your suggestions!