ArcGIS server does not report any ServiceActiveInstances report usage

1079
2
10-25-2016 06:43 AM
PlinioSantos
New Contributor III

I'm writing scripts to collect usage data from ArcGIS Server in order to generate reports. I used this Esri suport page to develop such scripts.

For simplicity, suppose the following json as my REST data to create an usage report:

{
 "reportname": "my_debug_report",
 "since": "LAST_DAY",
 "queries": [{
 "metrics": ["RequestCount", "ServiceActiveInstances"],
 "resourceURIs": ["services/MOSAICO/MOSAICO_ORTOFOTO_OESTE_2010.ImageServer"]
 }]
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

I receive then the following data:

TimestampRequestCount of services/MOSAICO/MOSAICO_ORTOFOTO_OESTE_2010.ImageServerServiceActiveInstances of services/MOSAICO/MOSAICO_ORTOFOTO_OESTE_2010.ImageServer
147731760000015NO SUCH METRIC SUPPORTED: ServiceActiveInstances
147731940000019NO SUCH METRIC SUPPORTED: ServiceActiveInstances
14773212000000NODATA
14773230000000NODATA
14773248000000NODATA
14773266000000NODATA
14773284000000NODATA
147733020000042NO SUCH METRIC SUPPORTED: ServiceActiveInstances
14773320000000NODATA
147733380000036NO SUCH METRIC SUPPORTED: ServiceActiveInstances
14773356000000NODATA
14773374000000NODATA
14773392000000NODATA
147734100000032NO SUCH METRIC SUPPORTED: ServiceActiveInstances
14773428000000NODATA
14773446000000NODATA
14773464000000NODATA
14773482000000NODATA
14773500000000NODATA
14773518000000NODATA
14773536000000NODATA
14773554000000NODATA
14773572000000NODATA
14773590000000NODATA
14773608000000NODATA
14773626000000NODATA
14773644000000NODATA
14773662000000NODATA
14773680000000NODATA
14773698000000NODATA
14773716000000NODATA
14773734000000NODATA
14773752000000NODATA
14773770000000NODATA
14773788000000NODATA
14773806000000NODATA
14773824000000NODATA
14773842000000NODATA
14773860000000NODATA
14773878000000NODATA
14773896000000NODATA
14773914000000NODATA
14773932000000NODATA
14773950000000NODATA
14773968000000NODATA
14773986000000NODATA
14774004000000NODATA
14774022000000NODATA

----

Updates from 2016/10/26

Using the server manager, I could generate the following report:

Despite of the Portuguese stuff, this report is from the same service witch I requested the json at the beginning of this post. In order to learn more about how the web manager do its job, I sniffed the network to capture the json request that generated this manage report and for my surprise I got this json:

{
 "reportname": 1477487802255,
 "since": "LAST_DAY",
 "queries": [{
 "resourceURIs": ["services/SISGEOPOLIS/LinhaTrecho23.MapServer"],
 "metrics": ["ServiceRunningInstancesMax"]
 }],
 "metadata": {
 "temp": true,
 "tempTimer": 1477488074129
 }
}‍‍‍‍‍‍‍‍‍‍‍‍

A strange thing here. Please take attention to the metrics array: I don't even know about the ServiceRunningInstancesMax. This official esri doc page was supposed to mention that but it does not.

Question 1: since there were service usage, why is ServiceActiveInstances not supported ?

Question 2: Where can I find an up to date documentation about admin usage reports which mentions all metrics, including ServiceRunningInstancesMax ?

0 Kudos
2 Replies
nicogis
MVP Frequent Contributor

The documentation  seems wrong. The metrics is 'ServiceRunningInstancesMax' and not

'ServiceActiveInstances'

The help link is http://resources.arcgis.com/en/help/arcgis-rest-api/02r3/02r30000027n000000.htm

I noticed another problem: if there is only this metric the result is correct, but if it is with other metrics the result of ServiceRunningInstancesMax is incorrect

I have made a console (c#) that you can schedulate that create excel file from usagereport https://github.com/nicogis/UsageReports/releases

PlinioSantos
New Contributor III

In my opinion is unacceptable an official help page contains wrong information. And even more unacceptable the ServiceRunningInstancesMax metric result only be correct when collected alone. I have a bunch of reporting scripts that rely in those statistics and I'm astonished to know that it is incorrect. Thant you for point out that.

PS: In fact I noticed that some usage reports of ServiceRunningInstancesMax where returning 2147483647 but so far I was discarding them without look into the other values.