×
Back to Opsview FAQ
Exporting Notifications From Datastore
Problem Copied
When exporting notifications, doing it in UI only returns a maximum full month worth of data. This may due to defined retention period and housekeeping of data.
Solution Copied
Notifications are stored from the datastore, thus, it can be exported when a large amount of data is needed. To do this, install the script notifications_export and run from the host.
## ./notifications_export --help
usage: notifications_export.py [-h] [-v] [-g HOSTGROUP] [-d DAYS] [-s START_DATE] [-e END_DATE] [-p PAGE_SIZE]
Export notifications log.
optional arguments:
-h, --help show this help message and exit
-v, --verbose Display verbose information.
-g HOSTGROUP, --hostgroup HOSTGROUP
Limit to the specified Hostgroup.
-d DAYS, --days DAYS Limit to the last N days (default: 7).
-s START_DATE, --start_date START_DATE
Start date for the export (YYYY/MM/DD)
-e END_DATE, --end_date END_DATE
End date for the export (YYYY/MM/DD)
-p PAGE_SIZE, --page_size PAGE_SIZE
Page size to fetch
Example
- export all notifications from August 8, 2023 to Decemeber 31, 2023 and save to a csv file.
## ./notification_export -s 2023/08/01 -e 2023/12/31
Related downloads Copied
["Geneos"]
["FAQ"]