Skip to main content
Skip table of contents

Visualizing File Share Totals

A popular request with the Shinydocs Visualizer is to display the totals or sums of each crawled file share that is contained within one index. If that sounds good, you have come to the right place! This is easy to achieve in the Visualizer with some simple configuration, best part is, this will not have an impact on your index! This “new field” is used in the visualizer only, no need to worry about accidentally tagging, running extra processes, or waiting.

This new field is for visualization purposes only. These fields cannot be used for search.

1. Set up the “scripted field” for the index of your choice

  1. Open the Shinydocs Visualizer in your web-browser

  2. Select Management > Index Patterns

  3. Select the index you will apply this to (you can use an aggregate index as well)

  4. Select the tab “Scripted fields” > Add scripted field

  5. Enter the following configuration

    1. Name: Share Name
      Note: You MUST use this name if you intend to use the paired visualization in this article

    2. Language: painless

    3. Type: string

    4. Format: - Default -

    5. Popularity: 1

    6. Script:

      if (doc['path.keyword'].value != null){
      def m = /(\\\\[a-zA-Z0-9|a-zA-Z0-9 |a-zA-Z0-9_]+\\[a-zA-Z0-9|a-zA-Z0-9 |a-zA-Z0-9_]+).*/.matcher(doc['path.keyword'].value);
      if ( m.matches() ) {
      } else {
      return 'Unexpected path (likely not a UNC path)'
  6. Save Field

  7. You will now notice in the Discover tab, there is a new field called “Share Name” and it contains the machine and name of the share!

Example of Share Name in the Discover tab

2. Set up the visualization

Import our pre-configured visualization into the Shinydocs Visualizer.

  1. Download the file on this article (bottom of the article)

  2. Open the Shinydocs Visualizer in your web browser

  3. Select Management > Saved Objects

  4. Select “Import”

  5. In the newly opened panel, select “Import”

  6. Select “ShareNameDataTable-Visualization.json” from your download location

  7. Select “Import” at the bottom of the panel

  8. In the “Index Pattern Conflicts” panel, select the index you want the visualization to be paired with from the dropdown menu.

  9. Select “Confirm all changes”

  10. Now you can add this visualization to any of your dashboards, or make a new dashboard!



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.