[sf1] Replace the insertion for CSI records
Add a script to import the CSI Nagios record from this view : CsiAlarmsImport into the table csi_nagios_history
monitor_id is the key of the issue
- Create an entity related to the table csi_nagios_history
- There is no record with the same monitor_id
Insert a new record :
- update_at = created_at = now ()
- start_date=end_date
- ops_flags=flags=0
- A record with the same monitor_id exists
- If details and summary have not changed => update the field updated_at
- If details or summary have changed => insert a new record and update the end_date of the previous record with the new start_date