...
6. delete from reports.infinera_dna_outages where event_sub_type != 'ALARM';
Close the MySQL connect (type exit).
We now need to populate a table called reports.infinera_outage_ci. :
...
Once the batch program has completed, log into the reports database (Heidi-SQL) with the reportsUser user and run the following commands2 queries:
1:
update reports.infinera_outage_ci
set time_diff = (UNIX_TIMESTAMP(end_time) - UNIX_TIMESTAMP(start_time))
where end_time is not null;
2:
SELECT CONCAT('UPDATE reports.report_service_availability SET outage = \'',TIME_FORMAT(SEC_TO_TIME(sum(a.time_diff)),'%H:%i:%s'),'\', number_of_failures = ',count(*),' WHERE base_absid = ',b.circuit_absid,' AND year = ',year(a.start_time),' AND month = ',month(a.start_time),';') as 'SQL Commands'
...