Using ArcGIS Dashboards to Monitor Scheduled Python Geoprocessing Scripts
Presentation Time: Fri, 05/06/2022 - 14:00
Keywords: ArcGIS Dashboard, Arcpy Module, Pima County ITD-GIS, Python Geoprocessing, Monitoring Scheduled Python Jobs
There is a need in Pima County’s Information Technology Department, Geographic Information Systems Division for visualizing the status of GIS scheduled Python jobs that run on various servers throughout the day and night. Most scheduled job owners get notified if there is a problem with the script. However, end users of the data may not necessarily be notified that the data they are viewing did not update. This leads to the end users being perplexed on why their edits made the day before are not visible. The solution was to create a Python module called PC_Monitor that the script owner imports into the beginning of an existing or new script that is executed at the end of the script in either its own try, except statement or at the end of a finally statement. Parameters need to be passed into one of the module’s functions to successfully update the database table. The database table is then used for visualizing the status of the script using ArcGIS Dashboards widgets. The module captures various information programmatically using user inputs. Most importantly, the module captures and records the status of the script (Success, Finished with Warnings, or Failed) and the first 255 characters of the status message for Finished with Warnings and Failed. The module has been successful in various test situations on multiple servers. The PC_Monitor module alongside the ArcGIS Dashboard will help our organization’s GIS users to visually monitor the status of Python scripts, keep track of Python scripts, and the effect those scripts have on data sets.