本文简要介绍 python 语言中 arcgis.gis.server.ReportManager.quick_report
的用法。
用法:
quick_report(since='LAST_WEEK', queries='services/', metrics='RequestsFailed')
返回:
成功查询的 Python 数据字典。
为服务、服务或文件夹生成动态使用情况报告。
Parameter
Description
since
可选字符串。报告的持续时间。支持的值为:LAST_DAY、LAST_WEEK、LAST_MONTH 或 LAST_YEAR。
LAST_DAY
表示跨越前 24 小时的时间范围。这是默认值。LAST_WEEK
表示跨越前 7 天的时间范围。LAST_MONTH
表示跨越前 30 天的时间范围。LAST_YEAR
表示跨越前 365 天的时间范围。
queries
必需的字符串。要为其生成报告的资源URI 字符串。指定为要为其收集指标的服务或文件夹的逗号分隔字符串。
services/
- Entire Siteservices/Folder/
- Folder within a Site. Reports metrics aggregated across all services within that Folder and Sub-Folders.services/Folder/ServiceName.ServiceType
- Service in a specified folder, for example:services/Folder_Name/Map_bv_999.MapServer
services/Fodler_Name/ServiceName.ServiceType
root folder
- Service in the root folderMap_bv_999.MapServer.
queries="services/Hydroligic_Data/Lake_algae.FeatureServer,services/Mountains"
metrics
可选字符串。要报告的指标的逗号分隔列表。
支持的指标是:
RequestCount - the number of requests received
RequestsFailed - the number of requests that failed
RequestsTimedOut - the number of requests that timed out
RequestMaxResponseTime - the maximum response time
RequestAvgResponseTime - the average response time
ServiceActiveInstances - the maximum number of active (running) service instances sampled at 1 minute intervals, for a specified service
metrics="RequestCount,RequestsFailed"
例子:
# Usage Example: >>> gis = GIS(profile="my_own_portal", verify_cert=False) >>> gis_servers = gis.admin.servers.list() >>> srv = gis_servers[0] >>> query_string = "services/Forests/Forests_degraded_2000.MapServer,services/Lakes/Lakes_drought_levels.MapServer" >>> qk_report = srv.usage.quick_report(since = "LAST_MONTH", queries = query_string, metrics = "RequestCount,RequestsFailed") >>> qk_report {'report': {'reportname': '1fa828eb31664485ae5c25c76c86e28d', 'metadata': '{"temp":true,"title":"1fa828eb31664485ae5c25c76c86e28d","managerReport":false}', 'time-slices': [1598914800000, 1599001200000, 1599087600000, ... 1601420400000], 'report-data': [[{'resourceURI': 'services/Forests/Forests_degraded_2000.MapServer', 'metric-type': 'RequestCount', 'data': [None, 17, 928, ... 20]}, {'resourceURI': 'services/Forests/Forests_degraded_2000.MapServer', 'metric-type': 'RequestsFailed', 'data': [None, 225, None, ... 0]}, {'resourceURI': 'services/Lakes/Lakes_drought_levels.MapServer', 'metric-type': 'RequestCount', 'data': [0, 0, 7, ... 71]}, {'resourceURI': 'services/Lakes/Lakes_drought_levels.MapServer', 'metric-type': 'RequestsFailed', 'data': [None, None, 1 ... , 0]}]]}}
相关用法
- Python ArcGIS ReportManager.create用法及代码示例
- Python ArcGIS Report.query用法及代码示例
- Python ArcGIS ResourceManager.get用法及代码示例
- Python ArcGIS ResourceManager.add用法及代码示例
- Python ArcGIS RealTimeAnalyticsManager.get用法及代码示例
- Python ArcGIS RealTimeAnalytics.status用法及代码示例
- Python ArcGIS RealTimeAnalytics.metrics用法及代码示例
- Python ArcGIS RealTimeAnalytics.start用法及代码示例
- Python ArcGIS ResourceManager.update用法及代码示例
- Python ArcGIS RealTimeAnalyticsManager.items用法及代码示例
- Python ArcGIS ResourceManager.remove用法及代码示例
- Python ArcGIS ResourceManager.export用法及代码示例
- Python ArcGIS RealTimeAnalytics.delete用法及代码示例
- Python ArcGIS RealTimeAnalytics.stop用法及代码示例
- Python ArcGIS RunInterval用法及代码示例
- Python ArcGIS Raster.remove_variables用法及代码示例
- Python ArcGIS Raster.export_image用法及代码示例
- Python ArcGIS Raster.get_dimension_values用法及代码示例
- Python ArcGIS Raster.get_dimension_attributes用法及代码示例
- Python ArcGIS Raster.read用法及代码示例
- Python ArcGIS Raster.append_slices用法及代码示例
- Python ArcGIS Raster.summarize用法及代码示例
- Python ArcGIS RoleManager用法及代码示例
- Python ArcGIS RasterManager.add用法及代码示例
- Python ArcGIS Raster.get_variable_attributes用法及代码示例
注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 arcgis.gis.server.ReportManager.quick_report。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。