...
** There is a table within the reports database called SPLUNK_LINK, this links the IP Address of the results to the Circuit Name within OpsDB. This table could get out of date as Operations add more circuits.
Run the following SQL command in the reports database on test-msr.geant.net:
select concat('UPDATE report_service_availability SET outage="',SPLUNK_DATA.outage_time,'", number_of_failures=',SPLUNK_DATA.no_of_failures,', avail=',SPLUNK_DATA.availability,' WHERE base_absid=',opsdb_circuit.circuit_absid,' AND year=',SPLUNK_DATA.year,' AND month=',SPLUNK_DATA.month,';')
FROM SPLUNK_DATA LEFT JOIN SPLUNK_LINK ON (SPLUNK_LINK.ip_address = SPLUNK_DATA.ip_address)
LEFT JOIN opsdb_circuit ON (opsdb_circuit.name = SPLUNK_LINK.circuit_name)
where SPLUNK_DATA.year = 2017
and SPLUNK_DATA.month = 6
and opsdb_circuit.circuit_usage = 'Access'
and opsdb_circuit.status = 'Operational';
** Pay attention to the year and month values in the SQL statement