Idea ID: 2877328

GWWeb monitoring. Who is on a given instance right now?

Status: Waiting for Votes

Purpose: to make sure we don't reboot that box when the Boss and/or other VIPs are on-line and actively using it.
 
  ReStarts of containers and their hosts happen.  In those big shop instances they have multiple, it would be great if there were a way to migrate users to another instance. But in the many shops that have just the one instance and don't want to bite the hand that feeds us.

Being able to alert active users directly that it has to come down for maintenance or a broader shut down (power, move, etc..) would also be a nice thing.
 

Pokey work around:  
  On the POA web console Status page,
     click on SOAP Sessions,
          Ctl-F and enter "Groupwise Web " or the IP of your GWWeb client Container instance to be able to find
              that search bar will show how many instances, but you have go look at each one independently.
                  Now, if someone were to put together a tool to scrape this page's content and render it into a .csv or the like, there'd be some happy people. 

________________________

Andy of KonecnyConsulting.ca in Toronto
Please use the "Like" and/or "Verified Answers" as appropriate as that helps us all.

Tags:

  • Because of my tight focus a month ago, I missed the very related Idea: GW-WEB Admin Console
    And now that we have some nice partial workarounds here, it's a bit harder to fold them together.  So please vote (that little up arrow next to the title) for both if you see this need.

    ________________________

    Andy of KonecnyConsulting.ca in Toronto
    Please use the "Like" and/or "Verified Answers" as appropriate as that helps us all.

  • Thank you   This helps in so many ways.
    Kludgy as a work around that isn't suitable for everyone, So this Idea still needed,  but oh so suitable for a number of things.
    I knew someone with suitable scripting chops could do it if pointed at it. I knew the logic, just not that great at the actual coding.

    ________________________

    Andy of KonecnyConsulting.ca in Toronto
    Please use the "Like" and/or "Verified Answers" as appropriate as that helps us all.

  • Here you go,

    This script will scrape the soap connections and output a CSV file:

    #!/bin/bash
    
    #POA HTTP address
    POA_HTTP_ADDR=
    
    #POA HTTP Port
    POA_HTTP_PORT=
    
    #User ID to connect with
    USER=
    
    #User ID Password
    USER_PWD=
    
    #POA Web Console URL
    URL="https://$POA_HTTP_ADDR:$POA_HTTP_PORT/dsoaps"
    
    TMP_FILE="/tmp/gwsoap_conns_$(date +%Y-%m-%d-%H.%M.%S).txt"
    CSV_FILE="/tmp/gwsoap_conns_$(date +%Y-%m-%d-%H.%M.%S).csv"
    
    CSV_HEADER="GroupWise User ID,Directory Login Name,User IP Address,Login Time,Last Activity Time,Access Mode,User Agent"
    
    echo "$CSV_HEADER" > $CSV_FILE
    
    #get soap connections page and save to tmp file
    curl -s -k $URL -u $USER:$USER_PWD > $TMP_FILE
    
    #loop through the lines looking for the lines matching GroupWise User
    while read -r line; do
        result=`echo "$line" |grep -c -i "GroupWise User"`
        if [[ $result -eq 1 ]]; then
            GWUSERID=`echo $line |awk -F'</TD>' '{print $2}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
            DLN=`echo $line |awk -F'</TD>' '{print $4}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
            IPADDR=`echo $line |awk -F'</TD>' '{print $6}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
            LOGINTIME=`echo $line |awk -F'</TD>' '{print $8}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
            LASTACTIV=`echo $line |awk -F'</TD>' '{print $10}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
            ACCMODE=`echo $line |awk -F'</TD>' '{print $12}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
            USERAGENT=`echo $line |awk -F'</TD>' '{print $14}' |grep -o -P '(?<=\-1\>).*(?=\<\/FONT\>)'`
    
            echo "$GWUSERID,$DLN,$IPADDR,$LOGINTIME,$LASTACTIV,$ACCMODE,$USERAGENT" >> $CSV_FILE
        fi
    done < $TMP_FILE
    
    rm -f $TMP_FILE
    echo "Output File: $CSV_FILE"
    

    Screenshot of Soap Connections:

    Output File:

    GroupWise User ID,Directory Login Name,User IP Address,Login Time,Last Activity Time,Access Mode,User Agent
    manoj,,192.168.24.14,11/13/2023 18:39:09,11/14/2023 11:36:48,SOAP,GroupWise Web (18.4.1-140520)
    kate,,192.168.24.14,11/13/2023 18:43:06,11/14/2023 11:36:27,SOAP,GroupWise Web (18.4.1-140520)