I was doing nagios log cleanup by moving logs to an 'old' subdirectory in /var/log/nagios/archives and then filtering out bloat and moving the results back to /var/log/nagios/archives. I never removed the subdirectory and discovered this bug.
To reproduce:
Create a subdirectory in your logs directory, such as /var/log/nagios/archives/old
Select 'Log' under 'Reports'
This should result in the following error:
IOError: [Errno 21] Is a directory: '/var/log/nagios/archives/old'
A simple fix could be to have the code skip directories. Although I know I need to just remove the subdirectory and possibly do such cleanup somewhere else to avoid this situation. I just wanted to report this so Adagios can handle this situation more gracefully.
I was doing nagios log cleanup by moving logs to an 'old' subdirectory in /var/log/nagios/archives and then filtering out bloat and moving the results back to /var/log/nagios/archives. I never removed the subdirectory and discovered this bug.
To reproduce:
This should result in the following error:
A simple fix could be to have the code skip directories. Although I know I need to just remove the subdirectory and possibly do such cleanup somewhere else to avoid this situation. I just wanted to report this so Adagios can handle this situation more gracefully.