For programmatic access to Access Gateway statistics, you require to enable the global advanced option NAGStatsClientIPWhitelist. This option takes a list of IP addresses of servers that can access Access Gateway statistics.
To access the statistics, run the HTTP GET command on the resource: https://<mag-host-name>/mag-stats.
NOTE:Frequent requests to get the statistics impact the system’ performance. It is recommended to keep a five minutes interval between every probe for the statistics.
To enable this option:
Click Devices > Access Gateway Servers > Edit > Advanced Options.
Add this line: NAGStatsClientIPWhitelist <ip1> <ip2>.
Replace <ip1> and <ip2> with the IP addresses of the servers from which you want to access the statistics.
Click OK.
This request displays the following:
Https related statistics
Requests received
Active requests
Server related statistics
Product start time
Product up time
Product CPU utilization
Disk swap (KB)
Disk swap used (KB)
Memory total (KB)
Cache statistics
Cache stats (KB)
Cache stats utilization percentage
Cache hit ratio since last reset
Cache stats object count
NOTE:Cache statistics are 0 because they are not implemented currently in the server side.
Summary Statistics Byte
Total bytes sent to the origin server
Total bytes read from the web server
Total bytes sent to the browsers
Total bytes received from the browsers
Bytes per sec read from the web server
Bytes per sec sent to the browsers
Summary Statistics Benefits
Total bytes saved
Total bytes saved per second
Example output:
<?xml version="1.0" encoding="UTF-8"?><MAGStatistics><httpStats> <NamedValues> <NamedValue name="RequestsReceived" value="0" /> <NamedValue name="ActiveRequests" value="1" /> </NamedValues></httpStats><boxStats> <NamedValues> <NamedValue name="ProductStartTime" value="Fri, 27 Jul 2012 11:01:11 GMT"/> <NamedValue name="ProductUpTime" value="0:0:0:26" /> <NamedValue name="ProductCPUUtilization" value="-294" /> <NamedValue name="DiskSwapKb" value="4088532" /> <NamedValue name="DiskSwapUsedKb" value="0" /> <NamedValue name="MemoryTotalKb" value="7835" /> </NamedValues></boxStats><cacheStats> <NamedValues> <NamedValue name="cacheStatsKb" value="0" /> <NamedValue name="cacheStatsUtilPercentage" value="0" /> <NamedValue name="cacheHitRatioSinceReset" value="0" /> <NamedValue name="cacheStatsObjectCount" value="0" /> </NamedValues></cacheStats<summaryStatsByte> <NamedValues> <NamedValue name="TotalBytesSentToOriginServer" value="0" /> <NamedValue name="TotalBytesReadFromWS" value="0" /> <NamedValue name="TotalBytesSentToBrowsers" value="0" /> <NamedValue name="TotalBytesReceivedFromBrowsers" value="0" /> <NamedValue name="BytesPsecReadFromWS" value="0" /> <NamedValue name="BytesPsecSentToBrowsers" value="0" /> </NamedValues></summaryStatsByte><summaryStatsBenefits> <NamedValues> <NamedValue name="TotalBytesSaved" value="0" /> <NamedValue name="TotalBytesSavedPerSecond" value="0" /> </NamedValues></summaryStatsBenefits><summaryStatsRequests> <NamedValues> <NamedValue name="TotalRequestsPSecBrowsers" value="0" /> <NamedValue name="PeakTotalRequestsPSecBrowsers" value="1" /> <NamedValue name="TotalRequestsPSecOriginServer" value="0" /> <NamedValue name="PeakTotalRequestsPSecOriginServer" value="0" /> <NamedValue name="CurrentTotalRequestsToOriginServer" value="0" /> <NamedValue name="CurrentTotalRequestsReceivedFromBrowser" value="1" /> <NamedValue name="FailedRequestsToWS" value="0" /> <NamedValue name="CumulativeRequestsToWS" value="0" /> </NamedValues></summaryStatsRequests><summaryStatsConnections> <NamedValues> <NamedValue name="CurrentConnectionsBrowser" value="10" /> <NamedValue name="CurrentConnectionsBackend" value="0" /> <NamedValue name="TotalConnectionsBrowser" value="28" /> <NamedValue name="TotalConnectionsBackend" value="0" /> <NamedValue name="PeakConnectionsBrowser" value="6" /> <NamedValue name="PeakConnectionsBackend" value="0" /> <NamedValue name="FailedConnectionsBackend" value="0" /> </NamedValues></summaryStatsConnections></MAGStatistics>