cancel
Showing results for 
Search instead for 
Did you mean: 

REST API partially unavailable?

abochmann
New Contributor

REST API partially unavailable?

I've been using the PSA REST API to poll the active-users set (/api/v1/system/active-users) every 15 minutes on a vPSA running 9.1R4 for about a week now.

 

Yesterday, the API call stopped returning any results. When I access the URL via curl, the call just hangs indefinitely. I can still request an API key from /api/v1/auth though?

 

I have seen KB44420, but polling the API every 15 minutes is not exactly "in a loop continuously"...

 

Is there any way to debug this? API calls don't seem to be visible anywhere in the logs or tools available on the admin interface.

7 REPLIES 7
r@yElr3y
Moderator

Re: REST API partially unavailable?

@abochmann I think they're explaining loop as executing the same API request over and over again. Nevertheless, you can use the health check options to get the USER COUNTS without running into this issue.

 

Configuring health check options - GET using the query status=all, https://<VPN>/dana-na/healthcheck/healthcheck.cgi?status=all

Health check details:

CPU-UTILIZATION=X;
SWAP-UTILIZATION=X;
DISK-UTILIZATION=X;
SSL-CONNECTION-COUNT=X;
PLATFORM-LIMIT=X;
MAXIMUM-LICENSED-USER-COUNT=X;
USER-COUNT=X;
MAX-LICENSED-USERS-REACHED=NO;
CLUSTER-NAME=;
VPN-TUNNEL-COUNT=0;

PCS Expert
Pulse Connect Secure Certified Expert
abochmann
New Contributor

Re: REST API partially unavailable?

Hello Ray -

 

thanks for your reply. We're already retrieving the total user count via SNMP (and there's also the hourly STS20641 log event that shows the number of sessions on the device).

We now want to know the number of active users per realm in order to map groups of concurrent users to accounts. That's pretty easy to do from the active-users API response and some minor query logic in Splunk. I haven't found any other way to get at that kind of detailed information from the PSA though.

 

 

r@yElr3y
Moderator

Re: REST API partially unavailable?

Right..I don't think there's an easy way to get per-realm user count from the PSA, unfortunately Smiley Sad

PCS Expert
Pulse Connect Secure Certified Expert

Re: REST API partially unavailable?

An upgrade broke an API script where I was pulling a report of active users (/api/v1/system/active-users), an inspection of the session headers revealed that the PSA is not properly padding the base64 encoded authorization string. I'm manually manipulating the string now to include the proper characters and it works again. I would recommend analyzing your headers with Fiddler or something to see if this is your issue as well.

 

I've filed a bug report but so far they claim that this is only happening to me, please let me know if this fixes your issue and I will include in the bug.

Re: REST API partially unavailable?

An upgrade broke an API script where I was pulling a report of active users (/api/v1/system/active-users), an inspection of the session headers revealed that the PSA is not properly padding the base64 encoded authorization string. I'm manually manipulating the string now to include the proper characters and it works again. I would recommend analyzing your headers with Fiddler or something to see if this is your issue as well.

 

I've filed a bug report but so far they claim that this is only happening to me, please let me know if this fixes your issue and I will include in the bug.

zanyterp
Moderator

Re: REST API partially unavailable?

no, there is no way to debug this through the logs. if you have not already done so, i would recommend opening a case when the system is in this state so we can open a case with the development team
zanyterp
Moderator

Re: REST API partially unavailable?

yes, there is no way to collect per-realm data from the appliance
i would recommend putting in an enhancement request