Hello,
I'm trying to do two things with Excel Reports - the first is run a report with all of the report types included that are shown in the sample config file:
"types":["host", "storage","arcgis_portal", "arcgis_server", "service", "database" ]
and the second thing is create a report where the 'past_days' property is greater than 1.
1. When I run a one-day report containing the 'database' report type I get the following error:
2023-08-04 11:14:38.135867 service,Requests Received,svcReqReceived
2023-08-04 11:14:55.606575 service,Requests Timed Out,svcReqTimedOut
2023-08-04 11:15:03.372986 database
'database'
Traceback (most recent call last):
File "ExcelReport.py", line 11, in main
File "modules\report_builder.py", line 24, in __init__
File "modules\Wkb\wkb_builder.py", line 26, in __init__
File "modules\Wkb\wkb_builder.py", line 99, in _add_component_wks
File "modules\Wks_data\wks_database_specs.py", line 5, in __init__
File "modules\Wks_data\wks_database_specs.py", line 26, in _get_data
KeyError: 'database'
None
Traceback (most recent call last):
File "ExcelReport.py", line 11, in main
File "modules\report_builder.py", line 24, in __init__
File "modules\Wkb\wkb_builder.py", line 26, in __init__
File "modules\Wkb\wkb_builder.py", line 99, in _add_component_wks
File "modules\Wks_data\wks_database_specs.py", line 5, in __init__
File "modules\Wks_data\wks_database_specs.py", line 26, in _get_data
KeyError: 'database'
If I leave out the 'database' report type it completes successfully. I have a database component registered in Monitor which has been generating information for over a month. I did notice that there are no alerts configured for the database item, but I have 'alerting_on_only' set to false. I tried to enable an alert and run it again just in case but got the same result.
2. When I change 'past_days' to 2 or more (while still omitting the 'database' report type) I get the following error:
2023-08-04 11:45:21.551494 service
2023-08-04 11:45:27.713157 service,Instances Saturation Percent,svcInstSat
2023-08-04 11:47:10.823713 service,Instances Used Avg,svcInstancesUsedAvg
2023-08-04 11:48:53.793066 service,Request Rate,svcRequestRate
'features'
Traceback (most recent call last):
File "ExcelReport.py", line 11, in main
File "modules\report_builder.py", line 24, in __init__
File "modules\Wkb\wkb_builder.py", line 36, in __init__
File "modules\AGM_API\collection.py", line 154, in metric_stats_by_name
KeyError: 'features'
None
Traceback (most recent call last):
File "ExcelReport.py", line 11, in main
File "modules\report_builder.py", line 24, in __init__
File "modules\Wkb\wkb_builder.py", line 36, in __init__
File "modules\AGM_API\collection.py", line 154, in metric_stats_by_name
KeyError: 'features'
It's the same no matter what value I enter for 'past_days'.
Thanks for any assistance you can provide.
Chris
Solved! Go to Solution.
@IrisHadarStltd , @ChrisTaylor2 , I think I understand what's going on in your cases. It appears that queries are timing out. One explanation is that your environment is undersized or you execute the report from a remote machine with poor network. Please check 1. CPU on ArcGIS Monitor machine, 2. PostgreSQL running (if remote) and 3. the machine where you execute the ExcelReport. Note, you both have very long responses, e.g.
8 min sec Chris
2023-08-04 11:14:55.606575 service,Requests Timed Out,svcReqTimedOut
2023-08-04 11:15:03.372986 database
12 min Iris
08/08/2023 08:32:49 AM INFO: host,Process Instances,hostProcessInstances
08/08/2023 08:44:56 AM INFO: host,Process Memory,hostProcessMemory
This also explains token expired error. In any case, I have implemented these error check in 20230808.1 and the report should complete for longer days. But I suspect there will be gaps in the report for the queries that time out in the current environment.
hi,
Try to use this version "arcgis-monitor-excel-report-20230714.1" for it working for me , generating the report up to 3 days .
@IrisHadarStltd , Thanks for making this recommendation, which should fix a 3 day report issue. But I suspect there might be an additional issue: database component was added without database name. I provided this extra check in the latest. FYI, I keep track of all the fixes in changelog.md file.
@ChrisTaylor2 , just uploaded a fix, v20230807.2. Please download the latest from https://prof-services.maps.arcgis.com/home/item.html?id=248e22510a454e9c906204d3ad45adca and let me know if the issues is resolved.
Hi @AndrewSakowicz and @IrisHadarStltd , and thank you both for your help.
Andrew, I downloaded the latest version and definitely made progress - the report now successfully completes when I include the 'databases' type, and when I increase 'past_days' to 2. However, when I tried 'past_days' = 3 I got the following error:
2023-08-08 08:49:12.287486 arcgis_portal,Users - viewer,prtlUsersviewer
2023-08-08 08:49:19.279619 arcgis_server
Error getting metrics for type arcgis_server
'NoneType' object is not subscriptable
Traceback (most recent call last):
File "ExcelReport.py", line 14, in main
File "modules\report_builder.py", line 24, in __init__
File "modules\Wkb\wkb_builder.py", line 30, in __init__
File "modules\User_Input\user_inputs.py", line 54, in type_metrics
TypeError: 'NoneType' object is not subscriptable
None
Traceback (most recent call last):
File "ExcelReport.py", line 14, in main
File "modules\report_builder.py", line 24, in __init__
File "modules\Wkb\wkb_builder.py", line 30, in __init__
File "modules\User_Input\user_inputs.py", line 54, in type_metrics
TypeError: 'NoneType' object is not subscriptable
Thanks again for your help - it's an incredibly useful tool.
Chris
hi Andrew ,
I got the same results , i have sent you the log file.
iris
@IrisHadarStltd , @ChrisTaylor2 , I think I understand what's going on in your cases. It appears that queries are timing out. One explanation is that your environment is undersized or you execute the report from a remote machine with poor network. Please check 1. CPU on ArcGIS Monitor machine, 2. PostgreSQL running (if remote) and 3. the machine where you execute the ExcelReport. Note, you both have very long responses, e.g.
8 min sec Chris
2023-08-04 11:14:55.606575 service,Requests Timed Out,svcReqTimedOut
2023-08-04 11:15:03.372986 database
12 min Iris
08/08/2023 08:32:49 AM INFO: host,Process Instances,hostProcessInstances
08/08/2023 08:44:56 AM INFO: host,Process Memory,hostProcessMemory
This also explains token expired error. In any case, I have implemented these error check in 20230808.1 and the report should complete for longer days. But I suspect there will be gaps in the report for the queries that time out in the current environment.
@AndrewSakowicz, it looks to me like the example you're showing above for my run is reflective of 8 seconds rather than 8 minutes, but I understand what you're getting at. I can confirm that the latest version of the tool (20230808.1) has allowed me to run my 3-day report successfully. I will keep your other recommendations in mind if I try to push the envelope to run reports with even longer time frames.
Thanks once again for all of your help!
@ChrisTaylor2 , @IrisHadarStltd , FYI, the latest version v20230825.1 includes significant performance improvements and time outs checking, e.g. related to large size arcgis server logs.
Wonderful, thank you @AndrewSakowicz!
Chris