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:
Timestamp | RequestCount of services/MOSAICO/MOSAICO_ORTOFOTO_OESTE_2010.ImageServer | ServiceActiveInstances of services/MOSAICO/MOSAICO_ORTOFOTO_OESTE_2010.ImageServer |
1477317600000 | 15 | NO SUCH METRIC SUPPORTED: ServiceActiveInstances |
1477319400000 | 19 | NO SUCH METRIC SUPPORTED: ServiceActiveInstances |
1477321200000 | 0 | NODATA |
1477323000000 | 0 | NODATA |
1477324800000 | 0 | NODATA |
1477326600000 | 0 | NODATA |
1477328400000 | 0 | NODATA |
1477330200000 | 42 | NO SUCH METRIC SUPPORTED: ServiceActiveInstances |
1477332000000 | 0 | NODATA |
1477333800000 | 36 | NO SUCH METRIC SUPPORTED: ServiceActiveInstances |
1477335600000 | 0 | NODATA |
1477337400000 | 0 | NODATA |
1477339200000 | 0 | NODATA |
1477341000000 | 32 | NO SUCH METRIC SUPPORTED: ServiceActiveInstances |
1477342800000 | 0 | NODATA |
1477344600000 | 0 | NODATA |
1477346400000 | 0 | NODATA |
1477348200000 | 0 | NODATA |
1477350000000 | 0 | NODATA |
1477351800000 | 0 | NODATA |
1477353600000 | 0 | NODATA |
1477355400000 | 0 | NODATA |
1477357200000 | 0 | NODATA |
1477359000000 | 0 | NODATA |
1477360800000 | 0 | NODATA |
1477362600000 | 0 | NODATA |
1477364400000 | 0 | NODATA |
1477366200000 | 0 | NODATA |
1477368000000 | 0 | NODATA |
1477369800000 | 0 | NODATA |
1477371600000 | 0 | NODATA |
1477373400000 | 0 | NODATA |
1477375200000 | 0 | NODATA |
1477377000000 | 0 | NODATA |
1477378800000 | 0 | NODATA |
1477380600000 | 0 | NODATA |
1477382400000 | 0 | NODATA |
1477384200000 | 0 | NODATA |
1477386000000 | 0 | NODATA |
1477387800000 | 0 | NODATA |
1477389600000 | 0 | NODATA |
1477391400000 | 0 | NODATA |
1477393200000 | 0 | NODATA |
1477395000000 | 0 | NODATA |
1477396800000 | 0 | NODATA |
1477398600000 | 0 | NODATA |
1477400400000 | 0 | NODATA |
1477402200000 | 0 | NODATA |
----
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 ?
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
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.