To add an entry to "VPN Status Through Proxy XXXX" section follow all instructions
To add an entry to "MD-VPN Status For NRENs" section follow instructions 1-5 but change the name of the table you create accordingly e.g. SURFnet_BGP_LU or SURFnet_VRR_Paris
In this example, we are creating a VPN-Proxy for SURFnet
1. Login into prod-cacti02-vie-at-geant.net ---- Step 1 and Step 2 can be done in MySQL Workbench by logging to "MDVPN" database on 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=latin1another example: (note nren name, this needs to be changed according to the request we receive) i.e. ticket (2018071634000816)
CREATE TABLE `JANET_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: - Step 3 and 4 can be done by Network Engineers in Operations team (i.e. Niall, Cristian ...)
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 BGP Status MySQL. With the drop down labelled Host, select the correct VPN Proxy name.
** WARNING Do not use router names here such as mx1.fra.de.geant.net, look for the corresponding VPN Proxy, such as VPN-PROXY - Frankfurt. If you cannot find a relevant VPN-PROXY, then you will need to go and add the device using this link: http://cacti.geant.net/cacti/host.php?action=edit&host_template_id=-1&host_status=-1 . Have a look at this link as a example of how to create a new device: http://cacti.geant.net/cacti/host.php?action=edit&id=249
Clicking the 'create' button will then take you through to a form with several fields already populated including the Data Source Path.
Update the Name so that it includes the NREN name and Service e.g. |host_description| - SURFnet - PRACE
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: can be done in MySQL Workbench by logging to "MDVPN" database on prod-cacti02-vie-at-geant.net
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); Values in Red to be provided by the requester
The NREN name must match (it’s case sensitive) the NREN name of the new table that has been created.
<---------------------This section below needs to be reviewed, as it's prone to a number of problems: first test-vms are shut down by IT to save resources, and breaks separation 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
You will need to change the following in the "ms_status_dashboard.jsp" page:
- PreparedStatement, ResultSet and boolean resultset10HasData as in lines (17 - 59)
- String sqlString10 = ""; as in lines (63 - 73)
- sqlString10 as in lines (106 - 149)
- statement10 = conn.prepareStatement(sqlString); ..etc as in lines (156 - 198)
- add a new table as in lines (797 - 840)
TODO: To script the database tasks