To complete this step you need to clone https://gitlab.geant.net/msr-automation/cacti-utilisation on your local machine. This application will generate the script files which are being referred to in the description below.
Also, You will need to create a folder named
Log into prod-cacti01-fra-de.geant.net (not Test MSR or Data Warehouse!) as yourself (using dante.surname credentials)
change directory to /home/cactiuser/scripts
** Are you able to sudo as cactiuser? "sudo su cactiuser"
You will need "fix-scripts" folder created somewhere on your local machine. In my case I have had it under "C:\Users\Omar\projects\fix-scripts". This is the folder where all scripts will be loaded to.
Tip: "application.properties" file needs to be created in "/msr-cacti-utilisation/src/main/resources" inside that file it should have this line "files.outputdirectory=C:\\Users\\Omar\\projects\\fix-scripts\\ " This is the path for "fix-scripts" folder.
Steps to follow:
- Open Eclipse/IntelliJ and browse to "msr-cacti-utilisation" - As mentioned above, this is in Git https://gitlab.geant.net/msr-automation/cacti-utilisation
- Make sure to change the month and year in the "Main" class "cacti-utilisation\src\main\java\org\geant\msr\utilisation\Main.java" Lines 36 and 37
- Run the maven project (cacti utilisation) from Eclipse/IntelliJ. This will generate the script files and will save them in ""fix-scripts" folder.
- Copy the produced files (C:\Users\Omar\projects\fix-scripts) to
...
- your home directory on "prod-cacti01-fra-de.geant.net"
...
- . You can use WinSCP client
...
- from Windows machine.
- Log into prod-cacti01-fra-de.geant.net as yourself
- Copy the scripts from your home directory to "/home/cactiuser/scripts" on "prod-cacti01-fra-de.geant.net"
...
- . To copy multiple files: sudo cp fix_* /home/cactiuser/scripts/
change directory to /home/cactiuser/scripts
** Are you able to sudo as cactiuser? "sudo su cactiuser"
You will need to convert files from Dos to Unix - https://stackoverflow.com/questions/9374991/how-to-convert-files-from-dos-to-unix
- Run "sudo dos2unix ./fix*" inside "/home/cactiuser/scripts"
- THEN Then, run "sudo ./fix_monthly_utilisation.sh -y 2017 -m 7" ** Pay attention to the year and the month value in the command.
Some circuits will be missing from the MSR GUI, and some circuits will show zeros, to fix that I have added those circuits in bash scripts which you can run, as below:
On prod-cacti01 "/home/cactiuser/scripts"
- Run this script "sudo ./missingCircuitsinip_util_lhconePage.sh -y2019 -m10" , this is for this page: http://test-msr.geant.net:8888/msr/ip_util_lhcone.jsp?type=percent
- Run this script "sudo ./missingCircuitsINip_util_ipv6Page.sh -y2019 -m10" , this is for this page: http://test-msr.geant.net:8888/msr/ip_util_ipv6.jsp
- Run this script "sudo ./missingCircuitsINint_util_details.sh -y2019 -m10" , this is for this page: http://test-msr.geant.net:8888/msr/int_util_details.jsp
- Run this script "sudo ./TooManyZerosIP_UTIL_IP-page.sh -y2019 -m10" , this is for this page http://test-msr.geant.net:8888/msr/ip_util_ip.jsp
Results will be shown on this page: http://test-msr.geant.net:8888/msr/ip_util_ip.jsp
The scripts below are what you've already generated from cacti-utilisation application and copied them from fix-scripts folder.
...