HOW TO
To monitor and archive the ArcGIS Data Store health and status, it may be beneficial to automate running an ArcGIS Data Store command utility, like describedatastore, and save the output to log files.
This can be done by following the steps below:
import os
from datetime import datetime
time = datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
DescribeDataStoreBatFile = r"C:\Program Files\ArcGIS\DataStore\tools\describedatastore.bat"
OutputResultsFolder = r"C:\DescribeDataStoreResults"
DescribeDataStore = os.popen(DescribeDataStoreBatFile)
DescriptionOutput = DescribeDataStore.read()
DescribeDataStore.close()
OutputFile = open(os.path.join(OutputResultsFolder,f"Output{time}.log"),"w+")
OutputFile.write(DescriptionOutput)
OutputFile.close()
Note: If you have any issues with permissions, or if the script creates empty files, please consult your IT department before doing the following steps.
Get help from ArcGIS experts
Download the Esri Support App