imperva / incapsula-logs-downloader

A Python script for downloading log files from Incapsula
MIT License
30 stars 35 forks source link

Invalid Syntax Error LogsDownload.py line 217 #72

Closed mgovolt closed 4 months ago

mgovolt commented 7 months ago

I am testing the 3.x version for the first time. When I try to run the script the first time I get

2023-12-10 14:46:50,339 process_thread INFO Downloading logs index file... 2023-12-10 14:46:50,460 process_thread WARNING Could not find file https://logs1.incapsula.com/977_111111/logs.index. Response code is 404 2023-12-10 14:46:50,460 process_thread ERROR Failed to downloading index file and starting to download all the log files in it - Index file does not yet exist, please allow time for files to be generated., Traceback (most recent call last): File "/home/tladmin/incapsula-logs-downloader/script/LogsDownloader.py", line 134, in get_index_file self.logs_file_index.download() File "/home/tladmin/incapsula-logs-downloader/script/LogsFileIndex.py", line 49, in download raise Exception('Index file does not yet exist, please allow time for files to be generated.') Exception: Index file does not yet exist, please allow time for files to be generated.

I feel like this should be easy and I've tried creating this file, but I am missing something. Any ideas?

joeymoore commented 7 months ago

@mgovolt the very first thing the script does is download the "logs.index" which is created by the cloud system, you can try to access this log with your browser and the same basic auth creds you have in the settings file. If this file does not exist, this is the logging configuration on your account.