6 Replies Latest reply on Mar 21, 2019 7:19 AM by Diego Luis

    Storage used or consumed by each tableau server site

    Adam Adam

      Hi,

      Is there any way to get how much storage is being used by each tableau site.

      Please the attched screenshot
      postman_storage

      Thank you

        • 1. Re: Storage used or consumed by each tableau server site
          Russell Christopher

          Hi Adam!

           

          Can you re-phrase your question? The screenshot itself answers your question, so I'm not clear what you need. Are you asking how to GET to this screen? How to get this information using a different technique?

          • 2. Re: Storage used or consumed by each tableau server site
            Adam Adam

            Hi Russell,

             

            I was looking to see if there is a different technique to get the same information in the screen. It is not easy to get that information from the screen especially if you have hundreds of sites.

            Please advise.

            Thank you

            • 3. Re: Storage used or consumed by each tableau server site
              Russell Christopher

              OK. So can you explain how you'll consume it, then? I have some other ideas, but if you have hundreds of sites, you're still going to need to browse hundreds of data points.

               

              Please explain the "perfect" way this info would be presented to you.

              • 4. Re: Storage used or consumed by each tableau server site
                Adam Adam

                I just want to be able to get :site name, storage used, and max storage. and put it in an Excel sheet

                Thank you

                • 5. Re: Storage used or consumed by each tableau server site
                  Russell Christopher

                  You could find / copy / modify the "tabbed_admin" reports, which essentially are the same vizzes you can run from the "Status" page of Tableau. There's a specific report that deals with sizes of extracts, and I'm sure you could change that one around and then export it.

                   

                  However, there's probably an easier way if you don't mind a little bit of hacking.

                   

                  The data you need is already being sent to the browser...so just GRAB it.

                   

                  If you launch your browser's Dev Tools (I happen to be in IE at the moment), and then go to "Network" when you call the Sites page above, there is a call to getSites. The response to this call is actually the information in your screenshot:

                   

                  Screen Shot 2017-06-16 at 8.46.28 AM.png

                   

                  I right-clicked that entry and chose "Copy Response Payload".

                   

                  The payload is JSON:

                   

                  {"result":{"totalCount":2,"moreItems":false,"sites":

                  [{"settings":    

                           {"urlName":""

                       ,"name":"Default",

                       "storageQuotaEnabled":false,

                       "siteAdminsCanAddUsers":true,

                       "userQuotaEnabled":false,

                       "metricsEnabled":false,

                       "cacheWarmupEnabled":true,

                       "authoringEnabled":true,

                       "sheetImageEnabled":true,

                       "versionHistoryEnabled":true,

                       "contentVersionLimitEnabled":true,

                       "dataAlertsEnabled":true,

                       "contentVersionLimit":25,

                       "guestAccessEnabled":true,

                       "customSubscriptionEmailEnabled":false,

                       "customSubscriptionFooterEnabled":false,

                       "commentingEnabled":true},"userCount":1,

                       "availability":"active",

                       "storageUsedBytes":73853125596,

                       "siteAdminSettings":{"refreshTokenEnabled":true,"refreshFailureNotificationEnabled":true,"addSupportUserEnabled":false,"remoteQueryingEnabled":false},"licensedUserCount":0,"adminCount":0,"id":"1"},

                  {"settings":    

                       {"urlName":"Foo",

                       "name":"Foo",

                       "storageQuotaEnabled":false,"siteAdminsCanAddUsers":true,"userQuotaEnabled":false,"metricsEnabled":false,"cacheWarmupEnabled":true,"authoringEnabled":true,"sheetImageEnabled":true,"versionHistoryEnabled":true,"contentVersionLimitEnabled":true,"dataAlertsEnabled":true,"contentVersionLimit":25,"guestAccessEnabled":false,"customSubscriptionEmailEnabled":false,"customSubscriptionFooterEnabled":false,"commentingEnabled":true},"createdAt":"2017-06-16T15:27:01.902Z","userCount":1,"availability":"active","storageUsedBytes":0,"siteAdminSettings":{"refreshTokenEnabled":true,"refreshFailureNotificationEnabled":true,"addSupportUserEnabled":false,"remoteQueryingEnabled":false},"licensedUserCount":0,"adminCount":0,"id":"3"}]}}

                   

                   

                  ...you can parse this JSON yourself and/or save it as JSON file and then import it into Tableau and let Tableau do the parsing for you.

                  • 6. Re: Storage used or consumed by each tableau server site
                    Diego Luis

                    Hello,

                    I have modified a query I found on the web to add the details I want and it returns the data you're interested in

                     

                    SELECT

                      "Get Names"."site" AS "Site Name",

                      MAX("Get Names"."user_quota") AS "User Quota",

                      ROUND(MAX("Get Names"."storage_quota")/(1000*1000*1000),2) AS "Storage Quota (GB)",

                      ROUND(SUM("Get Names"."size")/(1000*1000*1000),2) AS "Storage Used (GB)",

                      CONCAT(ROUND(SUM("Get Names"."size")/MAX("Get Names"."storage_quota")*100,2),'%') AS "Percentage Used (%)"

                    FROM (

                      (

                      select workbooks.id as id, workbooks.created_at as created_at,

                      workbooks.owner_name as owner_name, workbooks.domain_name as domain,

                      workbooks.project_name as project, workbooks.project_id as project_id,

                      workbooks.workbook_url as url,workbooks.name,size,'workbook' as type, NULL as last_access_time,

                      _sites.name as site, _sites.url_namespace as site_id,

                      sites.user_quota, sites.storage_quota

                      from _workbooks workbooks, _sites, sites

                      where _sites.id = workbooks.site_id

                      and _sites.id = sites.id

                      )

                      union

                      (

                      select datasources.id as id, datasources.created_at as created_at,

                      datasources.owner_name as owner_name, datasources.domain_name as domain,

                      datasources.project_name as project, datasources.project_id as project_id,

                      datasources.datasource_url as url,datasources.name,size,'datasource' as type, last_access_time,

                      _sites.name as site, _sites.url_namespace as site_id,

                      sites.user_quota, sites.storage_quota

                      from _datasources datasources, _sites, _datasources_stats datasources_stats, sites

                      where _sites.id = datasources.site_id

                      and datasources.id = datasources_stats.datasource_id

                      and _sites.id = sites.id

                      )

                    ) "Get Names"

                      LEFT JOIN "public"."extracts" "Data Source Extracts" ON ("Get Names"."id" = "Data Source Extracts"."datasource_id")

                      LEFT JOIN "public"."extracts" "Workbook Extracts" ON ("Get Names"."id" = "Workbook Extracts"."workbook_id")

                    group by "site"

                    order by 1