How to export alarms from nas to a file using a script