9 Replies Latest reply on Nov 13, 2017 10:28 AM by Steve Wright

    Tableau server workgroup db http_requests (_http_requests) table

    lei.chen.0

      Hello,

       

      I connected to Tableau Server's PostgreSQL DB workgroup http_requests (_http_requests) table,

      and see what the screenshot shows.

      image.png

       

      My questions are,

       

      1. Why user_id is Null?

       

      I thought that, user not having logged in could be a possible reason,

      but there are currentsheet information with user_id Null, so I got confused.

       

      image2.png

       

      2. What does each action exactly mean?

       

      Thanks in advance!

       

       

      Regards.

        • 1. Re: Tableau server workgroup db http_requests (_http_requests) table
          Jeff Strauss

          what are you trying to analyze out of this table?  I have used it to measure reponse times and indeed it often does not have user_id and this is beyond our control.  However, based on the analysis you're interested in, historical_events may be a more keen option.

          • 2. Re: Tableau server workgroup db http_requests (_http_requests) table
            Russell Christopher

            Jeff's question is probably the most important thing, but I'll attempt to add some color and address your "wonderings":

             

            #1 First you login to Tableau (which gives you a wg session id) and then you spin up a vizqlserver session to render the viz you want to see. The wg session id is associated with the vizql rendering-related activity (like bootstrapping and get_customized_views). Why? I dunno - that's just the way this table works. So you'll typically see this:

             

            a. User logs in (this activity no longer shows up in http_requests). WGSessionID is created and associated with a vizportal session

            b. User requests a view. The WGSession ID shows up and a new VizQL Session is created. Below, I'm asking to render the "Book1-NoTabs/1" dashboard:

             

            Screen Shot 2016-01-07 at 4.12.26 AM.png

             

            You can see the wgsession id show up for the first action, and also the ID for the vizsql session:

            Screen Shot 2016-01-07 at 4.13.03 AM.png

             

            You can also see your user id (5) for the first part of the action....After things get rolling, the session id and user id isn't recorded anymore. Why? Again, dunno - that's just the way it works. I'd guess because the vizql session KNOWS who it belongs to, so it's not necessary to record the same info over and over again. So the information IS there, just not there in every row. If you really had to have it, you could probably write some SQL simply ONLY returns rows with a non-null user id field, then take the associated vizql session id and join it BACK to http_requests. But the real question is "Why bother?"...which leads to #2:

             

            Question #2: The meaning of every action isn't documented anywhere as it generally isn't relevant for 99.5% of folks. That gets back to Jeff's question - what are you trying to do / why are you looking in this table to begin with. There generally will be ways to answer your questions without needing the granularly of knowledge you're struggling with.

             

            HTH a tiny bit...

            2 of 2 people found this helpful
            • 3. Re: Tableau server workgroup db http_requests (_http_requests) table
              lei.chen.0

              Hello Jefferey,

               

              Jeffrey Strauss wrote:

               

              what are you trying to analyze out of this table?  I have used it to measure reponse times and indeed it often does not have user_id and this is beyond our control.  However, based on the analysis you're interested in, historical_events may be a more keen option.

               

              First I'm curious about the communication between user and Tableau server

              And we use a reverse proxy for Tableau server, learining more will give me more hints for future trouble shooting.

               

              I'm also interested in user behavior analysis, and I'll explore historical_events for it.

               

              Regards.

              • 4. Re: Tableau server workgroup db http_requests (_http_requests) table
                Russell Christopher

                 

                First I'm curious about the communication between user and Tableau server

                And we use a reverse proxy for Tableau server, learining more will give me more hints for future trouble shooting.

                 

                You might like the httpd log file for this, then:

                 

                Server Log File Locations

                 

                httpd

                Apache logs. Look here for authentication entries. Each request in the Apache log will have a request ID associated with it. This request ID is used throughout the server logs and you can use it to associate log entries with a request.

                access.####-##-##.##-##-##log

                error.log

                startup.log

                Apache daemon\logs\httpd

                 

                It'll give you a better view of all the request traffic

                • 5. Re: Tableau server workgroup db http_requests (_http_requests) table
                  lei.chen.0

                  Hello Russell,

                   

                  Thanks a lot for your detailed description and log information

                   

                   

                  Regards.

                  • 6. Re: Tableau server workgroup db http_requests (_http_requests) table
                    Toni Juvani

                    Hi,

                     

                    Is it somehow possible to get the wgsession id when using trusted authentication for logging in? It seems like the http_requests table session_id column contains only nulls. I would like to fetch the session id in order to force logout from Tableau when the user logs out from the main application containing embedded Tableau views.

                     

                    Br,

                    Toni

                    • 7. Re: Tableau server workgroup db http_requests (_http_requests) table
                      Toni Juvani

                      Proposed solution:

                      1. User logs out of main application

                      2. Application queries Tableau system_users by the user name

                      3. Application queries Tableau users by the system user id

                      4. Application queries Tableau sessions by the user id

                      5. Application calls Tableau REST API to sign out sessions by the session id

                      • 8. Re: Tableau server workgroup db http_requests (_http_requests) table
                        Steve Wright

                        As a result of this issue we are missing the ability to report on the worst performing sessions & users.

                        Note the following query and its result:

                        SELECT count(*), count(session_id)

                        , avg(completed_at - created_at)

                        , avg(case when session_id is null then completed_at - created_at end)

                        , avg(case when session_id is not null then completed_at - created_at end)

                        , min(case when session_id is null then completed_at - created_at end)

                        , min(case when session_id is not null then completed_at - created_at end)

                        , max(case when session_id is null then completed_at - created_at end)

                        , max(case when session_id is not null then completed_at - created_at end)

                        FROM public._http_requests

                        where action = 'bootstrapSession'

                        20,637 bootstrapSession records

                        8,296  only this many of them had user_id & session_id

                        10 sec  avg response time

                        14 sec  avg response time when no session_id (range 0 sec to 1 hr)

                        4 sec  avg response time with session_id (range 1 sec to 31 sec)

                        • 9. Re: Tableau server workgroup db http_requests (_http_requests) table
                          Steve Wright

                          I’ve been looking through the _http_requests table and discovered that not all “bootstrapSession”s have a “show” in their vizql_session and some vizql_sessions values have multiple shows and bootstrapSessions. The good news is the user_id and session_id retain the same value for a given vizql_session value—you just have to be careful to use DISTINCT so you are not doubling the bootstrapSessions in a many-to-many join.  Some of the other non-bootstrapSession “actions” also provide useful info on total response time.