In this example, we are creating a VPN-Proxy for SURFnet
1 Login into prod-cacti02-vie-at-geant.net
$> sudo mysql-as-root
2 Create a new table in the MySQL database called SURFnet_VPN_Proxy . The MySQL database is called md_vpn and is located on the prod-cacti02-vie-at-geant.net server
CREATE TABLE `SURFnet_VPN_Proxy` (`utc_time_stored` bigint(20) NOT NULL,`availability` smallint(6) NOT NULL DEFAULT '0',PRIMARY KEY (`utc_time_stored`)) ENGINE=MyISAM DEFAULT CHARSET=latin1
3 Create a new data source in Cacti to store the BGP Peering Status, an example is given below:
http://prod-cacti02-vie-at.geant.net/cacti/data_sources.php?action=ds_edit&id=32008 . You can fetch a cacti login admin account in the password manager.
4 Go to the DataSources page on Cacti.
When you click 'Add' you will be given a drop down of possible templates for the data source, select the relevant one and click 'create' this will then take you through to a form with several fields already populated including the Data Source Path.
Note: No rrd file gets created as output is sent directly to the SQL table
The Table Name in the data source has to match completely (it’s case sensitive) to the Table Name in the MySQL database.
5. A row needs to be added to the msr_vpn_status_proxy table:
insert into msr_vpn_status_proxy (vpn_proxy_name,ip_address,nren_name,vpn_number,vpn_type,vpn_status) values ('VPN-Proxy Amsterdam','62.40.97.11','SURFnet','PRACE','L3',1);
The NREN name must match (it’s case sensitive) the NREN name of the new table that has been created.
6 <---------------------This sections below needs to be reviewed, as its prone to a number of problems: first test-vms are shut down by IT save resources, and breaks separarion of concerns principles etc ------------------>
6 Every 5 minutes, a cron job runs on the test-msr.geant.net (shall we move this production please) server and executes /home/local/GEANT/dante.sanigar/scripts/mdvpn_status.sh. This calls a JAVA batch program called net.dante.md_vpn.MDVPNStatus.
This program gets the last status value from the <NREN_NAME>_VPN_Proxy tables and updates the msr_vpn_status_proxy table, with either 0 or 1.
7. Last thing is to update the /var/lib/tomcat6/webapps/mdvpn/ms_status_dashboard.jsp on test-msr.geant.net (shall we move this to production please) server to add the new table at the bottom of the page.
http://test-msr.geant.net:8888/mdvpn/ms_status_dashboard.jsp
(though we eventually confirmed it is working