In the dashboard-networkdb-repopulator/src/main/java/net/dante/dashboard/population/messaging/Consumer.java the Consumer picks up a message from the ESB
public synchronized void receiveRepopulateRequest(ActiveMQMessage message) throws ExecutionException, InterruptedException {
LOG.info("Received request to repopulate network map DB....");
try {
attemptNetworkMapDatabaseRepopulation();
updateNotifications();
producer.notifyCorrelatorMapRepopulated();
} catch (Exception exception) {
handleExceptionAtHighLevel(exception);
} finally {
producer.sendNotificationsReload();
}
}
The Producer sends a message to the networkMapReloadQueue and the notificationsReloadQueue
Within the attemptNetworkMapDatabaseRepopulation function, the following functions are called:
tarUnpacker.execute();
opsDbImporter.importDump();
populator.repopulate();
routerQueryRepopulator.executeRouterQueries();
routerQueryRepopulator.executeRouterQueries()
This fires off a series of Bash shell and php scripts stored in the /home/local/GEANT/dante.sanigar/scripts directory.
final String[] scriptCommands = new String[] {"cd " + scriptDirectory + " && ./update_routers_table.php > /var/log/nms-dashboard/router_details.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_details_table.php >> /var/log/nms-dashboard/router_details.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-v4-peers-on-router.sh > /var/log/nms-dashboard/ix_public_peers.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-v6-peers-on-router.sh >> /var/log/nms-dashboard/ix_public_peers.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_ix_public_peer_table.php >> /var/log/nms-dashboard/ix_public_peers.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-gopen-peers-on-router.sh > /var/log/nms-dashboard/gopen_peers.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_gopen_peer_table.php >> /var/log/nms-dashboard/gopen_peers.log 2>&1",
"cd " + scriptDirectory + " && ./get-bgp-v4-vpnRRPeers-on-router.sh > /var/log/nms-dashboard/vpnrr_peers.log 2>&1",
"cd " + scriptDirectory + " && ./populate_router_vpnrr_peer_table.php >> /var/log/nms-dashboard/vpnrr_peers.log 2>&1"